Re: IBM z/OS compatibility issues

2020-01-08 Thread Daniel Richard G.
Apologies for the delay; holiday travel kept me occupied! On Sat, 2019 Dec 14 08:51-05:00, Bruno Haible wrote: > > > This sounds good. It would imply broadening the scope of the script > > beyond just working around the -c -o limitation, but then it was > > always a curiosity that that has been th

Re: IBM z/OS compatibility issues - pthread

2019-12-20 Thread Bruno Haible
Hi Daniel, > > Can you please do a fresh start on this? > > - Create a testdir for module 'pthread-rwlock'. > > - Build it with -D_UNIX95_THREADS -D_XOPEN_SOURCE=600. > > That gives me the same compile error as a full build: > > source='/tmp/testdir/gltests/test-pthread.c' object='test-pthre

Re: IBM z/OS compatibility issues - per-thread locale functions

2019-12-19 Thread Bruno Haible
Hi Daniel, > config.h still has a > > #define HAVE_DUPLOCALE 1 > > line, however. This will be misleading for application code. Yes, there is a potential for application code to be misled. But - Any application code can do AC_CHECK_FUNCS_ONCE([duplocale]), and this would conflict with gnu

Re: IBM z/OS compatibility issues - pthread

2019-12-19 Thread Daniel Richard G.
On Sat, 2019 Dec 14 08:42-05:00, Bruno Haible wrote: > > > Something must be missing, because if I remove my conditional > > definition of PTHREAD_RWLOCK_INITIALIZER from pthread.in.h, > > test-pthread-rwlock is no longer in the set of tests built by > > default. > > I don't understand how that

Re: IBM z/OS compatibility issues - per-thread locale functions

2019-12-19 Thread Daniel Richard G.
On Sat, 2019 Dec 14 08:36-05:00, Bruno Haible wrote: > On Freitag, 13. Dezember 2019 15:33:42 CET Daniel Richard G. wrote: > > On Fri, 2019 Dec 13 05:32-05:00, Bruno Haible wrote: > > > > > > This should fix it. Thanks for the feedback. > > > > Arrrgh, not quite there yet >_< > > > > Tested Git

Re: IBM z/OS compatibility issues - pthread

2019-12-14 Thread Bruno Haible
On Freitag, 13. Dezember 2019 16:10:21 CET Daniel Richard G. wrote: > Hi Bruno, > > On Fri, 2019 Dec 13 07:43-05:00, Bruno Haible wrote: > > > > > I don't see "PTHREAD_RWLOCK_INITIALIZER_NP" anywhere in a clean Gnulib > > > tree, so I'm not sure how this could already be addressed... > > > > The

Re: IBM z/OS compatibility issues - per-thread locale functions

2019-12-14 Thread Bruno Haible
On Freitag, 13. Dezember 2019 15:33:42 CET Daniel Richard G. wrote: > On Fri, 2019 Dec 13 05:32-05:00, Bruno Haible wrote: > > > > This should fix it. Thanks for the feedback. > > Arrrgh, not quite there yet >_< > > Tested Git 83710ffa. test-locale now builds, but test-duplocale still > does no

Re: IBM z/OS compatibility issues

2019-12-14 Thread Bruno Haible
Hi Daniel, > > - Put the xlc-wrap logic into the 'compile' script. We should not > > have two different compile scripts, one for MSVC and one for z/OS. > > A single script should do it. > > This sounds good. It would imply broadening the scope of the script > beyond just working around

Re: IBM z/OS compatibility issues

2019-12-13 Thread Daniel Richard G.
On Fri, 2019 Dec 13 07:58-05:00, Bruno Haible wrote: > > You're asking good questions. However, I would like to suggest to > start simple and get the more complex things done afterwards. By > that, I mean: > > - Put the xlc-wrap logic into the 'compile' script. We should not > have two diff

Re: IBM z/OS compatibility issues - pthread

