Mark,
$ cat > x.c << EOF
#define _GNU_SOURCE
#include <string.h>
EOF
$ gcc -c x.c
No its not compiling and giving the same __locale error.
BTW when I do these step
1)in libxstrndup.c add #define __USE_XOPEN2K8;#undef __USE_GNU
2)in /usr/include/stdio.h add #undef __USE_GNU
3)in /usr/include/string.h add #define __USE_XOPEN2K8
Then the problems (attached) comes.
Regards
Ranjit Kumar
System Performance Analysis Group
Freescale Semiconductors
India