repo: ngircd action: commit revision: path_from: revision_from: f27827d7937375b5348107ca7427abf74c9eff3d: path_to: revision_to:
commit f27827d7937375b5348107ca7427abf74c9eff3d Author: MichiDate: Tue Apr 14 16:53:02 2020 +0200 Unbreak GCC 10 (-fno-common) build diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
--- a/src/ngircd/conn.c +++ b/src/ngircd/conn.c @@ -10,6 +10,7 @@ */ #define CONN_MODULE +#define CONN_MODULE_GLOBAL_INIT #include "portab.h" diff --git a/src/ngircd/conn.h b/src/ngircd/conn.h
--- a/src/ngircd/conn.h +++ b/src/ngircd/conn.h @@ -105,9 +105,17 @@ typedef struct _Connection #endif } CONNECTION; -GLOBAL CONNECTION *My_Connections; -GLOBAL CONN_ID Pool_Size; -GLOBAL long WCounter; + +#ifdef CONN_MODULE_GLOBAL_INIT +CONNECTION *My_Connections; +CONN_ID Pool_Size; +long WCounter; +#else +extern CONNECTION *My_Connections; +extern CONN_ID Pool_Size; +extern long WCounter; +#endif + #define CONNECTION2ID(x) (long)(x - My_Connections) diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c
--- a/src/ngircd/ngircd.c +++ b/src/ngircd/ngircd.c @@ -9,6 +9,7 @@ * Please read the file COPYING, README and AUTHORS for more information. */ +#define GLOBAL_INIT #include "portab.h" /** diff --git a/src/portab/portab.h b/src/portab/portab.h
--- a/src/portab/portab.h +++ b/src/portab/portab.h @@ -102,7 +102,11 @@ typedef unsigned char bool; #endif #undef GLOBAL +#ifdef GLOBAL_INIT #define GLOBAL +#else +#define GLOBAL extern +#endif /* SPLint */
-----END OF PAGE-----