/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2006 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#if defined __EMX__
/* Assume EMX program runs on OS/2, even if compiled under DOS. */
-# define OS2
+# ifndef OS2
+# define OS2
+# endif
#endif
#if !defined WIN32_NATIVE
# if HAVE_LANGINFO_CODESET
# include <langinfo.h>
# else
-# if HAVE_SETLOCALE
+# if 0 /* see comment below */
# include <locale.h>
# endif
# endif
(like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
use setlocale here; it would return "C" when it doesn't support the
locale name the user has set. */
-# if HAVE_SETLOCALE && 0
+# if 0
locale = setlocale (LC_CTYPE, NULL);
# endif
if (locale == NULL || locale[0] == '\0')