changeset 14607:7a80c6ac5058

several sets of headers declare global variables in them, which causes multiple definition errors with gcc 4.x patch by Alexander Strange <astrange ithinksw.com>
author iive
date Sat, 29 Jan 2005 12:24:43 +0000
parents 1182e96d172f
children 9595f1de1393
files edl.c edl.h libmpdemux/tv.c libmpdemux/tv.h libmpdvdkit2/dvd_input.c libmpdvdkit2/dvd_input.h
diffstat 6 files changed, 23 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/edl.c	Fri Jan 28 10:12:28 2005 +0000
+++ b/edl.c	Sat Jan 29 12:24:43 2005 +0000
@@ -5,6 +5,9 @@
 #include "edl.h"
 #include "help_mp.h"
 
+char *edl_filename; // file to extract EDL entries from (-edl)
+char *edl_output_filename; // file to put EDL entries in (-edlout)
+
 #ifdef USE_EDL
 
 /**
--- a/edl.h	Fri Jan 28 10:12:28 2005 +0000
+++ b/edl.h	Sat Jan 29 12:24:43 2005 +0000
@@ -23,8 +23,8 @@
 
 typedef struct edl_record* edl_record_ptr;
 
-char *edl_filename; // file to extract EDL entries from (-edl)
-char *edl_output_filename; // file to put EDL entries in (-edlout)
+extern char *edl_filename; // file to extract EDL entries from (-edl)
+extern char *edl_output_filename; // file to put EDL entries in (-edlout)
 
 int edl_check_mode(void); // we cannot do -edl and -edlout at the same time
 int edl_count_entries(void); // returns total number of entries needed
--- a/libmpdemux/tv.c	Fri Jan 28 10:12:28 2005 +0000
+++ b/libmpdemux/tv.c	Sat Jan 29 12:24:43 2005 +0000
@@ -78,6 +78,9 @@
 int tv_param_contrast = 0;
 int tv_param_hue = 0;
 int tv_param_saturation = 0;
+tv_channels_t *tv_channel_list;
+tv_channels_t *tv_channel_current, *tv_channel_last;
+char *tv_channel_last_real;
 
 /* ================== DEMUX_TV ===================== */
 /*
--- a/libmpdemux/tv.h	Fri Jan 28 10:12:28 2005 +0000
+++ b/libmpdemux/tv.h	Sat Jan 29 12:24:43 2005 +0000
@@ -95,9 +95,9 @@
     struct tv_channels_s *prev;
 } tv_channels_t;
 
-tv_channels_t *tv_channel_list;
-tv_channels_t *tv_channel_current, *tv_channel_last;
-char *tv_channel_last_real;
+extern tv_channels_t *tv_channel_list;
+extern tv_channels_t *tv_channel_current, *tv_channel_last;
+extern char *tv_channel_last_real;
 
 #define TVI_CONTROL_FALSE		0
 #define TVI_CONTROL_TRUE		1
--- a/libmpdvdkit2/dvd_input.c	Fri Jan 28 10:12:28 2005 +0000
+++ b/libmpdvdkit2/dvd_input.c	Sat Jan 29 12:24:43 2005 +0000
@@ -34,6 +34,12 @@
 int           (*DVDcss_read)  (dvdcss_handle, void *, int, int);
 char *        (*DVDcss_error) (dvdcss_handle);
 
+dvd_input_t (*DVDinput_open)  (const char *);
+int         (*DVDinput_close) (dvd_input_t);
+int         (*DVDinput_seek)  (dvd_input_t, int, int);
+int         (*DVDinput_title) (dvd_input_t, int); 
+int         (*DVDinput_read)  (dvd_input_t, void *, int, int);
+char *      (*DVDinput_error) (dvd_input_t);
 
 /* The DVDinput handle, add stuff here for new input methods. */
 struct dvd_input_s {
--- a/libmpdvdkit2/dvd_input.h	Fri Jan 28 10:12:28 2005 +0000
+++ b/libmpdvdkit2/dvd_input.h	Sat Jan 29 12:24:43 2005 +0000
@@ -36,12 +36,12 @@
 /**
  * Pointers which will be filled either the input meathods functions.
  */
-dvd_input_t (*DVDinput_open)  (const char *);
-int         (*DVDinput_close) (dvd_input_t);
-int         (*DVDinput_seek)  (dvd_input_t, int, int);
-int         (*DVDinput_title) (dvd_input_t, int); 
-int         (*DVDinput_read)  (dvd_input_t, void *, int, int);
-char *      (*DVDinput_error) (dvd_input_t);
+extern dvd_input_t (*DVDinput_open)  (const char *);
+extern int         (*DVDinput_close) (dvd_input_t);
+extern int         (*DVDinput_seek)  (dvd_input_t, int, int);
+extern int         (*DVDinput_title) (dvd_input_t, int); 
+extern int         (*DVDinput_read)  (dvd_input_t, void *, int, int);
+extern char *      (*DVDinput_error) (dvd_input_t);
 
 /**
  * Setup function accessed by dvd_reader.c.  Returns 1 if there is CSS support.