2019-12-13 Thread Daniel Richard G.
Hi Bruno, On Fri, 2019 Dec 13 07:43-05:00, Bruno Haible wrote: > > > I don't see "PTHREAD_RWLOCK_INITIALIZER_NP" anywhere in a clean Gnulib > > tree, so I'm not sure how this could already be addressed... > > The gnulib module 'pthread-rwlock' fixes this issue in a platform-independent > way (by

Re: IBM z/OS compatibility issues - per-thread locale functions

2019-12-13 Thread Daniel Richard G.
On Fri, 2019 Dec 13 05:32-05:00, Bruno Haible wrote: > > This should fix it. Thanks for the feedback. Arrrgh, not quite there yet >_< Tested Git 83710ffa. test-locale now builds, but test-duplocale still does not, failing in the same place. HAVE_WORKING_DUPLOCALE appears to be 1 (true). Isn't

Re: IBM z/OS compatibility issues

2019-12-13 Thread Bruno Haible
Hi Daniel, > > Do you have a set of configure settings that you would recommend on z/OS? > > So that we can add this info to the Gnow-How wiki [1]... > > There are quite a few, unfortunately. Before getting into them, however, > there is something I am not clear on: > > How should platform-speci

Re: IBM z/OS compatibility issues - pthread

2019-12-13 Thread Bruno Haible
Hi Daniel, > > Tell the package maintainers to import the gnulib module 'pthread- > > rwlock'. It will deal with the missing PTHREAD_RWLOCK_INITIALIZER; > > this issue occurs also on some older Solaris versions. > > If I omit that fragment, I get this build error: > > source='/tmp/testdir/gl

Re: IBM z/OS compatibility issues - per-thread locale functions

2019-12-13 Thread Bruno Haible
Daniel Richard G. wrote: > I can now get past the library build, but then get errors compiling > test-duplocale.c and test-locale.c. The former fails at line 26: > > SIGNATURE_CHECK (duplocale, locale_t, (locale_t)); > > The latter fails at line 49: > > locale_t b = LC_GLOBAL_LOCALE; >

Re: IBM z/OS compatibility issues - per-thread locale functions

2019-12-12 Thread Daniel Richard G.
Hi Bruno, On Thu, 2019 Dec 12 07:56-05:00, Bruno Haible wrote: > > The REPLACE_DUPLOCALE=1 is wrong. HAVE_DUPLOCALE should be 0, not only > when set by localename.m4 but also when set by duplocale.m4. This > patch should fix it. Tested with Git ea54538a. I can now get past the library build, but

Re: IBM z/OS compatibility issues - per-thread locale functions

2019-12-12 Thread Bruno Haible
Hi Daniel, > > 3) Please provide all three of the following: > > - grep locale configure.out > ... > > - grep -i locale config.status > > bash-2.03$ grep -i locale config.status > S["gl_LTLIBOBJS"]=" alphasort.lo asnprintf.lo at-func2.lo > canonicalize-lgpl.lo cnd.lo dirfd.lo

Re: IBM z/OS compatibility issues - miscellaneous bugs

2019-11-18 Thread Daniel Richard G.
On Sun, 2019 Nov 17 22:41-05:00, Bruno Haible wrote: > > > * C11 _Thread_local support is utterly broken (test-thread_local > > fails) > > I agree that these are bugs that are best discussed with the vendor. > > Should we add a workaround to the "check whether _Thread_local works" > autoconf test

Re: IBM z/OS compatibility issues - environment variables

