Page 1 of 1

strcasecmp()

Posted: Sat Jan 16, 2016 6:29 pm
by kas1e
Plz, add strcasecmp() to the newlib. It already present in clib2, but also necessary to have it in newlib as well. I can of course create my own custom one, but that function from time to time need it.

Re: strcasecmp()

Posted: Sat Jan 16, 2016 6:38 pm
by salass00
The function strcasecmp() is implemented in newlib but is disabled for __STRICT_ANSI__ code.

If your code is compiled with -std=c99 you will want to change it to -std=gnu99.

Re: strcasecmp()

Posted: Sat Jan 16, 2016 8:56 pm
by kas1e
I tried to compile it with g++ and std=c++11 , so:

> ppc-amigaos-g++ -std=c++11 -c test.c -o test.o
test.c: In function 'int main()':
test.c:30:19: error: 'strcasecmp' was not declared in this scope

And if:
> ppc-amigaos-g++ -std=c++11 -std=gnu99 -c test.c -o test.o
cc1plus: warning: command line option '-std=gnu99' is valid for C/ObjC but not for C++

But i need -std=c++11.

Re: strcasecmp()

Posted: Sun Jan 17, 2016 8:04 am
by salass00
Use -std=gnu++11 instead.