[PATCH] databases/libgda breaks build with new gcc
Jens Rehsack
rehsack at liwing.de
Mon Aug 4 05:18:55 PDT 2003
>Submitter-Id: current-users
>Originator: Jens Rehsack
>Organization: LiWing IT-Services
>Confidential: no
>Synopsis: [PATCH] databases/libgda breaks build with new gcc
>Severity: serious
>Priority: high
>Category: ports
>Class: change-request
>Release: FreeBSD 5.1-CURRENT i386
>Environment:
System: FreeBSD statler 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Sun Aug 3 21:07:48 GMT 2003 root at statler:/usr/obj/usr/src/sys/STATLER i386
failure only happens on FreeBSD 5.1-CURRENT with new gcc 3.3.1 world compiler,
FreeBSD 4.8-STABLE compiles fine. The patch doesn't affect well compiling on
FreeBSD 4.8-STABLE.
>Description:
cc -DHAVE_CONFIG_H -I. -I. -I../../.. -I/usr/local/include -pipe -O3 -fforce-addr -funroll-loops -momit-leaf-frame-pointer -minline-all-stringops -fno-gcse -mmmx -msse -msse2 -mfpmath=sse -march=pentium4 -c lemon.c
In file included from lemon.c:394:
lemon.c: In function `buildshifts':
lemon.c:382: warning: passing arg of `Action_add' from incompatible pointer type
In file included from lemon.c:394:
lemon.c: In function `FindActions':
lemon.c:382: warning: passing arg of `Action_add' from incompatible pointer type
lemon.c: In function `ErrorMsg':
lemon.c:1096: error: syntax error before '...' token
lemon.c:1109: error: syntax error before "__builtin_varargs_start"
lemon.c:1158: error: declaration for parameter `argv' but no such parameter
lemon.c:1107: error: declaration for parameter `base' but no such parameter
lemon.c:1107: error: declaration for parameter `restart' but no such parameter
lemon.c:1107: error: declaration for parameter `end' but no such parameter
lemon.c:1106: error: declaration for parameter `ap' but no such parameter
lemon.c:1105: error: declaration for parameter `availablewidth' but no such parameter
lemon.c:1104: error: declaration for parameter `prefixsize' but no such parameter
lemon.c:1103: error: declaration for parameter `errmsgsize' but no such parameter
lemon.c:1102: error: declaration for parameter `prefix' but no such parameter
lemon.c:1101: error: declaration for parameter `errmsg' but no such parameter
lemon.c:1100: error: declaration for parameter `format' but no such parameter
lemon.c:1099: error: declaration for parameter `lineno' but no such parameter
gmake[4]: *** [lemon.o] Error 1
gmake[4]: Leaving directory `/usr/ports/databases/libgda/work/libgda-0.2.96/providers/gda-default-server/sqlite'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/usr/ports/databases/libgda/work/libgda-0.2.96/providers/gda-default-server'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/ports/databases/libgda/work/libgda-0.2.96/providers'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/databases/libgda/work/libgda-0.2.96'
gmake: *** [all-recursive-am] Error 2
*** Error code 2
Stop in /usr/ports/databases/libgda.
>How-To-Repeat:
Simply 'make build' in ports/databases/libgda/ on 5.1
>Fix:
--- patch-files begins here ---
--- /dev/null Mon Aug 4 10:39:39 2003
+++ databases/libgda/files/patch-providers::gda-default-server::sqlite::lemon.c Mon Aug 4 09:45:01 2003
@@ -0,0 +1,50 @@
+--- providers/gda-default-server/sqlite/lemon.c.orig Mon Aug 4 09:34:14 2003
++++ providers/gda-default-server/sqlite/lemon.c Mon Aug 4 09:43:12 2003
+@@ -7,7 +7,7 @@
+ ** The author of this program disclaims copyright.
+ */
+ #include <stdio.h>
+-#include <varargs.h>
++#include <stdarg.h>
+ #include <string.h>
+ #include <ctype.h>
+
+@@ -70,7 +70,7 @@
+ void Configlist_reset(/* void */);
+
+ /********* From the file "error.h" ***************************************/
+-void ErrorMsg( /* char *, int, char *, ... */ );
++void ErrorMsg( char *, int, char *, ... );
+
+ /****** From the file "option.h" ******************************************/
+ struct s_options {
+@@ -1092,12 +1092,13 @@
+ #define ERRMSGSIZE 10000 /* Hope this is big enough. No way to error check */
+ #define LINEWIDTH 79 /* Max width of any output line */
+ #define PREFIXLIMIT 30 /* Max width of the prefix on each line */
+-void ErrorMsg(va_alist)
+-va_dcl
++void ErrorMsg( char *filename, int lineno, char *format, ... )
+ {
++ /*
+ char *filename;
+ int lineno;
+ char *format;
++ */
+ char errmsg[ERRMSGSIZE];
+ char prefix[PREFIXLIMIT+10];
+ int errmsgsize;
+@@ -1106,10 +1107,12 @@
+ va_list ap;
+ int end, restart, base;
+
+- va_start(ap);
++ va_start(ap, format);
++ /*
+ filename = va_arg(ap,char*);
+ lineno = va_arg(ap,int);
+ format = va_arg(ap,char*);
++ */
+ /* Prepare a prefix to be prepended to every output line */
+ if( lineno>0 ){
+ sprintf(prefix,"%.*s:%d: ",PREFIXLIMIT-10,filename,lineno);
--- patch-files ends here ---
More information about the freebsd-gnome
mailing list