[uClibc]the 'strcmp' function supports only C|POSIX locales
Sander Smeenk
ssmeenk+uclibc at freshdot.net
Mon Mar 3 14:03:57 UTC 2003
Quoting Sander Smeenk (ssmeenk+uclibc at freshdot.net):
> | update.o(.text+0x49b): In function `main':
> | : the 'strcmp' function supports only C|POSIX locales
FUP'ing myself, maybe this is of interrest.
I creates this test-program:
| #include <stdio.h>
|
| int main () {
| if (strcmp("aa", "bb")) {
| printf("Yallah!\n");
| } else {
| printf("Nooyah!\n");
| }
| return 0;
| }
And during compile I get:
| /tmp/ccKutWaR.o(.text+0x1e): In function `main':
| : the 'strcmp' function supports only C|POSIX locales
I changed it to this, although I am not familiar with locales, this
*should* work:
| #include <stdio.h>
| #include <locale.h>
|
| int main () {
| setlocale(LC_ALL, "C");
| if (strcmp("aa", "bb")) {
| printf("Yallah!\n");
| } else {
| printf("Nooyah!\n");
| }
| return 0;
| }
And now it says:
| /tmp/cceyB8fy.o(.text+0x1b): In function `main':
| : the 'setlocale' function supports only C|POSIX locales
| /tmp/cceyB8fy.o(.text+0x30): In function `main':
| : the 'strcmp' function supports only C|POSIX locales
I even added 'locale' to the Makefile of my testprogram, so I see what
locale it uses when invoking the compiler, all LC_* and LANG settings
are set to "C".
I tried using 'strcasecmp'. The compile-warnings/errors go away then,
but the resulting binaries (ebtables/iptables) still do not work.
But still it is weird that my test program /does/ work. *raah*:
| # ./bla
| Yallah!
| Nooyah!
| #
Help :)
Regards,
Sander.
--
| Visitors always give pleasure: if not on arrival, then on the departure.
| 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8 9BDB D463 7E41 08CE C94D
More information about the uClibc
mailing list