bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: GNU lib - z/OS thread related fix


From: Harithamma D
Subject: RE: GNU lib - z/OS thread related fix
Date: Thu, 16 Mar 2023 08:11:46 +0000

Hi Bruno,

 

Thank you for the quick and detailed response. It helped me.

 

Yes, there was a local modification which triggered this issue. I fixed it and m4 is building successfully.

Thanks again for all the help.

 

Regards,

Haritha

 

From: Bruno Haible <bruno@clisp.org>
Date: Saturday, 11 March 2023 at 12:09 AM
To: bug-gnulib@gnu.org <bug-gnulib@gnu.org>, Harithamma D <Harithamma.D@ibm.com>
Cc: Igor Todorovski <itodorov@ca.ibm.com>, Mike Fulton <fultonm@ca.ibm.com>
Subject: [EXTERNAL] Re: GNU lib - z/OS thread related fix

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]