diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-09-12 18:45:49 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-09-12 18:45:49 +0000 |
commit | ccc63b07082c257ffc6fe0b0bbf770283bb44e98 (patch) | |
tree | 4fe19a84b02141ca49ed9a9a1536be08a16bfd2d | |
parent | 9ad684229e7cf2f0b3c6068b2122701d167a5794 (diff) | |
download | glibc-ccc63b07082c257ffc6fe0b0bbf770283bb44e98.zip glibc-ccc63b07082c257ffc6fe0b0bbf770283bb44e98.tar.gz glibc-ccc63b07082c257ffc6fe0b0bbf770283bb44e98.tar.bz2 |
[BZ #365]
Update.
* misc/syslog.c (vsyslog): Fix copying of PID in case of
out-of-memory situation. [BZ #365].
* sysdeps/alpha/fpu/bits/mathinline.h: Use __NTH instead of
__THROW in inline function definitions.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | linuxthreads/ChangeLog | 7 | ||||
-rw-r--r-- | linuxthreads/sysdeps/pthread/bits/pthreadtypes.h | 2 | ||||
-rw-r--r-- | linuxthreads/sysdeps/pthread/pthread.h | 14 | ||||
-rw-r--r-- | misc/syslog.c | 2 | ||||
-rw-r--r-- | nptl/ChangeLog | 15 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/pthread.h | 2 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h | 2 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h | 2 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h | 2 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h | 2 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h | 2 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h | 2 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h | 2 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h | 2 | ||||
-rw-r--r-- | sysdeps/alpha/fpu/bits/mathinline.h | 64 |
16 files changed, 83 insertions, 45 deletions
@@ -1,5 +1,11 @@ 2004-09-12 Ulrich Drepper <drepper@redhat.com> + * misc/syslog.c (vsyslog): Fix copying of PID in case of + out-of-memory situation. [BZ #365]. + + * sysdeps/alpha/fpu/bits/mathinline.h: Use __NTH instead of + __THROW in inline function definitions. + * posix/spawn.h [__USE_GNU]: Define POSIX_SPAWN_USEVFORK. * posix/spawnattr_setflags.c: Check whether any unknown bit is set in FLAGS parameter and fail if this is the case. diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 4d6ee30..e31fd40 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,10 @@ +2004-09-12 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/pthread/pthread.h: Make rwlock prototypes available also + for __USE_XOPEN2K. + * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also + for __USE_XOPEN2K. [BZ #320] + 2004-09-04 Jakub Jelinek <jakub@redhat.com> * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available. diff --git a/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h b/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h index d97e134..d1daef0 100644 --- a/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h +++ b/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h @@ -104,7 +104,7 @@ typedef struct typedef int pthread_once_t; -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Read-write locks. */ typedef struct _pthread_rwlock_t { diff --git a/linuxthreads/sysdeps/pthread/pthread.h b/linuxthreads/sysdeps/pthread/pthread.h index 80c2db8..86c7ff7 100644 --- a/linuxthreads/sysdeps/pthread/pthread.h +++ b/linuxthreads/sysdeps/pthread/pthread.h @@ -43,7 +43,7 @@ __BEGIN_DECLS #define PTHREAD_COND_INITIALIZER {__LOCK_INITIALIZER, 0, "", 0} -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K # define PTHREAD_RWLOCK_INITIALIZER \ { __LOCK_INITIALIZER, 0, NULL, NULL, NULL, \ PTHREAD_RWLOCK_DEFAULT_NP, PTHREAD_PROCESS_PRIVATE } @@ -107,7 +107,7 @@ enum #define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED }; -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K enum { PTHREAD_RWLOCK_PREFER_READER_NP, @@ -433,7 +433,7 @@ extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, int __pshared) __THROW; -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Functions for handling read-write locks. */ /* Initialize read-write lock RWLOCK using attributes ATTR, or use @@ -451,12 +451,12 @@ extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) __THROW; /* Try to acquire read lock for RWLOCK. */ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __THROW; -#ifdef __USE_XOPEN2K +# ifdef __USE_XOPEN2K /* Try to acquire read lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict __abstime) __THROW; -#endif +# endif /* Acquire write lock for RWLOCK. */ extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) __THROW; @@ -464,12 +464,12 @@ extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) __THROW; /* Try to acquire write lock for RWLOCK. */ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __THROW; -#ifdef __USE_XOPEN2K +# ifdef __USE_XOPEN2K /* Try to acquire write lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict __abstime) __THROW; -#endif +# endif /* Unlock RWLOCK. */ extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) __THROW; diff --git a/misc/syslog.c b/misc/syslog.c index 0ba3517..38d5a8e 100644 --- a/misc/syslog.c +++ b/misc/syslog.c @@ -175,7 +175,7 @@ vsyslog(pri, fmt, ap) *--nump = '0' + pid % 10; while ((pid /= 10) != 0); - endp = __mempcpy (endp, nump, (nump + sizeof (numbuf)) - nump); + endp = __mempcpy (endp, nump, (numbuf + sizeof (numbuf)) - nump); *endp++ = ']'; *endp = '\0'; buf = failbuf; diff --git a/nptl/ChangeLog b/nptl/ChangeLog index ea56746..f69393b 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,18 @@ +2004-09-12 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/pthread/pthread.h: Make rwlock prototypes available also + for __USE_XOPEN2K. + * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock + types also for __USE_XOPEN2K. + * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. + [BZ #320] + 2004-09-08 Ulrich Drepper <drepper@redhat.com> * sysdeps/pthread/pthread.h diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h index c4c9ec8..18ccb83 100644 --- a/nptl/sysdeps/pthread/pthread.h +++ b/nptl/sysdeps/pthread/pthread.h @@ -718,7 +718,7 @@ extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) #endif -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Functions for handling read-write locks. */ /* Initialize read-write lock RWLOCK using attributes ATTR, or use diff --git a/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h index fd20d57..79d43fe 100644 --- a/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h @@ -103,7 +103,7 @@ typedef unsigned int pthread_key_t; typedef int pthread_once_t; -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Data structure for read-write lock variable handling. The structure of the attribute type is deliberately not exposed. */ typedef union diff --git a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h index fb62c0d..1db372d 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h @@ -103,7 +103,7 @@ typedef unsigned int pthread_key_t; typedef int pthread_once_t; -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Data structure for read-write lock variable handling. The structure of the attribute type is not exposed on purpose. */ typedef union diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h index 5b442cb..746138e 100644 --- a/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h @@ -103,7 +103,7 @@ typedef unsigned int pthread_key_t; typedef int pthread_once_t; -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Data structure for read-write lock variable handling. The structure of the attribute type is not exposed on purpose. */ typedef union diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h index a493821..2f8e1d9 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h @@ -123,7 +123,7 @@ typedef unsigned int pthread_key_t; typedef int pthread_once_t; -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Data structure for read-write lock variable handling. The structure of the attribute type is deliberately not exposed. */ typedef union diff --git a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h index 17cfaa9..9d74904 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h @@ -122,7 +122,7 @@ typedef unsigned int pthread_key_t; typedef int pthread_once_t; -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Data structure for read-write lock variable handling. The structure of the attribute type is not exposed on purpose. */ typedef union diff --git a/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h index 5bf3aff..914351a 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h @@ -104,7 +104,7 @@ typedef unsigned int pthread_key_t; typedef int pthread_once_t; -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Data structure for read-write lock variable handling. The structure of the attribute type is not exposed on purpose. */ typedef union diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h index 34d3df7..c894f12 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h @@ -123,7 +123,7 @@ typedef unsigned int pthread_key_t; typedef int pthread_once_t; -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Data structure for read-write lock variable handling. The structure of the attribute type is deliberately not exposed. */ typedef union diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h index e5cc605..6b996a4 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h @@ -122,7 +122,7 @@ typedef unsigned int pthread_key_t; typedef int pthread_once_t; -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Data structure for read-write lock variable handling. The structure of the attribute type is not exposed on purpose. */ typedef union diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 0ba79f9..d3a76ba 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -1,5 +1,5 @@ /* Inline math functions for Alpha. - Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999-2001, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang. @@ -48,42 +48,46 @@ #define __inline_copysign(NAME, TYPE) \ __MATH_INLINE TYPE \ -NAME (TYPE __x, TYPE __y) __THROW \ +__NTH (NAME (TYPE __x, TYPE __y)) \ { \ TYPE __z; \ __asm ("cpys %1, %2, %0" : "=f" (__z) : "f" (__y), "f" (__x)); \ return __z; \ } -__inline_copysign(__copysignf, float) -__inline_copysign(copysignf, float) -__inline_copysign(__copysign, double) -__inline_copysign(copysign, double) +__inline_copysign (__copysignf, float) +__inline_copysign (copysignf, float) +__inline_copysign (__copysign, double) +__inline_copysign (copysign, double) #undef __MATH_INLINE_copysign #if __GNUC_PREREQ (2, 8) -__MATH_INLINE float __fabsf (float __x) __THROW { return __builtin_fabsf (__x); } -__MATH_INLINE float fabsf (float __x) __THROW { return __builtin_fabsf (__x); } -__MATH_INLINE double __fabs (double __x) __THROW { return __builtin_fabs (__x); } -__MATH_INLINE double fabs (double __x) __THROW { return __builtin_fabs (__x); } +__MATH_INLINE float +__NTH (__fabsf (float __x)) { return __builtin_fabsf (__x); } +__MATH_INLINE float +__NTH (fabsf (float __x)) { return __builtin_fabsf (__x); } +__MATH_INLINE double +__NTH (__fabs (double __x)) { return __builtin_fabs (__x); } +__MATH_INLINE double +__NTH (fabs (double __x)) { return __builtin_fabs (__x); } #else -#define __inline_fabs(NAME, TYPE) \ +# define __inline_fabs(NAME, TYPE) \ __MATH_INLINE TYPE \ -NAME (TYPE __x) __THROW \ +__NTH (NAME (TYPE __x)) \ { \ TYPE __z; \ __asm ("cpys $f31, %1, %0" : "=f" (__z) : "f" (__x)); \ return __z; \ } -__inline_fabs(__fabsf, float) -__inline_fabs(fabsf, float) -__inline_fabs(__fabs, double) -__inline_fabs(fabs, double) +__inline_fabs (__fabsf, float) +__inline_fabs (fabsf, float) +__inline_fabs (__fabs, double) +__inline_fabs (fabs, double) -#undef __inline_fabs +# undef __inline_fabs #endif @@ -92,7 +96,7 @@ __inline_fabs(fabs, double) must be integral, as this avoids unpleasant integer overflows. */ __MATH_INLINE float -__floorf (float __x) __THROW +__NTH (__floorf (float __x)) { /* Check not zero since floor(-0) == -0. */ if (__x != 0 && fabsf (__x) < 16777216.0f) /* 1 << FLT_MANT_DIG */ @@ -118,7 +122,7 @@ __floorf (float __x) __THROW } __MATH_INLINE double -__floor (double __x) __THROW +__NTH (__floor (double __x)) { if (__x != 0 && fabs (__x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */ { @@ -136,40 +140,46 @@ __floor (double __x) __THROW return __x; } -__MATH_INLINE float floorf (float __x) __THROW { return __floorf(__x); } -__MATH_INLINE double floor (double __x) __THROW { return __floor(__x); } +__MATH_INLINE float __NTH (floorf (float __x)) { return __floorf(__x); } +__MATH_INLINE double __NTH (floor (double __x)) { return __floor(__x); } #ifdef __USE_ISOC99 -__MATH_INLINE float __fdimf (float __x, float __y) __THROW +__MATH_INLINE float +__NTH (__fdimf (float __x, float __y)) { return __x < __y ? 0.0f : __x - __y; } -__MATH_INLINE float fdimf (float __x, float __y) __THROW +__MATH_INLINE float +__NTH (fdimf (float __x, float __y)) { return __x < __y ? 0.0f : __x - __y; } -__MATH_INLINE double __fdim (double __x, double __y) __THROW +__MATH_INLINE double +__NTH (__fdim (double __x, double __y)) { return __x < __y ? 0.0 : __x - __y; } -__MATH_INLINE double fdim (double __x, double __y) __THROW +__MATH_INLINE double +__NTH (fdim (double __x, double __y)) { return __x < __y ? 0.0 : __x - __y; } /* Test for negative number. Used in the signbit() macro. */ -__MATH_INLINE int __signbitf (float __x) __THROW +__MATH_INLINE int +__NTH (__signbitf (float __x)) { __extension__ union { float __f; int __i; } __u = { __f: __x }; return __u.__i < 0; } -__MATH_INLINE int __signbit (double __x) __THROW +__MATH_INLINE int +__NTH (__signbit (double __x)) { __extension__ union { double __d; long __i; } __u = { __d: __x }; return __u.__i < 0; |