string.h vs string.h usage

egor duda deo@logos-m.ru
Wed Dec 5 04:41:00 GMT 2001


Hi!

Wednesday, 05 December, 2001 Pavel Tsekov ptsekov@syntrex.com wrote:

PT> egor duda wrote:
>> 
>> Hi!
>> 
>> Wednesday, 05 December, 2001 Pavel Tsekov ptsekov@syntrex.com wrote:
>> 
>> SUSv2 mandates both <strings.h> and <string.h>
>> 
>> mingw declares strcasecmp() in <string.h> while SUSv2 says it should
>> be in <strings.h>

PT> Afaik str[n]case is and BSD-ism :)

it doesn't matter as long as standard defines it. please note that it
doesn't marked as "obsolete" -- usage of those functions is supposedly
pretty portable.

PT> Btw here is what glibc on redhat 7.1 says.

PT> /* We don't need and should not read this file if <string.h> was already
PT>    read. The one exception being that if __USE_BSD isn't defined, then
PT>    these aren't defined in string.h, so we need to define them here.  */

of course it's up to mingw guys to decide what's the standard they're
trying to comply with. but i suppose SUSv2 is the right way to go
(excluding functions not defined in msvcrt/crtdll.dll, of course)

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19



More information about the Cygwin-apps mailing list