Hi Bruno,
Yes, you’re right — locale_t is not yet part of the official z/OS runtime API. 
However, we do have a library called 
zoslib<https://github.com/ibmruntimes/zoslib> which provides implementations 
for many POSIX APIs not natively available on z/OS. The locale_t type and 
related functions, including getlocalename_l, are implemented as part of this 
library.
That said, I'm encountering an issue while building Coreutils. From the 
configure log, it correctly detects that getlocalename_l is available and 
functional. However, the gnulib-test target fails with the same error mentioned 
previously.
I suspect this is related to the conditional macros:
GL_COND_OBJ_GETLOCALENAME_L_UNSAFE_LIMITED_TRUE='#'
GL_COND_OBJ_GETLOCALENAME_L_UNSAFE_LIMITED_FALSE=''
Any guidance or suggestions on addressing this would be greatly appreciated.
Best Regards
Sachin

From: Bruno Haible <br...@clisp.org>
Date: Friday, 11 April 2025 at 4:26 AM
To: bug-gnulib@gnu.org <bug-gnulib@gnu.org>, Sachin T <sachi...@ibm.com>
Cc: Daniel Richard G. <sk...@iskunk.org>
Subject: [EXTERNAL] Re: Build failure on IBM z/OS
Hi,

Sachin T wrote:
> I'm encountering a build failure while trying to compile Coreutils v9.7 on 
> IBM z/OS version 2.4. The error message is:
> “Please port gnulib getlocalename_l-unsafe.c to your platform! Report this to 
> bug-gnulib”.
> Kindly advise on the recommended approach or if a patch is planned.

We can't patch it without your help, since none of us has access to a z/OS
machine.

In this mail thread from 2019
<https://lists.gnu.org/r/bug-gnulib/2019-12/msg00174.html  >
we observed that z/OS has a newlocale() function declared, but that it is
useless since the header files don't define the 'locale_t' type.

AFAIU, the header files on your machine now have the 'locale_t' type
(otherwise Gnulib would have defined GNULIB_defined_locale_t), probably
in <locale.h>.

But newlocale() is not documented in the z/OS documentation [1].

Therefore the main question is: Is the 'locale_t' type and its
associated functions now usable in z/OS or not?

Bruno

[1] https://www.ibm.com/docs/en/SSLTBW_3.1.0/pdf/bpxbd00_v3r1.pdf



Reply via email to