changeset 5419:8aa77b30443e

. OpenBSD supports only the "C" and "POSIX" locales for all but the LC_CTYPE locale.
author kurt
date Fri, 11 Jan 2013 08:54:50 -0500
parents bc7fe24c4435
children 888137df1fae
files src/solaris/native/java/lang/java_props_md.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/java/lang/java_props_md.c	Fri Jan 11 08:52:46 2013 -0500
+++ b/src/solaris/native/java/lang/java_props_md.c	Fri Jan 11 08:54:50 2013 -0500
@@ -151,7 +151,7 @@
     lc = setlocale(cat, NULL);
 #endif
 
-#ifndef __linux__
+#if !defined(__linux__) && !defined(__OpenBSD__)
     if (lc == NULL) {
         return 0;
     }
@@ -484,12 +484,19 @@
                     &(sprops.format_country),
                     &(sprops.format_variant),
                     &(sprops.encoding))) {
+#ifdef __OpenBSD__
+        sprops.language = sprops.format_language;
+        sprops.script = sprops.format_script;
+        sprops.country = sprops.format_country;
+        sprops.variant = sprops.format_variant;
+#else
         ParseLocale(LC_MESSAGES,
                     &(sprops.language),
                     &(sprops.script),
                     &(sprops.country),
                     &(sprops.variant),
                     NULL);
+#endif
     } else {
         sprops.language = "en";
         sprops.encoding = "ISO8859-1";