[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#287626: lush: FTBFS (amd64/gcc-4.0): static declaration of 'ansidatenames' follows non-static declaration



Package: lush
Severity: normal
Tags: patch

When building 'lush' on amd64 with gcc-4.0,
I get the following error:

gcc   -DHAVE_CONFIG_H -DNO_DEBUG -Wall -O3 -I../include -pthread  -c date.c
date.c:66: error: static declaration of 'ansidatenames' follows non-static declaration
../include/header.h:791: error: previous declaration of 'ansidatenames' was here
date.c: In function 'date_serialize':
date.c:317: error: invalid storage class for function 'make_date'
make[2]: *** [date.o] Error 1
make[2]: Leaving directory `/lush-1.0+cvs.2004.05.16/src'

With the attached patch 'lush' can be compiled
on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/lush-1.0+cvs.2004.05.16/include/header.h ./include/header.h
--- ../tmp-orig/lush-1.0+cvs.2004.05.16/include/header.h	2004-02-09 21:59:51.000000000 +0100
+++ ./include/header.h	2004-12-28 17:58:11.732853040 +0100
@@ -788,7 +788,6 @@
 #define DATE_MINUTE     4
 #define DATE_SECOND     5
 
-extern char *ansidatenames[];
 extern class date_class;
 
 TLAPI char *str_date( at *p, int *pfrom, int *pto );
diff -urN ../tmp-orig/lush-1.0+cvs.2004.05.16/src/date.c ./src/date.c
--- ../tmp-orig/lush-1.0+cvs.2004.05.16/src/date.c	2003-07-11 15:03:45.000000000 +0200
+++ ./src/date.c	2004-12-28 17:58:23.814016424 +0100
@@ -311,10 +311,11 @@
   return string_buffer;
 }
 
+static at *make_date(struct date *d);
+
 static void
 date_serialize(at **pp, int code)
 {
-  static at *make_date(struct date *d);
   void *p;
 
   if (code == SRZ_READ)
diff -urN ../tmp-orig/lush-1.0+cvs.2004.05.16/src/index.c ./src/index.c
--- ../tmp-orig/lush-1.0+cvs.2004.05.16/src/index.c	2004-04-16 01:45:34.000000000 +0200
+++ ./src/index.c	2004-12-28 18:08:24.241737536 +0100
@@ -142,6 +142,9 @@
 }
 
 
+static at *index_set(struct index*,at**,at*,int);
+static at *index_ref(struct index*,at**);
+
 static at *
 index_listeval(at *p, at *q)
 {
@@ -150,9 +153,6 @@
   register at *qsav;
   at *myp[MAXDIMS];
 
-  static at *index_set(struct index*,at**,at*,int);
-  static at *index_ref(struct index*,at**);
-
   ind = p->Object;
 
   if (ind->flags & IDF_UNSIZED)



Reply to: