aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32-gettext.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-01-18 15:10:37 +0000
committerWerner Koch <[email protected]>2010-01-18 15:10:37 +0000
commit0fe34500c2dcdcf274c2485dfda28127e77e7c14 (patch)
tree1caa11aaf4d67df434769118c9a7dbfcfa9b0588 /src/w32-gettext.c
parentResolved changelog conflict (diff)
downloadlibgpg-error-0fe34500c2dcdcf274c2485dfda28127e77e7c14.tar.gz
libgpg-error-0fe34500c2dcdcf274c2485dfda28127e77e7c14.zip
Add some code to build nativley under WindowsCE - not finished.
Diffstat (limited to 'src/w32-gettext.c')
-rw-r--r--src/w32-gettext.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/w32-gettext.c b/src/w32-gettext.c
index 03ef24d..1b6eb3d 100644
--- a/src/w32-gettext.c
+++ b/src/w32-gettext.c
@@ -68,7 +68,9 @@
#endif
#include <stdlib.h>
-#include <locale.h>
+#ifndef HAVE_W32CE_SYSTEM
+# include <locale.h>
+#endif
#ifdef HAVE_W32_SYSTEM
# include <windows.h>
@@ -776,6 +778,7 @@ _nl_locale_name (int category, const char *categoryname)
/* Let the user override the system settings through environment
variables, as on POSIX systems. */
+#ifndef HAVE_W32CE_SYSTEM
retval = getenv ("LC_ALL");
if (retval != NULL && retval[0] != '\0')
return retval;
@@ -785,9 +788,14 @@ _nl_locale_name (int category, const char *categoryname)
retval = getenv ("LANG");
if (retval != NULL && retval[0] != '\0')
return retval;
+#endif /*!HAVE_W32CE_SYSTEM*/
/* Use native Win32 API locale ID. */
+#ifdef HAVE_W32CE_SYSTEM
+ lcid = GetSystemDefaultLCID ();
+#else
lcid = GetThreadLocale ();
+#endif
/* Strip off the sorting rules, keep only the language part. */
langid = LANGIDFROMLCID (lcid);