You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by od...@apache.org on 2008/05/21 13:56:42 UTC
svn commit: r658640 -
/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hynlshelpers.c
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 */