diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-09-29 08:48:32 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2004-09-29 08:48:32 +0000 |
commit | 2b13f2ccc0b53bb2f3a4f6dcc006d4dea7149e16 (patch) | |
tree | 4d407d9cf3aaa05d597017bf8c326fda4e960f66 /sysdeps | |
parent | f1750fb9c68854778e6e023ed490ff80e1c90167 (diff) | |
download | glibc-2b13f2ccc0b53bb2f3a4f6dcc006d4dea7149e16.tar glibc-2b13f2ccc0b53bb2f3a4f6dcc006d4dea7149e16.tar.gz glibc-2b13f2ccc0b53bb2f3a4f6dcc006d4dea7149e16.tar.bz2 glibc-2b13f2ccc0b53bb2f3a4f6dcc006d4dea7149e16.zip |
Updated to fedora-glibc-20040929T0821
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/bits/waitstatus.h | 18 | ||||
-rw-r--r-- | sysdeps/generic/sigfillset.c | 6 | ||||
-rw-r--r-- | sysdeps/i386/dl-machine.h | 16 | ||||
-rw-r--r-- | sysdeps/posix/getaddrinfo.c | 10 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/ia64/bits/siginfo.h | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sigprocmask.c | 14 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sigtimedwait.c | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sigwait.c | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sigwaitinfo.c | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/waitid.c | 5 |
10 files changed, 81 insertions, 27 deletions
diff --git a/sysdeps/generic/bits/waitstatus.h b/sysdeps/generic/bits/waitstatus.h index 982c9dbb28..699c224989 100644 --- a/sysdeps/generic/bits/waitstatus.h +++ b/sysdeps/generic/bits/waitstatus.h @@ -1,5 +1,5 @@ /* Definitions of status bits for `wait' et al. - Copyright (C) 1992, 1994, 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1992,1994,1996,1997,2000,2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -38,23 +38,25 @@ #define __WIFEXITED(status) (__WTERMSIG(status) == 0) /* Nonzero if STATUS indicates termination by a signal. */ -#ifdef __GNUC__ -# define __WIFSIGNALED(status) \ - (__extension__ ({ int __status = (status); \ - !__WIFSTOPPED(__status) && !__WIFEXITED(__status); })) -#else /* Not GCC. */ -# define __WIFSIGNALED(status) (!__WIFSTOPPED(status) && !__WIFEXITED(status)) -#endif /* GCC. */ +#define __WIFSIGNALED(status) \ + (((signed char) (((status) & 0x7f) + 1) >> 1) > 0) /* Nonzero if STATUS indicates the child is stopped. */ #define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) +/* Nonzero if STATUS indicates the child continued after a stop. We only + define this if <bits/waitflags.h> provides the WCONTINUED flag bit. */ +#ifdef WCONTINUED +# define __WIFCONTINUED(status) ((status) == __W_CONTINUED) +#endif + /* Nonzero if STATUS indicates the child dumped core. */ #define __WCOREDUMP(status) ((status) & __WCOREFLAG) /* Macros for constructing status values. */ #define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) #define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) +#define __W_CONTINUED 0xffff #define __WCOREFLAG 0x80 diff --git a/sysdeps/generic/sigfillset.c b/sysdeps/generic/sigfillset.c index 5f91fa6bda..95d52cf0c0 100644 --- a/sysdeps/generic/sigfillset.c +++ b/sysdeps/generic/sigfillset.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,96,97,2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1991,96,97,2002,2003,2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -37,6 +37,10 @@ sigfillset (set) #ifdef SIGCANCEL __sigdelset (set, SIGCANCEL); #endif + /* Likewise for the signal to implement setxid. */ +#ifdef SIGSETXID + __sigdelset (set, SIGSETXID); +#endif return 0; } diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h index 4b5b8f22e7..c48d9d325e 100644 --- a/sysdeps/i386/dl-machine.h +++ b/sysdeps/i386/dl-machine.h @@ -388,7 +388,7 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc, /* Perform the relocation specified by RELOC and SYM (which is fully resolved). MAP is the object containing the reloc. */ -static inline void +auto inline void __attribute ((always_inline)) elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, const Elf32_Sym *sym, const struct r_found_version *version, @@ -533,7 +533,8 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, } #ifndef RTLD_BOOTSTRAP -static inline void +auto inline void +__attribute__ ((always_inline)) elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *sym, const struct r_found_version *version, void *const reloc_addr_arg) @@ -639,7 +640,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, } #endif /* !RTLD_BOOTSTRAP */ -static inline void +auto inline void __attribute ((always_inline)) elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc, void *const reloc_addr_arg) @@ -650,7 +651,8 @@ elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc, } #ifndef RTLD_BOOTSTRAP -static inline void +auto inline void +__attribute__ ((always_inline)) elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, void *const reloc_addr_arg) { @@ -659,7 +661,8 @@ elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, } #endif /* !RTLD_BOOTSTRAP */ -static inline void +auto inline void +__attribute__ ((always_inline)) elf_machine_lazy_rel (struct link_map *map, Elf32_Addr l_addr, const Elf32_Rel *reloc) { @@ -680,7 +683,8 @@ elf_machine_lazy_rel (struct link_map *map, #ifndef RTLD_BOOTSTRAP -static inline void +auto inline void +__attribute__ ((always_inline)) elf_machine_lazy_rela (struct link_map *map, Elf32_Addr l_addr, const Elf32_Rela *reloc) { diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index 20e60de393..eb45709be1 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -556,6 +556,14 @@ gaih_inet (const char *name, const struct gaih_service *service, } else return -EAI_ADDRFAMILY; + + dupname: + if (req->ai_flags & AI_CANONNAME) + { + canon = strdup (name); + if (canon == NULL) + return -EAI_MEMORY; + } } if (at->family == AF_UNSPEC) @@ -603,6 +611,8 @@ gaih_inet (const char *name, const struct gaih_service *service, return GAIH_OKIFUNSPEC | -EAI_NONAME; } } + + goto dupname; } } diff --git a/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h b/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h index c3abe80de6..52d00e9da9 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h @@ -93,7 +93,7 @@ typedef struct siginfo { void *si_addr; /* Faulting insn/memory ref. */ int _si_imm; - int _si_pad0; + unsigned int _si_flags; unsigned long int _si_isr; } _sigfault; @@ -124,6 +124,7 @@ typedef struct siginfo #ifdef __USE_GNU # define si_imm _sifields._sigfault._si_imm +# define si_flags _sifields._sigfault._si_flags # define si_isr _sifields._sigfault._si_isr #endif diff --git a/sysdeps/unix/sysv/linux/sigprocmask.c b/sysdeps/unix/sysv/linux/sigprocmask.c index e1b57566a5..1573780d8e 100644 --- a/sysdeps/unix/sysv/linux/sigprocmask.c +++ b/sysdeps/unix/sysv/linux/sigprocmask.c @@ -43,12 +43,20 @@ __sigprocmask (how, set, oset) #ifdef SIGCANCEL sigset_t local_newmask; - /* The only thing we have to make sure here is that SIGCANCEL is not - blocked. */ - if (set != NULL && __builtin_expect (__sigismember (set, SIGCANCEL), 0)) + /* The only thing we have to make sure here is that SIGCANCEL and + SIGSETXID are not blocked. */ + if (set != NULL + && (__builtin_expect (__sigismember (set, SIGCANCEL), 0) +# ifdef SIGSETXID + || __builtin_expect (__sigismember (set, SIGSETXID), 0) +# endif + )) { local_newmask = *set; __sigdelset (&local_newmask, SIGCANCEL); +# ifdef SIGSETXID + __sigdelset (&local_newmask, SIGSETXID); +# endif set = &local_newmask; } #endif diff --git a/sysdeps/unix/sysv/linux/sigtimedwait.c b/sysdeps/unix/sysv/linux/sigtimedwait.c index 1705cb10bd..adeadc1587 100644 --- a/sysdeps/unix/sysv/linux/sigtimedwait.c +++ b/sysdeps/unix/sysv/linux/sigtimedwait.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2000,2002,2003,2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -32,12 +32,20 @@ do_sigtimedwait (const sigset_t *set, siginfo_t *info, { #ifdef SIGCANCEL sigset_t tmpset; - if (set != NULL && __sigismember (set, SIGCANCEL)) + if (set != NULL + && (__builtin_expect (__sigismember (set, SIGCANCEL), 0) +# ifdef SIGSETXID + || __builtin_expect (__sigismember (set, SIGSETXID), 0) +# endif + )) { /* Create a temporary mask without the bit for SIGCANCEL set. */ // We are not copying more than we have to. memcpy (&tmpset, set, _NSIG / 8); __sigdelset (&tmpset, SIGCANCEL); +# ifdef SIGSETXID + __sigdelset (&tmpset, SIGSETXID); +# endif set = &tmpset; } #endif diff --git a/sysdeps/unix/sysv/linux/sigwait.c b/sysdeps/unix/sysv/linux/sigwait.c index f755928493..7c865963cd 100644 --- a/sysdeps/unix/sysv/linux/sigwait.c +++ b/sysdeps/unix/sysv/linux/sigwait.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2000,2002,2003,2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -36,12 +36,20 @@ do_sigwait (const sigset_t *set, int *sig) #ifdef SIGCANCEL sigset_t tmpset; - if (set != NULL && __sigismember (set, SIGCANCEL)) + if (set != NULL + && (__builtin_expect (__sigismember (set, SIGCANCEL), 0) +# ifdef SIGSETXID + || __builtin_expect (__sigismember (set, SIGSETXID), 0) +# endif + )) { /* Create a temporary mask without the bit for SIGCANCEL set. */ // We are not copying more than we have to. memcpy (&tmpset, set, _NSIG / 8); __sigdelset (&tmpset, SIGCANCEL); +# ifdef SIGSETXID + __sigdelset (&tmpset, SIGSETXID); +# endif set = &tmpset; } #endif diff --git a/sysdeps/unix/sysv/linux/sigwaitinfo.c b/sysdeps/unix/sysv/linux/sigwaitinfo.c index a2dec820fc..a51a01f20b 100644 --- a/sysdeps/unix/sysv/linux/sigwaitinfo.c +++ b/sysdeps/unix/sysv/linux/sigwaitinfo.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2000,2002,2003,2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -33,12 +33,20 @@ do_sigwaitinfo (const sigset_t *set, siginfo_t *info) { #ifdef SIGCANCEL sigset_t tmpset; - if (set != NULL && __sigismember (set, SIGCANCEL)) + if (set != NULL + && (__builtin_expect (__sigismember (set, SIGCANCEL), 0) +# ifdef SIGSETXID + || __builtin_expect (__sigismember (set, SIGSETXID), 0) +# endif + )) { /* Create a temporary mask without the bit for SIGCANCEL set. */ // We are not copying more than we have to. memcpy (&tmpset, set, _NSIG / 8); __sigdelset (&tmpset, SIGCANCEL); +# ifdef SIGSETXID + __sigdelset (&tmpset, SIGSETXID); +# endif set = &tmpset; } #endif diff --git a/sysdeps/unix/sysv/linux/waitid.c b/sysdeps/unix/sysv/linux/waitid.c index 21226df37e..207c3d3453 100644 --- a/sysdeps/unix/sysv/linux/waitid.c +++ b/sysdeps/unix/sysv/linux/waitid.c @@ -47,10 +47,11 @@ do_waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options) { static int waitid_works; if (waitid_works > 0) - return INLINE_SYSCALL (waitid, 4, idtype, id, infop, options); + return INLINE_SYSCALL (waitid, 5, idtype, id, infop, options, NULL); if (waitid_works == 0) { - int result = INLINE_SYSCALL (waitid, 4, idtype, id, infop, options); + int result = INLINE_SYSCALL (waitid, 5, + idtype, id, infop, options, NULL); if (result < 0 && errno == ENOSYS) waitid_works = -1; else |