cc -pthread -Wall -Wextra duplocale.c -o duplocale -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 duplocale.c: In function 'main': duplocale.c:9:9: error: unknown type name 'locale_t' 9 | locale_t locale1 = duplocale(LC_GLOBAL_LOCALE); | ^~~~~~~~ duplocale.c:9:28: warning: implicit declaration of function 'duplocale'; did you mean 'setlocale'? [-Wimplicit-function-declaration] 9 | locale_t locale1 = duplocale(LC_GLOBAL_LOCALE); | ^~~~~~~~~ | setlocale duplocale.c:9:38: error: 'LC_GLOBAL_LOCALE' undeclared (first use in this function) 9 | locale_t locale1 = duplocale(LC_GLOBAL_LOCALE); | ^~~~~~~~~~~~~~~~ duplocale.c:9:38: note: each undeclared identifier is reported only once for each function it appears in duplocale.c:10:26: error: 'locale_t' undeclared (first use in this function); did you mean 'locale1'? 10 | if ( locale1 == (locale_t) 0 ) | ^~~~~~~~ | locale1 duplocale.c:10:35: error: expected ')' before numeric constant 10 | if ( locale1 == (locale_t) 0 ) | ~ ^~ | ) duplocale.c:12:17: error: expected ';' before 'locale2' 12 | locale_t locale2 = duplocale(locale1); | ^~~~~~~~ | ; duplocale.c:13:14: error: 'locale2' undeclared (first use in this function); did you mean 'locale1'? 13 | if ( locale2 == (locale_t) 0 ) | ^~~~~~~ | locale1 duplocale.c:13:35: error: expected ')' before numeric constant 13 | if ( locale2 == (locale_t) 0 ) | ~ ^~ | ) duplocale.c:15:17: error: expected ';' before 'locale3' 15 | locale_t locale3 = newlocale(LC_ALL_MASK, "C", (locale_t) 0); | ^~~~~~~~ | ; duplocale.c:16:14: error: 'locale3' undeclared (first use in this function); did you mean 'locale1'? 16 | if ( locale3 == (locale_t) 0 ) | ^~~~~~~ | locale1 duplocale.c:16:35: error: expected ')' before numeric constant 16 | if ( locale3 == (locale_t) 0 ) | ~ ^~ | ) duplocale.c:18:17: error: expected ';' before 'locale4' 18 | locale_t locale4 = duplocale(locale3); | ^~~~~~~~ | ; duplocale.c:19:14: error: 'locale4' undeclared (first use in this function); did you mean 'locale1'? 19 | if ( locale4 == (locale_t) 0 ) | ^~~~~~~ | locale1 duplocale.c:19:35: error: expected ')' before numeric constant 19 | if ( locale4 == (locale_t) 0 ) | ~ ^~ | ) duplocale.c:21:9: warning: implicit declaration of function 'freelocale'; did you mean 'setlocale'? [-Wimplicit-function-declaration] 21 | freelocale(locale1); | ^~~~~~~~~~ | setlocale