strcasecmp()

Have a question about our Software Developer Kit? Ask them here.

strcasecmp()

Postby kas1e » Sat Jan 16, 2016 7:29 pm

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

Re: strcasecmp()

Postby salass00 » Sat Jan 16, 2016 7:38 pm

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

Re: strcasecmp()

Postby kas1e » Sat Jan 16, 2016 9:56 pm

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

Re: strcasecmp()

Postby salass00 » Sun Jan 17, 2016 9:04 am

Use -std=gnu++11 instead.
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 460
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland


Return to SDK Support

Who is online

Users browsing this forum: No registered users and 1 guest