home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / att / 2767 < prev    next >
Encoding:
Text File  |  1992-12-30  |  1.3 KB  |  42 lines

  1. Newsgroups: comp.sys.att
  2. Path: sparky!uunet!uunet.ca!canrem!telly!robohack!woods
  3. From: woods@robohack.UUCP (Greg A. Woods)
  4. Subject: Re: GCC 2.3.2 compile problem on 3B2/400
  5. Organization: Elegant Communications Inc.
  6. References: <1992Dec28.040206.24732@dartvax.dartmouth.edu> <1992Dec28.214904.107@serveme.chi.il.us>
  7. Message-ID: <1992Dec30.041024.299@robohack.UUCP>
  8. Date: Wed, 30 Dec 92 04:10:24 GMT
  9. Lines: 31
  10.  
  11. In article <1992Dec28.214904.107@serveme.chi.il.us> greg@serveme.chi.il.us (Gregory Gulik) writes:
  12. > In article <1992Dec28.040206.24732@dartvax.dartmouth.edu> pete@othello.dartmouth.edu (Pete Schmitt) writes:
  13. > >[....]
  14. > >How can I fix this?
  15. > I doubt this is the optimal fix, but I went through the source
  16. > and changed all references to index()/rindex() to strchr()/strrchr()
  17.  
  18. Geez guy's -- what a waste of time, energy, etc.; as well as being a
  19. potential source of ugly errors....
  20.  
  21. Haven't you ever heard of "#define"??????
  22.  
  23. I.e.:
  24.  
  25.     #ifdef HAVE_STRCHR
  26.     # define index    strchr
  27.     # define rindex    strrchr
  28.     #endif
  29.  
  30. Or:
  31.  
  32.     cc ... -Dindex=strchr -Drindex=strrchr ...
  33.  
  34. (as appropriate -- i.e. only use the former if there's already a
  35. global configuration header that you're expected to modify....)
  36. -- 
  37.                         Greg A. Woods
  38.  
  39. woods@robohack.UUCP, woods@Elegant.COM  VE3TCP    UniForum Canada & ECI
  40. +1 416 443-1734 [home] +1 416 362-XRSA [work]    Toronto, Ontario; CANADA
  41.