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.
This commit is contained in:
Ulrich Drepper 2004-09-12 18:45:49 +00:00
parent 9ad684229e
commit ccc63b0708
16 changed files with 83 additions and 45 deletions

View File

@ -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.

View File

@ -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.

View File

@ -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
{

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;