Date: Fri, 24 Jan 2003 06:52:10 +0600 From: Max Khon <fjoe@iclub.nsu.ru> To: "M. Warner Losh" <imp@bsdimp.com> Cc: eischen@pcnet1.pcnet.com, ben@timing.com, freebsd-arch@freebsd.org Subject: Re: _REENTRANT in math.h & libm oddities. Message-ID: <20030124065210.B44070@iclub.nsu.ru> In-Reply-To: <20030123.144933.13389746.imp@bsdimp.com>; from imp@bsdimp.com on Thu, Jan 23, 2003 at 02:49:33PM -0700 References: <200301232122.h0NLM31e003077@harmony.village.org> <Pine.GSO.4.10.10301231630590.17662-100000@pcnet1.pcnet.com> <20030123.144933.13389746.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
hi, there!
On Thu, Jan 23, 2003 at 02:49:33PM -0700, M. Warner Losh wrote:
> : I removed a lot of the _THREAD_SAFE stuff a couple of years ago,
> : but it wasn't complete removed. -stable might be worse off.
>
> In a newish tree it looks like there are only 3 'real' places where
> we're wrong:
>
> find . -type f | xargs egrep _THREAD_SAFE
>
> code:
>
> ./contrib/ntp/ntpd/refclock_pcf.c:#if defined(_REENTRANT) || defined(_THREAD_SAFE)
this is contrib
> ./include/rpc/clnt.h:#ifdef _THREAD_SAFE
> ./include/rpc/clnt.h:#endif /* _THREAD_SAFE */
this should be removed (only _THREAD_SAFE should be left)
I'll take care if there will be no objections
> ./lib/libc_r/sys/uthread_error.c:#ifdef _THREAD_SAFE
> ./lib/libpthread/sys/thr_error.c:#ifdef _THREAD_SAFE
> ./lib/libc_r/Makefile:CFLAGS+=-DPTHREAD_KERNEL -D_THREAD_SAFE
> ./lib/libmilter/Makefile:CFLAGS+=-D_THREAD_SAFE
> ./lib/libpthread/Makefile:CFLAGS+=-DPTHREAD_KERNEL -D_THREAD_SAFE
this can be safely removed
I'll take care if there will be no objections
> docs or config or false positive:
>
> ./contrib/gcc/gcc.1:into user-threaded processes should be compiled with -D_THREAD_SAFE.
> ./contrib/gcc/gcc.1:-D_THREAD_SAFE.
not sure about this. also -kthread statement should be removed
this is contrib anyway
> ./contrib/gcc/config/rs6000/aix41.h: %{pthread: -D_THREAD_SAFE}\
> ./contrib/gcc/config/rs6000/aix43.h: %{pthread: -D_THREAD_SAFE}\
> ./contrib/gcc/config/rs6000/aix43.h: %{pthread: -D_THREAD_SAFE}\
> ./contrib/gcc/config/rs6000/aix51.h: %{pthread: -D_THREAD_SAFE}\
> ./contrib/gcc/config/rs6000/aix51.h: %{pthread: -D_THREAD_SAFE}\
> ./contrib/gcc/gthr-aix.h:#ifdef _THREAD_SAFE
> ./crypto/heimdal/configure: dpagaix_cflags="-D_THREAD_SAFE -D_AIX_PTHREADS_D7 -D_AIX32_THREADS=1 -D_AES_SOURCE -D_AIX41 -I/usr/include/dce"
> ./crypto/heimdal/configure.in: dpagaix_cflags="-D_THREAD_SAFE -D_AIX_PTHREADS_D7 -D_AIX32_THREADS=1 -D_AES_SOURCE -D_AIX41 -I/usr/include/dce"
these are not related to FreeBSD
> ./crypto/openssl/Configure:"FreeBSD-elf", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
this is contrib
> ./crypto/openssl/crypto/rsa/rsa.h:#define RSA_FLAG_THREAD_SAFE 0x10
> ./include/unistd.h:#define _POSIX_THREAD_SAFE_FUNCTIONS -1
> ./include/unistd.h:#define _SC_THREAD_SAFE_FUNCTIONS 91 /* user */
> ./lib/libc/gen/sysconf.c:#if _POSIX_THREAD_SAFE_FUNCTIONS > -1
> ./lib/libc/gen/sysconf.c: case _SC_THREAD_SAFE_FUNCTIONS:
> ./lib/libc/gen/sysconf.c: return (_POSIX_THREAD_SAFE_FUNCTIONS);
> ./usr.bin/getconf/sysconf.gperf:_POSIX_THREAD_SAFE_FUNCTIONS, _SC_THREAD_SAFE_FUNCTIONS
these are not "_THREAD_SAFE" (you could use '\<_THREAD_SAFE\>' pattern)
/fjoe
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030124065210.B44070>
