cc -pthread -Wall -Wextra uselocale.c -o uselocale -D_GNU_SOURCE -D_BSD_SOURCE -D_ALL_SOURCE -D_DEFAULT_SOURCE -lm -lpthread -liconv uselocale.c:9:2: error: use of undeclared identifier 'locale_t' locale_t locale = newlocale(LC_ALL_MASK, "C", (locale_t) 0); ^ uselocale.c:10:18: error: use of undeclared identifier 'locale_t' if ( locale == (locale_t) 0 ) ^ uselocale.c:10:7: error: use of undeclared identifier 'locale' if ( locale == (locale_t) 0 ) ^ uselocale.c:12:2: error: use of undeclared identifier 'locale_t' locale_t old_locale = uselocale(locale); ^ uselocale.c:13:7: error: use of undeclared identifier 'old_locale' if ( old_locale != LC_GLOBAL_LOCALE ) ^ uselocale.c:13:21: error: use of undeclared identifier 'LC_GLOBAL_LOCALE' if ( old_locale != LC_GLOBAL_LOCALE ) ^ uselocale.c:15:2: error: use of undeclared identifier 'old_locale' old_locale = uselocale((locale_t) 0); ^ uselocale.c:15:15: error: implicit declaration of function 'uselocale' is invalid in C99 [-Werror,-Wimplicit-function-declaration] old_locale = uselocale((locale_t) 0); ^ uselocale.c:15:15: note: did you mean 'setlocale'? /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/locale.h:53:8: note: 'setlocale' declared here char *setlocale(int, const char *); ^ uselocale.c:15:26: error: use of undeclared identifier 'locale_t' old_locale = uselocale((locale_t) 0); ^ uselocale.c:16:7: error: use of undeclared identifier 'old_locale' if ( old_locale != locale ) ^ uselocale.c:16:21: error: use of undeclared identifier 'locale' if ( old_locale != locale ) ^ 11 errors generated.