From f106775df14dbd1af2f1e0d3b1b3c67c167f8ce0 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 16 Aug 2002 04:49:08 +0000 Subject: Replace all instances of _LIBC_REENTRANT with __UCLIBC_HAS_THREADS__ -Erik --- libc/inet/rpc/rcmd.c | 20 ++++++++++---------- libc/sysdeps/linux/common/bits/errno.h | 2 +- libc/sysdeps/linux/i386/syscall.S | 8 ++++---- libc/sysdeps/linux/i386/vfork.S | 8 ++++---- libc/sysdeps/linux/mips/bits/errno.h | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) (limited to 'libc') diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c index de7433d46..b8138497c 100644 --- a/libc/inet/rpc/rcmd.c +++ b/libc/inet/rpc/rcmd.c @@ -38,8 +38,8 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94"; #define __FORCE_GLIBC #include -#ifdef _LIBC_REENTRANT -#undef _LIBC_REENTRANT +#ifdef __UCLIBC_HAS_THREADS__ +#undef __UCLIBC_HAS_THREADS__ #warning FIXME I am not reentrant yet... #endif @@ -81,7 +81,7 @@ int rcmd(ahost, rport, locuser, remuser, cmd, fd2p) const char *locuser, *remuser, *cmd; int *fd2p; { -#ifdef _LIBC_REENTRANT +#ifdef __UCLIBC_HAS_THREADS__ int herr; struct hostent hostbuf; size_t hstbuflen; @@ -97,7 +97,7 @@ int rcmd(ahost, rport, locuser, remuser, cmd, fd2p) pid = getpid(); -#ifdef _LIBC_REENTRANT +#ifdef __UCLIBC_HAS_THREADS__ hstbuflen = 1024; #ifdef __UCLIBC_HAS_MMU__ tmphstbuf = alloca (hstbuflen); @@ -304,14 +304,14 @@ int ruserok(rhost, superuser, ruser, luser) struct hostent *hp; u_int32_t addr; char **ap; -#ifdef _LIBC_REENTRANT +#ifdef __UCLIBC_HAS_THREADS__ size_t buflen; char *buffer; int herr; struct hostent hostbuf; #endif -#ifdef _LIBC_REENTRANT +#ifdef __UCLIBC_HAS_THREADS__ buflen = 1024; #ifdef __UCLIBC_HAS_MMU__ buffer = alloca (buflen); @@ -437,7 +437,7 @@ iruserok2 (raddr, superuser, ruser, luser, rhost) size_t dirlen; uid_t uid; -#ifdef _LIBC_REENTRANT +#ifdef __UCLIBC_HAS_THREADS__ size_t buflen = sysconf (_SC_GETPW_R_SIZE_MAX); struct passwd pwdbuf; #ifdef __UCLIBC_HAS_MMU__ @@ -520,7 +520,7 @@ __icheckhost (u_int32_t raddr, char *lhost, const char *rhost) int negate=1; /* Multiply return with this to get -1 instead of 1 */ char **pp; -#ifdef _LIBC_REENTRANT +#ifdef __UCLIBC_HAS_THREADS__ int save_errno; size_t buflen; char *buffer; @@ -550,7 +550,7 @@ __icheckhost (u_int32_t raddr, char *lhost, const char *rhost) return negate * (! (raddr ^ laddr)); /* Better be a hostname. */ -#ifdef _LIBC_REENTRANT +#ifdef __UCLIBC_HAS_THREADS__ buflen = 1024; buffer = malloc(buflen); save_errno = errno; @@ -564,7 +564,7 @@ __icheckhost (u_int32_t raddr, char *lhost, const char *rhost) __set_errno (save_errno); #else hp = gethostbyname(lhost); -#endif /* _LIBC_REENTRANT */ +#endif /* __UCLIBC_HAS_THREADS__ */ if (hp == NULL) return 0; diff --git a/libc/sysdeps/linux/common/bits/errno.h b/libc/sysdeps/linux/common/bits/errno.h index ac59d4c9d..97e4320f5 100644 --- a/libc/sysdeps/linux/common/bits/errno.h +++ b/libc/sysdeps/linux/common/bits/errno.h @@ -43,7 +43,7 @@ extern int *__errno_location (void) __THROW __attribute__ ((__const__)); # define __set_errno(val) (*__errno_location ()) = (val) # endif /* _LIBC */ -# if !defined _LIBC || defined _LIBC_REENTRANT +# if !defined _LIBC || defined __UCLIBC_HAS_THREADS__ /* When using threads, errno is a per-thread value. */ # define errno (*__errno_location ()) # endif diff --git a/libc/sysdeps/linux/i386/syscall.S b/libc/sysdeps/linux/i386/syscall.S index c67b39ece..a70a99701 100644 --- a/libc/sysdeps/linux/i386/syscall.S +++ b/libc/sysdeps/linux/i386/syscall.S @@ -47,21 +47,21 @@ Lhere: addl $_GLOBAL_OFFSET_TABLE_+[.-Lhere],%ebx negl %eax movl %eax,%ecx -#ifdef _LIBC_REENTRANT +#ifdef __UCLIBC_HAS_THREADS__ call __errno_location@PLT #else movl errno@GOT(%ebx),%eax -#endif /* _LIBC_REENTRANT */ +#endif /* __UCLIBC_HAS_THREADS__ */ movl %ecx,(%eax) #else negl %eax -#ifdef _LIBC_REENTRANT +#ifdef __UCLIBC_HAS_THREADS__ movl %eax,%ecx call __errno_location movl %ecx,(%eax) #else movl %eax,errno -#endif /* _LIBC_REENTRANT */ +#endif /* __UCLIBC_HAS_THREADS__ */ #endif /* PIC */ diff --git a/libc/sysdeps/linux/i386/vfork.S b/libc/sysdeps/linux/i386/vfork.S index 10e95b170..176f25cc3 100644 --- a/libc/sysdeps/linux/i386/vfork.S +++ b/libc/sysdeps/linux/i386/vfork.S @@ -36,22 +36,22 @@ vfork: addl $_GLOBAL_OFFSET_TABLE_+[.-.Lhere],%ebx negl %eax movl %eax,%ecx -#ifdef _LIBC_REENTRANT +#ifdef __UCLIBC_HAS_THREADS__ call __errno_location@PLT #else movl errno@GOT(%ebx),%eax -#endif /* _LIBC_REENTRANT */ +#endif /* __UCLIBC_HAS_THREADS__ */ movl %ecx,(%eax) popl %ebx #else negl %eax -#ifdef _LIBC_REENTRANT +#ifdef __UCLIBC_HAS_THREADS__ movl %eax,%ecx call __errno_location movl %ecx,(%eax) #else movl %eax,errno -#endif /* _LIBC_REENTRANT */ +#endif /* __UCLIBC_HAS_THREADS__ */ #endif /* PIC */ diff --git a/libc/sysdeps/linux/mips/bits/errno.h b/libc/sysdeps/linux/mips/bits/errno.h index 29ba9807a..ca9c32fed 100644 --- a/libc/sysdeps/linux/mips/bits/errno.h +++ b/libc/sysdeps/linux/mips/bits/errno.h @@ -39,7 +39,7 @@ extern int *__errno_location (void) __THROW __attribute__ ((__const__)); # define __set_errno(val) (*__errno_location ()) = (val) # endif /* _LIBC */ -# if !defined _LIBC || defined _LIBC_REENTRANT +# if !defined _LIBC || defined __UCLIBC_HAS_THREADS__ /* When using threads, errno is a per-thread value. */ # define errno (*__errno_location ()) # endif -- cgit v1.2.3