Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Cliff Krumvieda
Mon, 02 Nov 1992 12:09
index, rindex, and gcc-2.3.1
Author: Cliff Krumvieda
Date: Mon, 02 Nov 1992 12:09
Date: Mon, 02 Nov 1992 12:09
66 lines
2315 bytes
2315 bytes
Howdy: I had some trouble compiling gcc-2.3.1 on our HP 9000/834 running HP-UX 7.00. It seems that the files ""c-typeck.c", "cccp.c", and "collect2.c" assume that the functions "index" and "rindex" exist. In the 2.2.2 version of cccp.c there were explicit #define's of index and rindex to strchr and strrchr, respectively, so I just mocked them into the 2.3.1 source: ====================================================================== % diff -c c-typeck.c-dist c-typeck.c *** c-typeck.c-dist Mon Oct 26 19:02:20 1992 --- c-typeck.c Mon Nov 2 16:13:24 1992 *************** *** 33,38 **** --- 33,43 ---- #include "c-tree.h" #include "flags.h" + #ifdef USG + #define index strchr + #define rindex strrchr + #endif + extern char *index (); extern char *rindex (); ====================================================================== % diff -c cccp.c-dist cccp.c *** cccp.c-dist Sat Oct 24 21:06:43 1992 --- cccp.c Mon Nov 2 15:39:38 1992 *************** *** 81,86 **** --- 81,88 ---- #include <sys/time.h> /* for __DATE__ and __TIME__ */ #include <sys/resource.h> #else + #define index strchr + #define rindex strrchr #include <time.h> #include <fcntl.h> #endif /* USG */ ====================================================================== % diff -c collect2.c-dist collect2.c *** collect2.c-dist Thu Oct 15 02:10:55 1992 --- collect2.c Mon Nov 2 16:21:05 1992 *************** *** 203,208 **** --- 203,213 ---- generic *xcalloc (); generic *xmalloc (); + #ifdef USG + #define index strchr + #define rindex strrchr + #endif + extern char *index (); extern char *rindex (); ====================================================================== Hope this helps. --Cliff Krumvieda
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads