[galib] Re: [PATCH GCC4] (was GALib doesn't compile with GCC-4.0)

Douglas A. Augusto douglas.augusto at pop.com.br
Tue Jun 28 03:23:26 EDT 2005


On 27/06/2005 at 23:19,
"Douglas A. Augusto" <douglas.augusto at pop.com.br> wrote:

> I'm trying to compile GALib 2.4.6 under GCC-4.0 without success. I get many
> warnings (about headers¹) and an fatal error:
> 
> ../ga/GAAllele.h:147: error: declaration of 'operator==' as non-function
> ../ga/GAAllele.h:147: error: expected ';' before '<' token
> ../ga/GAAllele.h:148: error: declaration of 'operator!=' as non-function
> ../ga/GAAllele.h:148: error: expected ';' before '<' token
> make[1]: *** [GAAllele.o] Error 1
> make[1]: Leaving directory `/home/douglas/src/galib/galib246/ga'
> make: *** [lib] Error 2

Hi Matthew.

This patch makes GALib compile under gcc 4.0. Tested on gcc (GCC) 4.0.1
20050617 (prerelease) (Debian 4.0.0-10).


Sincerely,

-- 
Douglas Augusto
-------------- next part --------------
--- gaconfig-original.h	2005-06-28 03:50:18.000000000 -0300
+++ gaconfig.h	2005-06-28 03:56:14.000000000 -0300
@@ -192,7 +192,9 @@
 
 // determine the compiler
 #if defined(__GNUG__) || defined(__GNUC__)
-#if __GNUC__ == 3
+#if __GNUC__ == 4
+#define GALIB_COMPILER "gcc4"
+#elif __GNUC__ == 3
 #define GALIB_COMPILER "gcc3"
 #elif __GNUC__ == 2
 #define GALIB_COMPILER "gcc2"
@@ -365,7 +367,7 @@
 #define GALIB_USE_PID
 #define GALIB_USE_EMPTY_TEMPLATES
 #define GALIB_NEED_INSTANTIATION_PREFIX
-#if __GNUC__ == 3
+#if __GNUC__ == 3 || __GNUC__ == 4
 #define GALIB_USE_ANSI_HEADERS
 #define GALIB_USE_STD_NAMESPACE
 #define GALIB_USE_COMP_OPERATOR_TEMPLATES


More information about the galib mailing list