2019-11-18 Thread Daniel Richard G.
On Sun, 2019 Nov 17 22:34-05:00, Bruno Haible wrote: > > > (There are other environment variables documented at the link above > > that may be of interest, but I have not found any additional ones to > > be necessary to fix issues in gnulib's test suite.) > > So, the gnulib tests for the math funct

Re: IBM z/OS compatibility issues - shell environment

2019-11-18 Thread Daniel Richard G.
On Sun, 2019 Nov 17 22:24-05:00, Bruno Haible wrote: > > > > The problem, however, is that shell scripting with this version > > of Bash can be a little tricky, because it doesn't fully > > embrace EBCDIC. ... These are the settings I used which allow > > things to work: > > > > _ENCODE_FILE_

Re: IBM z/OS compatibility issues - pthread

2019-11-18 Thread Daniel Richard G.
On Sun, 2019 Nov 17 22:18-05:00, Bruno Haible wrote: > > > More specifically, to get a suitable pthreads interface, you need to > > #define _UNIX95_THREADS and _XOPEN_SOURCE=600. > > I'd suggest to add this to the recommended values of CC and CXX in > https://gitlab.com/ghwiki/gnow-how/wikis/Platf

Re: IBM z/OS compatibility issues

2019-11-18 Thread Daniel Richard G.
On Sun, 2019 Nov 17 18:21-05:00, Bruno Haible wrote: > Hi Daniel, > > > The C99 mode (-qlanglvl=extc99) works without issue. That's what I've > > been using for all my testing. > > Do you have a set of configure settings that you would recommend on z/OS? > So that we can add this info to the Gnow

Re: IBM z/OS compatibility issues - per-thread locale functions

2019-11-18 Thread Daniel Richard G.
On Mon, 2019 Nov 18 06:41-05:00, Bruno Haible wrote: > Hi Daniel, > > > Locale-related configure findings: > > > > bash-2.03$ grep locale configure.out | fgrep -v '(cached)' > > checking for xlocale.h... no > > checking for duplocale... yes [...] > > checking whether wcrtomb works

Re: IBM z/OS compatibility issues - per-thread locale functions

2019-11-18 Thread Bruno Haible
Hi Daniel, > Locale-related configure findings: > > bash-2.03$ grep locale configure.out | fgrep -v '(cached)' > checking for xlocale.h... no > checking for duplocale... yes > checking for uselocale... yes > checking for newlocale... yes > checking for freelocale... yes >

Re: IBM z/OS compatibility issues - per-thread locale functions

2019-11-17 Thread Daniel Richard G.
Hi Bruno, On Sun, 2019 Nov 17 19:17-05:00, Bruno Haible wrote: > > This patch should do it. > > 2019-11-17 Bruno Haible > > locale, localename: Improve z/OS support. > Reported by Daniel Richard G. in > .

Re: IBM z/OS compatibility issues - miscellaneous bugs

2019-11-17 Thread Bruno Haible
Hi Daniel, > MISCELLANEOUS BUGS > > There are a handful of additional issues that I would like to mention > here for completeness, but am taking up primarily with IBM, rather than > this list. If anyone would like me to elaborate on any of these, please > feel free to ask: > > * [sys/]signal.h d

Re: IBM z/OS compatibility issues - environment variables

2019-11-17 Thread Bruno Haible
Hi Daniel, > ENVIRONMENT VARIABLES > > One annoyance on this platform is that the default behavior of things > can sometimes be weirdly different from other platforms, in a way which > breaks programs expecting normal Unix/POSIX behavior. Unfortunately, > IBM's response to this is often not "Let

Re: IBM z/OS compatibility issues - shell environment

2019-11-17 Thread Bruno Haible
Hello Daniel, > SHELL SCRIPTING SNAFUS > > In the z/OS environment, if you want to use a proper Bash shell, you > typically get the build provided by Rocket Software: > > https://www.rocketsoftware.com/product-categories/mainframe/bash-zos > > The problem, however, is that shell scripting w

Re: IBM z/OS compatibility issues - pthread

2019-11-17 Thread Bruno Haible
Hello Daniel, > PTHREAD ENVIRONMENT > > z/OS has effectively two major pthread interfaces: _OPEN_THREADS, and > _UNIX95_THREADS. The latter is the one you want to use, because its API > is compatible with other systems. (_OPEN_THREADS uses e.g. a different > signature for pthread_getspecific() th

Re: IBM z/OS compatibility issues - per-thread locale functions

2019-11-17 Thread Bruno Haible
Hello Daniel, > BROKEN LOCALE FUNCTIONS > > The configure script finds the following: > > checking for xlocale.h... no > checking for duplocale... yes > checking for uselocale... yes > checking for newlocale... yes > checking for freelocale... yes > > checking whether lo

Re: IBM z/OS compatibility issues

2019-11-17 Thread Bruno Haible
Hi Daniel, > The C99 mode (-qlanglvl=extc99) works without issue. That's what I've > been using for all my testing. Do you have a set of configure settings that you would recommend on z/OS? So that we can add this info to the Gnow-How wiki [1]... Bruno [1] https://gitlab.com/ghwiki/gnow-how/wik

Re: IBM z/OS compatibility issues

2019-11-08 Thread Daniel Richard G.
(Apologies for the delayed response) On Wed, 2019 Nov 6 14:32-05:00, Paul Eggert wrote: > > IBM's user guide for the compiler > , > > dated 2019-06-26, states the following on page 153: > >

Re: IBM z/OS compatibility issues

2019-11-06 Thread Paul Eggert
On 11/6/19 6:57 AM, Daniel Richard G. wrote: Confirmed that the compiler sets __STDC_VERSION__ == 201112 without actually supporting that level. IBM's user guide for the compiler , dated 20

Re: IBM z/OS compatibility issues

2019-11-06 Thread Daniel Richard G.
On Tue, 2019 Nov 5 17:23-05:00, Paul Eggert wrote: > That's quite a list of compatibility issues, and I don't envy you the > job of porting to that platform. The necessary detective work is done; I only need help with integrating the know-how into Gnulib. I attempted to prepare a patch to address

Re: IBM z/OS compatibility issues

2019-11-05 Thread Paul Eggert
That's quite a list of compatibility issues, and I don't envy you the job of porting to that platform. One little area I may be able to help out is here: On 11/5/19 10:03 AM, Daniel Richard G. wrote: * IBM XLC compiler does not support the C11 _Alignas() specifier, I take it that the compil

IBM z/OS compatibility issues

2019-11-05 Thread Daniel Richard G.
Hello list, I have been testing gnulib on IBM z/OS in recent days, and have found a few compatibility issues (some old, some new) that I'd like to address here. This is intended to be a comprehensive review, so it will be a little long; please bear with me! BROKEN LOCALE FUNCTIONS The configur