Article View: gnu.gcc.bug
Article #55more on index, rindex, and gcc-2.3.1
From: Cliff Krumvieda
Date: Mon, 02 Nov 1992 16:43
Date: Mon, 02 Nov 1992 16:43
100 lines
3053 bytes
3053 bytes
Howdy:
My previous message only mentioned the index/rindex link errors I got
while building stage1 of gcc-2.3.1 on our HP 9000/834's running HP-UX
7.00. Here are some more patches needed to build stage2:
======================================================================
% diff -c cp-lex.c-dist cp-lex.c
*** cp-lex.c-dist Tue Oct 20 14:54:29 1992
--- cp-lex.c Mon Nov 2 20:10:16 1992
***************
*** 62,67 ****
--- 62,72 ----
(rindex (X, '/') != 0 ? rindex (X, '/') + 1 : X)
#endif
+ #ifdef USG
+ #define index strchr
+ #define rindex strrchr
+ #endif
+
extern char *index ();
extern char *rindex ();
======================================================================
% diff -c cp-method.c-dist cp-method.c
*** cp-method.c-dist Tue Oct 20 14:37:35 1992
--- cp-method.c Mon Nov 2 21:39:44 1992
***************
*** 1438,1444 ****
--- 1438,1448 ----
*bufp++ = 'm';
}
sprintf (bufp, "%e", val);
+ #ifdef USG
+ bufp = (char *) strchr (bufp, 'e');
+ #else
bufp = (char *) index (bufp, 'e');
+ #endif
if (!bufp)
strcat (digit_buffer, "e0");
else
======================================================================
% diff -c cp-xref.c-dist cp-xref.c
*** cp-xref.c-dist Wed Aug 26 20:21:50 1992
--- cp-xref.c Mon Nov 2 20:16:47 1992
***************
*** 29,34 ****
--- 29,39 ----
char *getpwd ();
+ #ifdef USG
+ #define index strchr
+ #define rindex strrchr
+ #endif
+
extern char *index ();
extern char *rindex ();
======================================================================
% diff -c dwarfout.c-dist dwarfout.c
*** dwarfout.c-dist Thu Oct 29 05:47:27 1992
--- dwarfout.c Mon Nov 2 20:17:05 1992
***************
*** 56,61 ****
--- 56,66 ----
extern char *getpwd ();
+ #ifdef USG
+ #define index strchr
+ #define rindex strrchr
+ #endif
+
extern char *index ();
extern char *rindex ();
======================================================================
% diff -c protoize.c-dist protoize.c
*** protoize.c-dist Sat Oct 17 16:50:54 1992
--- protoize.c Mon Nov 2 21:15:09 1992
***************
*** 164,169 ****
--- 164,173 ----
extern void longjmp ();
#endif
+ #ifdef USG
+ #define rindex strrchr
+ #endif
+
extern char * strcat ();
extern int strcmp ();
extern char * strcpy ();
======================================================================
Hope this helps.
--Cliff
Technical Details
Message-ID:
<9211030243.AA27767@ask.cs.cornell.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!portal!lll-winken!iggy.GW.Vitalink.COM!cs.widener.edu!umn.edu!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cs.cornell.edu!cliffShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!portal!lll-winken!iggy.GW.Vitalink.COM!cs.widener.edu!umn.edu!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cs.cornell.edu!cliff From: cliff@cs.cornell.edu (Cliff Krumvieda) Newsgroups: gnu.gcc.bug Subject: more on index, rindex, and gcc-2.3.1 Message-ID: <9211030243.AA27767@ask.cs.cornell.edu> Date: 2 Nov 92 16:43:13 GMT Sender: gnulists@ai.mit.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 100 Approved: bug-gcc@prep.ai.mit.edu