aboutsummaryrefslogtreecommitdiff
path: root/libX11/src/SetLocale.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-11-25 12:10:25 +0100
committermarha <marha@users.sourceforge.net>2013-11-25 12:10:25 +0100
commit0f333fb1102f4886a8ce39f3c09b12e89e5a7f19 (patch)
tree8239768e506a03837019c4f02c8ab949c04a0818 /libX11/src/SetLocale.c
parent7dbaa1cffdf176f803f2c7069fb6810e16a86f72 (diff)
parenta473b885d641b9c1ea57f2ae53f9ba7f2958cce2 (diff)
downloadvcxsrv-0f333fb1102f4886a8ce39f3c09b12e89e5a7f19.tar.gz
vcxsrv-0f333fb1102f4886a8ce39f3c09b12e89e5a7f19.tar.bz2
vcxsrv-0f333fb1102f4886a8ce39f3c09b12e89e5a7f19.zip
Merge remote-tracking branch 'origin/released'
* origin/released: libX11 xserver mesa libXinerama libXmu mkfontscale git update 25 nov 2013 Conflicts: libXinerama/src/Xinerama.c
Diffstat (limited to 'libX11/src/SetLocale.c')
-rw-r--r--libX11/src/SetLocale.c53
1 files changed, 1 insertions, 52 deletions
diff --git a/libX11/src/SetLocale.c b/libX11/src/SetLocale.c
index 64166bda0..40ea3ac4d 100644
--- a/libX11/src/SetLocale.c
+++ b/libX11/src/SetLocale.c
@@ -67,58 +67,8 @@ from The Open Group.
#define MAXLOCALE 64 /* buffer size of locale name */
-#ifdef X_LOCALE
-/* alternative setlocale() for when the OS does not provide one */
-
-char *
-_Xsetlocale(
- int category,
- _Xconst char *name
-)
-{
- static char *xsl_name;
- char *old_name;
- XrmMethods methods;
- XPointer state;
-
- if (category != LC_CTYPE && category != LC_ALL)
- return NULL;
- if (!name) {
- if (xsl_name)
- return xsl_name;
- return "C";
- }
- if (!*name)
- name = getenv("LC_CTYPE");
- if (!name || !*name)
- name = getenv("LANG");
- if (name && strlen(name) >= MAXLOCALE)
- name = NULL;
- if (!name || !*name || !_XOpenLC((char *) name))
- name = "C";
- old_name = xsl_name;
- xsl_name = (char *)name;
- methods = _XrmInitParseInfo(&state);
- xsl_name = old_name;
- if (!methods)
- return NULL;
- name = (*methods->lcname)(state);
- xsl_name = strdup(name);
- if (!xsl_name) {
- xsl_name = old_name;
- (*methods->destroy)(state);
- return NULL;
- }
- if (old_name)
- Xfree(old_name);
- (*methods->destroy)(state);
- return xsl_name;
-}
-
-#else /* X_LOCALE */
-
-#if defined(__APPLE__) || defined(__CYGWIN__)
+#if defined(__APPLE__) || defined(__CYGWIN__) || defined(_MSC_VER)
char *
_Xsetlocale(
int category,
@@ -251,4 +201,3 @@ _XlcMapOSLocaleName(
return osname;
}
-#endif /* X_LOCALE */