strcasecmp()

Have a question about our Software Developer Kit? Ask them here.
Post Reply
kas1e
Beta Tester
Beta Tester
Posts: 542
Joined: Sat Jun 18, 2011 7:56 am
Contact:

strcasecmp()

Post 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.
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 530
Joined: Sat Jun 18, 2011 3:12 pm
Location: Finland
Contact:

Re: strcasecmp()

Post 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.
kas1e
Beta Tester
Beta Tester
Posts: 542
Joined: Sat Jun 18, 2011 7:56 am
Contact:

Re: strcasecmp()

Post 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.
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 530
Joined: Sat Jun 18, 2011 3:12 pm
Location: Finland
Contact:

Re: strcasecmp()

Post by salass00 »

Use -std=gnu++11 instead.
Post Reply