harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r658640 - /harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hynlshelpers.c
Date Wed, 21 May 2008 11:56:42 GMT
Author: odeakin
Date: Wed May 21 04:56:41 2008
New Revision: 658640

URL: http://svn.apache.org/viewvc?rev=658640&view=rev
Log:
Ensure the correct locale name on z/OS.

Modified:
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hynlshelpers.c

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hynlshelpers.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hynlshelpers.c?rev=658640&r1=658639&r2=658640&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hynlshelpers.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hynlshelpers.c
Wed May 21 04:56:41 2008
@@ -99,6 +99,18 @@
 #else
   /* Query locale data */
   lang = setlocale (LC_CTYPE, NULL);
+
+#if defined (ZOS)
+  if (NULL != lang) {
+    /* z/OS sometimes returns the HFS path to a "locale object" so carve it up to make it
look like the corresponding locale name */
+    char *lastSlash = strrchr(lang, '/');
+
+    if (NULL != lastSlash) {
+      lang = lastSlash + 1;
+    }
+  }
+#endif /* defined (ZOS) */
+
 #endif /* LINUX */
 
 



Mime
View raw message