🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Cliff Krumvieda Mon, 02 Nov 1992 16:43
more on index, rindex, and gcc-2.3.1
#55
Author: Cliff Krumvieda
Date: Mon, 02 Nov 1992 16:43
100 lines
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
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