From owner-freebsd-arch Thu Jan 23 16:52:45 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E55CD37B401 for ; Thu, 23 Jan 2003 16:52:42 -0800 (PST) Received: from mail.nsu.ru (mx.nsu.ru [193.124.215.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CAA443ED8 for ; Thu, 23 Jan 2003 16:52:40 -0800 (PST) (envelope-from fjoe@iclub.nsu.ru) Received: from drweb by mail.nsu.ru with drweb-scanned (Exim 3.20 #1) id 18bs4z-0006jn-00; Fri, 24 Jan 2003 06:52:21 +0600 Received: from iclub.nsu.ru ([193.124.215.97] ident=root) by mail.nsu.ru with esmtp (Exim 3.20 #1) id 18bs4y-0006jO-00; Fri, 24 Jan 2003 06:52:20 +0600 Received: from iclub.nsu.ru (fjoe@localhost [127.0.0.1]) by iclub.nsu.ru (8.12.6/8.12.6) with ESMTP id h0O0qCRV044707; Fri, 24 Jan 2003 06:52:12 +0600 (NS) (envelope-from fjoe@iclub.nsu.ru) Received: (from fjoe@localhost) by iclub.nsu.ru (8.12.6/8.12.6/Submit) id h0O0qA3v044706; Fri, 24 Jan 2003 06:52:10 +0600 (NS) Date: Fri, 24 Jan 2003 06:52:10 +0600 From: Max Khon To: "M. Warner Losh" 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> References: <200301232122.h0NLM31e003077@harmony.village.org> <20030123.144933.13389746.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20030123.144933.13389746.imp@bsdimp.com>; from imp@bsdimp.com on Thu, Jan 23, 2003 at 02:49:33PM -0700 X-Spam-Status: No, hits=-1.7 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01, SUPERLONG_LINE,UPPERCASE_25_50,USER_AGENT,USER_AGENT_MUTT version=2.43 X-Envelope-To: imp@bsdimp.com, eischen@pcnet1.pcnet.com, ben@timing.com, freebsd-arch@freebsd.org Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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