Description: port to gcc 10
 Solve multiple definitions
Author: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
Bug-Debian: https://bugs.debian.org/957258
Last-Update: 2020-08-07

Index: gbatnav-1.0.4cvs20051004/gbnserver/gbnserver.c
===================================================================
--- gbatnav-1.0.4cvs20051004.orig/gbnserver/gbnserver.c
+++ gbatnav-1.0.4cvs20051004/gbnserver/gbnserver.c
@@ -45,7 +45,7 @@
 #include "batnavggz.h"
 #include "common.h"
 
-
+struct st_datos usuario;
 
 /* algunos defines lindos del UNP second edition volume 1 */
 #define LISTENQ	50
Index: gbatnav-1.0.4cvs20051004/gbnserver/server.h
===================================================================
--- gbatnav-1.0.4cvs20051004.orig/gbnserver/server.h
+++ gbatnav-1.0.4cvs20051004/gbnserver/server.h
@@ -34,7 +34,7 @@ enum {
 	C_LASTTOKEN
 };
 
-struct st_datos usuario;
+extern struct st_datos usuario;
 
 #define BATNAV_UDSOCKET "/tmp/batnav-socket"
 
Index: gbatnav-1.0.4cvs20051004/gbnserver/check_board.c
===================================================================
--- gbatnav-1.0.4cvs20051004.orig/gbnserver/check_board.c
+++ gbatnav-1.0.4cvs20051004/gbnserver/check_board.c
@@ -20,7 +20,7 @@
 #include "protocol.h"
 #include "server.h"
 
-struct st_datos usuario;
+extern struct st_datos usuario;
 
 static gint
 vacio( gint x, gint y, gint jugador )
Index: gbatnav-1.0.4cvs20051004/gbnrobot/robot_cliente.h
===================================================================
--- gbatnav-1.0.4cvs20051004.orig/gbnrobot/robot_cliente.h
+++ gbatnav-1.0.4cvs20051004/gbnrobot/robot_cliente.h
@@ -40,16 +40,16 @@ typedef struct cliente {
 
 
 
-CLIENTE cliente;
+extern CLIENTE cliente;
 
-GtkWidget *window;
-GtkWidget *box;
-GtkWidget *imagen;
-GtkWidget *label;
-GtkWidget *status_label;
+extern GtkWidget *window;
+extern GtkWidget *box;
+extern GtkWidget *imagen;
+extern GtkWidget *label;
+extern GtkWidget *status_label;
 
-gchar* pix;
+extern gchar* pix;
 
-GtkWidget *pbar;
+extern GtkWidget *pbar;
 
 #endif
Index: gbatnav-1.0.4cvs20051004/gbnrobot/robot_proceso.c
===================================================================
--- gbatnav-1.0.4cvs20051004.orig/gbnrobot/robot_proceso.c
+++ gbatnav-1.0.4cvs20051004/gbnrobot/robot_proceso.c
@@ -30,6 +30,17 @@
 #include "net.h"
 #include "common.h"
 
+CLIENTE cliente;
+
+GtkWidget *window;
+GtkWidget *box;
+GtkWidget *imagen;
+GtkWidget *label;
+GtkWidget *status_label;
+
+gchar* pix;
+
+GtkWidget *pbar;
 
 /* This describes all the arguments we understand.  */
 
Index: gbatnav-1.0.4cvs20051004/gbnclient/cliente.h
===================================================================
--- gbatnav-1.0.4cvs20051004.orig/gbnclient/cliente.h
+++ gbatnav-1.0.4cvs20051004/gbnclient/cliente.h
@@ -54,82 +54,84 @@ struct usuario {
 
 	int with_ggz;			/* enable ggz mode */
 	int view_grid;			/* show/hide the map grid */
-} usuario;
+};
 
-GSettings *settings;
+extern struct usuario usuario;
+
+extern GSettings *settings;
 
 /* Variables - GTK */
 /* contenedores */
