PATCH Replace index() with strchr() in read-rtl.c

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Mon Sep 13 05:17:00 GMT 2004


 > > While I support nuking `index' from GCC sources, I'm just wondering
 > > why it was a problem in the first place.  Shouldn't libiberty have
 > > taken care of supplying the missing function?
 > 
 > libiberty provides both strchr() and index().
 > 
 > The answer to your question lies not in technology, but in history.
 > Way Back When, Posix wasn't "it" yet, and it was 50/50 whether your OS
 > had index() (BSD-like) or strchr() (SysV-like), and few had both.
 > Which one a developer chose depended more on their background than
 > anything else.

Eh?  I'm not asking why the developer *chose* index.  Rather I'm
asking, why didn't libiberty provide it once it became clear his
system didn't do so.  He's converting it to strchr because he got
failures when using index.  How can that be?
http://gcc.gnu.org/ml/gcc-patches/2004-09/msg01193.html

--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu



More information about the Gcc-patches mailing list