Package: af Severity: normal Tags: patch When building 'af' on ppc64 with gcc-4.0, I get the following error:
gcc -O2 -I../lib -c -o io.o io.c io.c:74: error: conflicting types for 'readahead' /usr/include/bits/fcntl.h:187: error: previous declaration of 'readahead' was here make[1]: *** [io.o] Error 1 make[1]: Leaving directory `/srv/dbuild/tmp/af-2.4.3/src' With the attached patch 'af' can be compiled on ppc64 using gcc-4.0. The patch includes additional fixes which were already necessary for gcc-3.4. Regards Andreas Jochens diff -urN ../tmp-orig/af-2.4.3/src/io.c ./src/io.c --- ../tmp-orig/af-2.4.3/src/io.c 2005-01-11 10:29:11.928060664 +0000 +++ ./src/io.c 2005-01-11 10:16:55.000000000 +0000 @@ -71,7 +71,7 @@ char *get_str(); void msg(), clearmsg(), hide_cursor(); static char *get_form(); -static int readkey(), readahead(); +static int readkey(), readahead_local(); static void new_msg(), show_msg(), end_msg(); /****************************************************************************/ @@ -87,7 +87,7 @@ /****************************************************************************/ /* The input functions are stored here as pointers */ -static IOFUNC io_default = { readkey, readahead, readline, readseq }; +static IOFUNC io_default = { readkey, readahead_local, readline, readseq }; static IOFUNC *io_funcs = &io_default; /****************************************************************************/ @@ -197,7 +197,7 @@ /* Default any null pointers within the structure */ io_new->key = (io_new->key != NULL) ? io_new->key : readkey; - io_new->type = (io_new->type != NULL) ? io_new->type : readahead; + io_new->type = (io_new->type != NULL) ? io_new->type : readahead_local; io_new->line = (io_new->line != NULL) ? io_new->line : readline; io_new->seq = (io_new->seq != NULL) ? io_new->seq : readseq; @@ -906,7 +906,7 @@ return(key); } /****************************************************************************/ -static int readahead() +static int readahead_local() { /* Return TRUE if there are input characters pending */ diff -urN ../tmp-orig/af-2.4.3/lib/regex.c ./lib/regex.c --- ../tmp-orig/af-2.4.3/lib/regex.c 2003-11-27 01:49:02.000000000 +0000 +++ ./lib/regex.c 2005-01-11 10:14:38.000000000 +0000 @@ -69,7 +69,6 @@ /****************************************************************************/ /* Global function declarations */ -extern char *malloc(); extern void free(); /* Functions used to compile expressions */ diff -urN ../tmp-orig/af-2.4.3/lib/tempnam.c ./lib/tempnam.c --- ../tmp-orig/af-2.4.3/lib/tempnam.c 2003-11-27 01:49:02.000000000 +0000 +++ ./lib/tempnam.c 2005-01-11 10:14:38.000000000 +0000 @@ -38,7 +38,7 @@ /****************************************************************************/ /* Global function declarations */ -extern char *malloc(), *getenv(), *mktemp(); +extern char *getenv(), *mktemp(); extern int stat(), access(); extern void free(); diff -urN ../tmp-orig/af-2.4.3/src/lock.c ./src/lock.c --- ../tmp-orig/af-2.4.3/src/lock.c 2003-11-27 01:49:02.000000000 +0000 +++ ./src/lock.c 2005-01-11 10:14:38.000000000 +0000 @@ -46,7 +46,7 @@ /****************************************************************************/ /* Global function declarations */ -extern char *malloc(), *tempnam(); +extern char *tempnam(); extern unsigned sleep(); extern void free(); diff -urN ../tmp-orig/af-2.4.3/src/misc.c ./src/misc.c --- ../tmp-orig/af-2.4.3/src/misc.c 2003-11-27 01:49:02.000000000 +0000 +++ ./src/misc.c 2005-01-11 10:14:38.000000000 +0000 @@ -63,7 +63,6 @@ /****************************************************************************/ /* Global function declarations */ -extern char *malloc(), *realloc(); extern char *getlogin(), *getenv(), *getcwd(); extern int kill(), strncasecmp(), pclose(); extern int mkupper(); diff -urN ../tmp-orig/af-2.4.3/src/writembox.c ./src/writembox.c --- ../tmp-orig/af-2.4.3/src/writembox.c 2003-11-27 01:49:02.000000000 +0000 +++ ./src/writembox.c 2005-01-11 10:14:38.000000000 +0000 @@ -38,7 +38,7 @@ /****************************************************************************/ /* Global function declarations */ -extern char *malloc(), *lock(); +extern char *lock(); extern int move_lockfile(), unlock(); extern void free(), exit(); -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]