-GtkWidget *window;
-GtkWidget *hbox;
-GtkWidget *vbox;
+extern GtkWidget *window;
+extern GtkWidget *hbox;
+extern GtkWidget *vbox;
 
 /* left */
-GtkWidget *notebook_left;
-GtkWidget *label_left; 
-GtkWidget *drawing_left;
-GtkWidget *hbox_text_help;
-GtkWidget *text_help;
-GtkWidget *vscrollbar_help;
+extern GtkWidget *notebook_left;
+extern GtkWidget *label_left; 
+extern GtkWidget *drawing_left;
+extern GtkWidget *hbox_text_help;
+extern GtkWidget *text_help;
+extern GtkWidget *vscrollbar_help;
 
 /* right */
-GtkWidget *notebook_right;
-GtkWidget *label_right_about;
-GtkWidget *drawing_right_about;
-GtkWidget *label_right[MAXPLAYER];
-GtkWidget *label_right2[MAXPLAYER];
-GtkWidget *drawing_right[MAXPLAYER];
+extern GtkWidget *notebook_right;
+extern GtkWidget *label_right_about;
+extern GtkWidget *drawing_right_about;
+extern GtkWidget *label_right[MAXPLAYER];
+extern GtkWidget *label_right2[MAXPLAYER];
+extern GtkWidget *drawing_right[MAXPLAYER];
 
 /* otros */
-GtkWidget *hbox_text;
-GtkWidget *vscrollbar;
-GtkWidget *separator;
-GtkWidget *text;
+extern GtkWidget *hbox_text;
+extern GtkWidget *vscrollbar;
+extern GtkWidget *separator;
+extern GtkWidget *text;
 
 
 /* Pixmaps */
-GdkPixbuf *barco1 ;
-GdkPixbuf *barco1_t ;
-GdkPixbuf *barco1_h ;
-GdkPixbuf *barco2h ;
-GdkPixbuf *barco2h_t ;
-GdkPixbuf *barco2h_h ;
-GdkPixbuf *barco2v ;
-GdkPixbuf *barco2v_t ;
-GdkPixbuf *barco2v_h ;
-GdkPixbuf *barco3h ;
-GdkPixbuf *barco3h_t ;
-GdkPixbuf *barco3h_h ;
-GdkPixbuf *barco3v ;
-GdkPixbuf *barco3v_t ;
-GdkPixbuf *barco3v_h ;
-GdkPixbuf *barco4h ;
-GdkPixbuf *barco4h_t ;
-GdkPixbuf *barco4h_h ;
-GdkPixbuf *barco4v ;
-GdkPixbuf *barco4v_t ;
-GdkPixbuf *barco4v_h ;
-
-GdkPixbuf *fondo ;
-GdkPixbuf *agua ;
-GdkPixbuf *about_pix ;
-GdkPixbuf *icono ;
-
-GtkWidget *hbox_status;
-GtkWidget *statusbar_left;
-GtkWidget *statusbar_right;
+extern GdkPixbuf *barco1 ;
+extern GdkPixbuf *barco1_t ;
+extern GdkPixbuf *barco1_h ;
+extern GdkPixbuf *barco2h ;
+extern GdkPixbuf *barco2h_t ;
+extern GdkPixbuf *barco2h_h ;
+extern GdkPixbuf *barco2v ;
+extern GdkPixbuf *barco2v_t ;
+extern GdkPixbuf *barco2v_h ;
+extern GdkPixbuf *barco3h ;
+extern GdkPixbuf *barco3h_t ;
+extern GdkPixbuf *barco3h_h ;
+extern GdkPixbuf *barco3v ;
+extern GdkPixbuf *barco3v_t ;
+extern GdkPixbuf *barco3v_h ;
+extern GdkPixbuf *barco4h ;
+extern GdkPixbuf *barco4h_t ;
+extern GdkPixbuf *barco4h_h ;
+extern GdkPixbuf *barco4v ;
+extern GdkPixbuf *barco4v_t ;
+extern GdkPixbuf *barco4v_h ;
+
+extern GdkPixbuf *fondo ;
+extern GdkPixbuf *agua ;
+extern GdkPixbuf *about_pix ;
+extern GdkPixbuf *icono ;
+
+extern GtkWidget *hbox_status;
+extern GtkWidget *statusbar_left;
+extern GtkWidget *statusbar_right;
 
 /* Usadas por Configure */
