[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU lib - z/OS thread related fix
From: |
Bruno Haible |
Subject: |
Re: GNU lib - z/OS thread related fix |
Date: |
Fri, 10 Mar 2023 19:39:12 +0100 |
Hi Harithamma,
> PFA zip with all files.
> I have not configured --enable-threads option.
Thank you.
>From the included configure file, I can see that you are using a recent m4
snapshot. Good.
>From the config.h file, I can see that none of the macros
USE_ISOC_THREADS
USE_POSIX_THREADS
USE_ISOC_AND_POSIX_THREADS
USE_WINDOWS_THREADS
is defined. This is the same as when I compile packages on glibc systems with
--disable-threads.
(In a later step, this can be improved, to make use of the POSIX threads
functionality in z/OS. But since m4 is a single-threaded program, this is
not relevant at this point.)
But when I compile a recent m4 snapshot on a glibc systems with
--disable-threads, there is no compilation error. This part of glthread/thread.h
provides a definition of 'gl_thread_t':
/* ========================================================================= */
#if !(USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS ||
USE_WINDOWS_THREADS)
/* Provide dummy implementation if threads are not supported. */
typedef int gl_thread_t;
# define glthread_create(THREADP, FUNC, ARG) ENOSYS
# define glthread_sigmask(HOW, SET, OSET) 0
# define glthread_join(THREAD, RETVALP) 0
# define gl_thread_self() 0
# define gl_thread_self_pointer() \
((void *) gl_thread_self ())
# define gl_thread_exit(RETVAL) (void)0
# define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0
#endif
/* ========================================================================= */
Somehow, this part of the file appears to be absent or ineffective in your
compilation. In other words, I suspect that a local modification of the
source code on your side causes the compilation error.
To track down exactly what's happening, you can use the compilation command
with the -c and -o options removed and a -E option added:
xlclang -DEXEEXT=\"\" -DEXEEXT=\"\" -I. -I../lib -DIN_M4_GNULIB_TESTS=1 -I.
-I. -I.. -I./.. -I../lib -I./../lib -DNSIG=42 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE
-D_OPEN_SYS_FILE_EXT=1 -D_AE_BIMODAL=1 -D_ENHANCED_ASCII_EXT=0xFFFFFFFF
-qascii -std=gnu11 -qnocsect -qenum=int -qgonumber -O3 -qnose -std=c11
-fgnu89-inline
-I/home/haritha/code/m4port/m4/lib,/home/haritha/code/m4port/patches/PR1/include,/usr/include/le
-E glthread/thread.c > i
and look at the 'i' file, specially taking note of lines that start with '#'
and that indicate which .h file was included.
Bruno