fix namespace conflict

This commit is contained in:
tg 2008-03-28 18:47:52 +00:00
parent 5728495366
commit 66f8c8475e

12
main.c
View File

@ -13,7 +13,7 @@
#include <locale.h> #include <locale.h>
#endif #endif
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.93 2008/03/25 21:34:44 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/main.c,v 1.94 2008/03/28 18:47:52 tg Exp $");
extern char **environ; extern char **environ;
@ -290,14 +290,14 @@ main(int argc, const char *argv[])
(stristr((x), "UTF-8") || stristr((x), "utf8"))) (stristr((x), "UTF-8") || stristr((x), "utf8")))
/* Check if we're in a UTF-8 locale */ /* Check if we're in a UTF-8 locale */
if (!Flag(FUTFHACK)) { if (!Flag(FUTFHACK)) {
const char *cp; const char *ccp;
cp = setlocale(LC_CTYPE, ""); ccp = setlocale(LC_CTYPE, "");
#if HAVE_LANGINFO_CODESET #if HAVE_LANGINFO_CODESET
if (!isuc(cp)) if (!isuc(ccp))
cp = nl_langinfo(CODESET); ccp = nl_langinfo(CODESET);
#endif #endif
Flag(FUTFHACK) = isuc(cp); Flag(FUTFHACK) = isuc(ccp);
} }
#undef isuc #undef isuc
#endif #endif