caiminf / freenos

Automatically exported from code.google.com/p/freenos
GNU General Public License v3.0
0 stars 0 forks source link

strcasecmp() should be in strings.h instead of string.h #69

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It seems like the function strcasecmp() belongs in the strings.h header
instead of string.h (at least, according to my Ubuntu distribution). Odd,
though.

Original issue reported on code.google.com by coenbijlsma on 7 Aug 2009 at 11:47

GoogleCodeExporter commented 8 years ago
strings.h is only used if _STRING_H is not known 
(jaunty:/usr/include/strings.h:22)
so maybe it's not necessary after all.

Original comment by coenbijlsma on 7 Aug 2009 at 11:47

GoogleCodeExporter commented 8 years ago
Hi Coen,

Even though you're entirely correct, don't let stuff like Ubuntu influence you. 
If you 
want to figure out what functions and data types should be defined in which 
header, 
look here:

http://www.opengroup.org/onlinepubs/9699919799/basedefs/

In particularly:

http://www.opengroup.org/onlinepubs/9699919799/basedefs/strings.h.html
http://www.opengroup.org/onlinepubs/9699919799/basedefs/strings.h.html

I guess if you're really interested in implementing standard library functions, 
be sure 
to implement the functionality not enclosed in tags (such as XSI, CX, etc) 
first. When 
implementing the other bits, seriously consider why you should have this or 
not. For 
example, when I worked on FreeBSD's TTY code, I implemented all (most?) bits 
defined by the base definitions and some of the XSI stuff, but most of the XSI 
definitions are just rubbish.

Original comment by edschou...@gmail.com on 11 Aug 2009 at 6:55

GoogleCodeExporter commented 8 years ago
Errr -- I wanted to paste this URL, instead of the same URL twice:

http://www.opengroup.org/onlinepubs/9699919799/basedefs/string.h.html

Original comment by edschou...@gmail.com on 11 Aug 2009 at 6:55