-GtkWidget *conf_spinner_port;
-GtkWidget *conf_entry_server;
-GtkWidget *conf_entry_name;
-GtkWidget *conf_check_button;
-GtkWidget *conf_cb_ttyfill;
+extern GtkWidget *conf_spinner_port;
+extern GtkWidget *conf_entry_server;
+extern GtkWidget *conf_entry_name;
+extern GtkWidget *conf_check_button;
+extern GtkWidget *conf_cb_ttyfill;
 
 /* Usadas por Sendmsg */
-GtkWidget *send_spinner_towho;
-GtkWidget *send_entry_message;
-GtkWidget *send_toggle_button;
+extern GtkWidget *send_spinner_towho;
+extern GtkWidget *send_entry_message;
+extern GtkWidget *send_toggle_button;
 
 
 #endif /*__BN_CLIENTE__*/
Index: gbatnav-1.0.4cvs20051004/gbnclient/gbnclient.c
===================================================================
--- gbatnav-1.0.4cvs20051004.orig/gbnclient/gbnclient.c
+++ gbatnav-1.0.4cvs20051004/gbnclient/gbnclient.c
@@ -40,6 +40,64 @@
 #include "version.h"
 #include "g_connect.h"
 
+struct usuario usuario;
+GSettings *settings;
+GtkWidget *window;
+GtkWidget *hbox;
+GtkWidget *vbox;
+GtkWidget *notebook_left;
+GtkWidget *label_left; 
+GtkWidget *drawing_left;
+GtkWidget *hbox_text_help;
+GtkWidget *text_help;
+GtkWidget *vscrollbar_help;
+GtkWidget *notebook_right;
+GtkWidget *label_right_about;
+GtkWidget *drawing_right_about;
+GtkWidget *label_right[MAXPLAYER];
+GtkWidget *label_right2[MAXPLAYER];
+GtkWidget *drawing_right[MAXPLAYER];
+GtkWidget *hbox_text;
+GtkWidget *vscrollbar;
+GtkWidget *separator;
+GtkWidget *text;
+GdkPixbuf *barco1 ;
+GdkPixbuf *barco1_t ;
+GdkPixbuf *barco1_h ;
+GdkPixbuf *barco2h ;
+GdkPixbuf *barco2h_t ;
+GdkPixbuf *barco2h_h ;
+GdkPixbuf *barco2v ;
+GdkPixbuf *barco2v_t ;
+GdkPixbuf *barco2v_h ;
+GdkPixbuf *barco3h ;
+GdkPixbuf *barco3h_t ;
+GdkPixbuf *barco3h_h ;
+GdkPixbuf *barco3v ;
+GdkPixbuf *barco3v_t ;
+GdkPixbuf *barco3v_h ;
+GdkPixbuf *barco4h ;
+GdkPixbuf *barco4h_t ;
+GdkPixbuf *barco4h_h ;
+GdkPixbuf *barco4v ;
+GdkPixbuf *barco4v_t ;
+GdkPixbuf *barco4v_h ;
+GdkPixbuf *fondo ;
+GdkPixbuf *agua ;
+GdkPixbuf *about_pix ;
+GdkPixbuf *icono ;
+GtkWidget *hbox_status;
+GtkWidget *statusbar_left;
+GtkWidget *statusbar_right;
+GtkWidget *conf_spinner_port;
+GtkWidget *conf_entry_server;
+GtkWidget *conf_entry_name;
+GtkWidget *conf_check_button;
+GtkWidget *conf_cb_ttyfill;
+GtkWidget *send_spinner_towho;
+GtkWidget *send_entry_message;
+GtkWidget *send_toggle_button;
+
 /* This describes all the arguments we understand.  */
 
 static char *server_tmp;
