cc -pthread -Wall -Wextra getlocalename_l.c -o getlocalename_l -D_GNU_SOURCE -D_BSD_SOURCE -D_ALL_SOURCE -D_DEFAULT_SOURCE -lm -lpthread -lrt -lintl -liconv relibc getrlimit(3, 0x7ffffffffc70): not implemented relibc getrlimit(3, 0x7ffffffffb80): not implemented relibc getrlimit(9, 0x7ffffffffb40): not implemented relibc getrlimit(9, 0x7ffffffffb70): not implemented relibc getrlimit(5, 0x7ffffffffb70): not implemented relibc getrlimit(9, 0x7ffffffffb40): not implemented getlocalename_l.c: In function 'main': getlocalename_l.c:9:28: warning: implicit declaration of function 'getlocalename_l' [-Wimplicit-function-declaration] 9 | const char* name = getlocalename_l(LC_COLLATE, LC_GLOBAL_LOCALE); | ^~~~~~~~~~~~~~~ getlocalename_l.c:9:56: error: 'LC_GLOBAL_LOCALE' undeclared (first use in this function) 9 | const char* name = getlocalename_l(LC_COLLATE, LC_GLOBAL_LOCALE); | ^~~~~~~~~~~~~~~~ getlocalename_l.c:9:56: note: each undeclared identifier is reported only once for each function it appears in getlocalename_l.c:14:9: error: unknown type name 'locale_t' 14 | locale_t locale = newlocale(LC_COLLATE_MASK, "C", (locale_t) 0); | ^~~~~~~~ getlocalename_l.c:14:27: warning: implicit declaration of function 'newlocale'; did you mean 'setlocale'? [-Wimplicit-function-declaration] 14 | locale_t locale = newlocale(LC_COLLATE_MASK, "C", (locale_t) 0); | ^~~~~~~~~ | setlocale getlocalename_l.c:14:37: error: 'LC_COLLATE_MASK' undeclared (first use in this function); did you mean 'LC_COLLATE'? 14 | locale_t locale = newlocale(LC_COLLATE_MASK, "C", (locale_t) 0); | ^~~~~~~~~~~~~~~ | LC_COLLATE getlocalename_l.c:14:60: error: 'locale_t' undeclared (first use in this function); did you mean 'locale'? 14 | locale_t locale = newlocale(LC_COLLATE_MASK, "C", (locale_t) 0); | ^~~~~~~~ | locale getlocalename_l.c:14:69: error: expected ')' before numeric constant 14 | locale_t locale = newlocale(LC_COLLATE_MASK, "C", (locale_t) 0); | ~ ^~ | ) getlocalename_l.c:15:34: error: expected ')' before numeric constant 15 | if ( locale == (locale_t) 0 ) | ~ ^~ | ) getlocalename_l.c:17:14: warning: assignment to 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 17 | name = getlocalename_l(LC_COLLATE, locale); | ^