Package: glimpse
Severity: normal
Tags: patch

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

cp glimpse.c buildcast.c
x86_64-linux-gcc -c -I../index -I../agrep -I../libtemplate/include  
-DBUILDCAST=1 -o buildcast.o buildcast.c
buildcast.c:27: error: static declaration of 'TEMP_DIR' follows non-static 
declaration
buildcast.c:22: error: previous declaration of 'TEMP_DIR' was here
make[2]: *** [buildcast.o] Error 1
make[2]: Leaving directory `/glimpse-4.18.0/index'

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

Regards
Andreas Jochens

diff -urN ../tmp-orig/glimpse-4.18.0/index/glimpse.c ./index/glimpse.c
--- ../tmp-orig/glimpse-4.18.0/index/glimpse.c  2002-09-27 21:41:11.000000000 
+0000
+++ ./index/glimpse.c   2005-02-26 11:57:20.521474712 +0000
@@ -19,13 +19,15 @@
 extern char  INDEX_DIR[MAX_LINE_LEN];
 extern struct stat istbuf;
 
-extern char    *TEMP_DIR; /* directory to store glimpse temporary files, 
usually /tmp unless -T is specified */
 #ifdef BUILDCAST
 /* TEMP_DIR is normally defined in ../main.c; if we're building
  * buildcast, that's not linked in, so we need to define one here. */
 /* char * TEMP_DIR = NULL; */
 static char * TEMP_DIR = "/tmp";
+#else
+extern char    *TEMP_DIR; /* directory to store glimpse temporary files, 
usually /tmp unless -T is specified */
 #endif /* BUILDCAST */
+
 extern int indexable_char[256];
 extern int GenerateHash;
 extern int KeepFilenames;


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to