diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-06-07 00:02:14 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-06-07 00:02:14 +0000 |
commit | 9a8fcca0b33c26759134a545ac45251df53418a3 (patch) | |
tree | 981351d75ac1c612d7f356b0438ec5f1a3227c12 /sysdeps | |
parent | e0082312bcfdce398099d58add30cc02b79f129b (diff) | |
download | glibc-9a8fcca0b33c26759134a545ac45251df53418a3.tar.gz glibc-9a8fcca0b33c26759134a545ac45251df53418a3.tar.xz glibc-9a8fcca0b33c26759134a545ac45251df53418a3.zip |
Update.
* sysdeps/unix/sysv/linux/kernel-features.h: Define __ASSUME_SIOCGIFNAME for kernel >= 2.1.50. * sysdeps/unix/sysv/linux/if_index.c: Correct typo (SIOGIFNAME -> SIOCGIFNAME) and use __ASSUME_SIOCGIFNAME. * sysdeps/libm-ieee754/w_j0.c: Remove __ from symbol definitions. * sysdeps/libm-ieee754/w_j0f.c: Likewise. * sysdeps/libm-ieee754/w_j0l.c: Likewise. * sysdeps/libm-ieee754/w_j1.c: Likewise. * sysdeps/libm-ieee754/w_j1f.c: Likewise. * sysdeps/libm-ieee754/w_j1l.c: Likewise. * sysdeps/libm-ieee754/w_jn.c: Likewise. * sysdeps/libm-ieee754/w_jnf.c: Likewise. * sysdeps/libm-ieee754/w_jnl.c: Likewise. * stdio-common.c: Correct typos. * math/libm-test.c (jn_test): Adjust delta. (y1_test): Likewise. (yn_test): Likewise. * elf/do-lookup.h: It should never happen that if we expect a versioned symbol from a file the file has no version table. This should have been checked in dl-version.c. * elf/dl-lookup.c: Include assert.h.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/libm-ieee754/w_j0.c | 16 | ||||
-rw-r--r-- | sysdeps/libm-ieee754/w_j0f.c | 12 | ||||
-rw-r--r-- | sysdeps/libm-ieee754/w_j0l.c | 10 | ||||
-rw-r--r-- | sysdeps/libm-ieee754/w_j1.c | 16 | ||||
-rw-r--r-- | sysdeps/libm-ieee754/w_j1f.c | 16 | ||||
-rw-r--r-- | sysdeps/libm-ieee754/w_j1l.c | 10 | ||||
-rw-r--r-- | sysdeps/libm-ieee754/w_jn.c | 16 | ||||
-rw-r--r-- | sysdeps/libm-ieee754/w_jnf.c | 12 | ||||
-rw-r--r-- | sysdeps/libm-ieee754/w_jnl.c | 10 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sigaction.c | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/if_index.c | 48 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/kernel-features.h | 5 |
12 files changed, 87 insertions, 86 deletions
diff --git a/sysdeps/libm-ieee754/w_j0.c b/sysdeps/libm-ieee754/w_j0.c index c327e1c98f..5a018760bb 100644 --- a/sysdeps/libm-ieee754/w_j0.c +++ b/sysdeps/libm-ieee754/w_j0.c @@ -22,9 +22,9 @@ static char rcsid[] = "$NetBSD: w_j0.c,v 1.6 1995/05/10 20:49:11 jtc Exp $"; #include "math_private.h" #ifdef __STDC__ - double __j0(double x) /* wrapper j0 */ + double j0(double x) /* wrapper j0 */ #else - double __j0(x) /* wrapper j0 */ + double j0(x) /* wrapper j0 */ double x; #endif { @@ -39,17 +39,15 @@ static char rcsid[] = "$NetBSD: w_j0.c,v 1.6 1995/05/10 20:49:11 jtc Exp $"; return z; #endif } -weak_alias (__j0, j0) #ifdef NO_LONG_DOUBLE -strong_alias (__j0, __j0l) -weak_alias (__j0, j0l) +strong_alias (j0, j0l) #endif #ifdef __STDC__ - double __y0(double x) /* wrapper y0 */ + double y0(double x) /* wrapper y0 */ #else - double __y0(x) /* wrapper y0 */ + double y0(x) /* wrapper y0 */ double x; #endif { @@ -73,8 +71,6 @@ weak_alias (__j0, j0l) return z; #endif } -weak_alias (__y0, y0) #ifdef NO_LONG_DOUBLE -strong_alias (__y0, __y0l) -weak_alias (__y0, y0l) +strong_alias (y0, y0l) #endif diff --git a/sysdeps/libm-ieee754/w_j0f.c b/sysdeps/libm-ieee754/w_j0f.c index cc8ec6f2d9..32e2eebb56 100644 --- a/sysdeps/libm-ieee754/w_j0f.c +++ b/sysdeps/libm-ieee754/w_j0f.c @@ -8,7 +8,7 @@ * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice + * software is freely granted, provided that this notice * is preserved. * ==================================================== */ @@ -25,9 +25,9 @@ static char rcsid[] = "$NetBSD: w_j0f.c,v 1.3 1995/05/10 20:49:13 jtc Exp $"; #include "math_private.h" #ifdef __STDC__ - float __j0f(float x) /* wrapper j0f */ + float j0f(float x) /* wrapper j0f */ #else - float __j0f(x) /* wrapper j0f */ + float j0f(x) /* wrapper j0f */ float x; #endif { @@ -43,12 +43,11 @@ static char rcsid[] = "$NetBSD: w_j0f.c,v 1.3 1995/05/10 20:49:13 jtc Exp $"; return z; #endif } -weak_alias (__j0f, j0f) #ifdef __STDC__ - float __y0f(float x) /* wrapper y0f */ + float y0f(float x) /* wrapper y0f */ #else - float __y0f(x) /* wrapper y0f */ + float y0f(x) /* wrapper y0f */ float x; #endif { @@ -73,4 +72,3 @@ weak_alias (__j0f, j0f) return z; #endif } -weak_alias (__y0f, y0f) diff --git a/sysdeps/libm-ieee754/w_j0l.c b/sysdeps/libm-ieee754/w_j0l.c index 7b4144c95e..b74d9ddcff 100644 --- a/sysdeps/libm-ieee754/w_j0l.c +++ b/sysdeps/libm-ieee754/w_j0l.c @@ -26,9 +26,9 @@ static char rcsid[] = "$NetBSD: $"; #include "math_private.h" #ifdef __STDC__ - long double __j0l(long double x) /* wrapper j0l */ + long double j0l(long double x) /* wrapper j0l */ #else - long double __j0l(x) /* wrapper j0 */ + long double j0l(x) /* wrapper j0 */ long double x; #endif { @@ -43,12 +43,11 @@ static char rcsid[] = "$NetBSD: $"; return z; #endif } -weak_alias (__j0l, j0l) #ifdef __STDC__ - long double __y0l(long double x) /* wrapper y0l */ + long double y0l(long double x) /* wrapper y0l */ #else - long double __y0l(x) /* wrapper y0 */ + long double y0l(x) /* wrapper y0 */ long double x; #endif { @@ -72,4 +71,3 @@ weak_alias (__j0l, j0l) return z; #endif } -weak_alias (__y0l, y0l) diff --git a/sysdeps/libm-ieee754/w_j1.c b/sysdeps/libm-ieee754/w_j1.c index ae6e9b5537..39fe8543b1 100644 --- a/sysdeps/libm-ieee754/w_j1.c +++ b/sysdeps/libm-ieee754/w_j1.c @@ -22,9 +22,9 @@ static char rcsid[] = "$NetBSD: w_j1.c,v 1.6 1995/05/10 20:49:15 jtc Exp $"; #include "math_private.h" #ifdef __STDC__ - double __j1(double x) /* wrapper j1 */ + double j1(double x) /* wrapper j1 */ #else - double __j1(x) /* wrapper j1 */ + double j1(x) /* wrapper j1 */ double x; #endif { @@ -40,17 +40,15 @@ static char rcsid[] = "$NetBSD: w_j1.c,v 1.6 1995/05/10 20:49:15 jtc Exp $"; return z; #endif } -weak_alias (__j1, j1) #ifdef NO_LONG_DOUBLE -strong_alias (__j1, __j1l) -weak_alias (__j1, j1l) +strong_alias (j1, j1l) #endif #ifdef __STDC__ - double __y1(double x) /* wrapper y1 */ + double y1(double x) /* wrapper y1 */ #else - double __y1(x) /* wrapper y1 */ + double y1(x) /* wrapper y1 */ double x; #endif { @@ -74,8 +72,6 @@ weak_alias (__j1, j1l) return z; #endif } -weak_alias (__y1, y1) #ifdef NO_LONG_DOUBLE -strong_alias (__y1, __y1l) -weak_alias (__y1, y1l) +strong_alias (y1, y1l) #endif diff --git a/sysdeps/libm-ieee754/w_j1f.c b/sysdeps/libm-ieee754/w_j1f.c index a1419b31b8..2a7c8db819 100644 --- a/sysdeps/libm-ieee754/w_j1f.c +++ b/sysdeps/libm-ieee754/w_j1f.c @@ -8,7 +8,7 @@ * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice + * software is freely granted, provided that this notice * is preserved. * ==================================================== */ @@ -17,17 +17,17 @@ static char rcsid[] = "$NetBSD: w_j1f.c,v 1.3 1995/05/10 20:49:17 jtc Exp $"; #endif -/* - * wrapper of j1f,y1f +/* + * wrapper of j1f,y1f */ #include "math.h" #include "math_private.h" #ifdef __STDC__ - float __j1f(float x) /* wrapper j1f */ + float j1f(float x) /* wrapper j1f */ #else - float __j1f(x) /* wrapper j1f */ + float j1f(x) /* wrapper j1f */ float x; #endif { @@ -44,12 +44,11 @@ static char rcsid[] = "$NetBSD: w_j1f.c,v 1.3 1995/05/10 20:49:17 jtc Exp $"; return z; #endif } -weak_alias (__j1f, j1f) #ifdef __STDC__ - float __y1f(float x) /* wrapper y1f */ + float y1f(float x) /* wrapper y1f */ #else - float __y1f(x) /* wrapper y1f */ + float y1f(x) /* wrapper y1f */ float x; #endif { @@ -74,4 +73,3 @@ weak_alias (__j1f, j1f) return z; #endif } -weak_alias (__y1f, y1f) diff --git a/sysdeps/libm-ieee754/w_j1l.c b/sysdeps/libm-ieee754/w_j1l.c index 223ab79cde..49a486cf8e 100644 --- a/sysdeps/libm-ieee754/w_j1l.c +++ b/sysdeps/libm-ieee754/w_j1l.c @@ -26,9 +26,9 @@ static char rcsid[] = "$NetBSD: $"; #include "math_private.h" #ifdef __STDC__ - long double __j1l(long double x) /* wrapper j1l */ + long double j1l(long double x) /* wrapper j1l */ #else - long double __j1l(x) /* wrapper j1l */ + long double j1l(x) /* wrapper j1l */ long double x; #endif { @@ -44,12 +44,11 @@ static char rcsid[] = "$NetBSD: $"; return z; #endif } -weak_alias (__j1l, j1l) #ifdef __STDC__ - long double __y1l(long double x) /* wrapper y1l */ + long double y1l(long double x) /* wrapper y1l */ #else - long double __y1l(x) /* wrapper y1l */ + long double y1l(x) /* wrapper y1l */ long double x; #endif { @@ -73,4 +72,3 @@ weak_alias (__j1l, j1l) return z; #endif } -weak_alias (__y1l, y1l) diff --git a/sysdeps/libm-ieee754/w_jn.c b/sysdeps/libm-ieee754/w_jn.c index ecd86c0d8b..85fc383fb7 100644 --- a/sysdeps/libm-ieee754/w_jn.c +++ b/sysdeps/libm-ieee754/w_jn.c @@ -44,9 +44,9 @@ static char rcsid[] = "$NetBSD: w_jn.c,v 1.6 1995/05/10 20:49:19 jtc Exp $"; #include "math_private.h" #ifdef __STDC__ - double __jn(int n, double x) /* wrapper jn */ + double jn(int n, double x) /* wrapper jn */ #else - double __jn(n,x) /* wrapper jn */ + double jn(n,x) /* wrapper jn */ double x; int n; #endif { @@ -62,17 +62,15 @@ static char rcsid[] = "$NetBSD: w_jn.c,v 1.6 1995/05/10 20:49:19 jtc Exp $"; return z; #endif } -weak_alias (__jn, jn) #ifdef NO_LONG_DOUBLE -strong_alias (__jn, __jnl) -weak_alias (__jn, jnl) +strong_alias (jn, jnl) #endif #ifdef __STDC__ - double __yn(int n, double x) /* wrapper yn */ + double yn(int n, double x) /* wrapper yn */ #else - double __yn(n,x) /* wrapper yn */ + double yn(n,x) /* wrapper yn */ double x; int n; #endif { @@ -96,8 +94,6 @@ weak_alias (__jn, jnl) return z; #endif } -weak_alias (__yn, yn) #ifdef NO_LONG_DOUBLE -strong_alias (__yn, __ynl) -weak_alias (__yn, ynl) +strong_alias (yn, ynl) #endif diff --git a/sysdeps/libm-ieee754/w_jnf.c b/sysdeps/libm-ieee754/w_jnf.c index 82cdc9f769..63ad335573 100644 --- a/sysdeps/libm-ieee754/w_jnf.c +++ b/sysdeps/libm-ieee754/w_jnf.c @@ -8,7 +8,7 @@ * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice + * software is freely granted, provided that this notice * is preserved. * ==================================================== */ @@ -21,9 +21,9 @@ static char rcsid[] = "$NetBSD: w_jnf.c,v 1.3 1995/05/10 20:49:21 jtc Exp $"; #include "math_private.h" #ifdef __STDC__ - float __jnf(int n, float x) /* wrapper jnf */ + float jnf(int n, float x) /* wrapper jnf */ #else - float __jnf(n,x) /* wrapper jnf */ + float jnf(n,x) /* wrapper jnf */ float x; int n; #endif { @@ -40,12 +40,11 @@ static char rcsid[] = "$NetBSD: w_jnf.c,v 1.3 1995/05/10 20:49:21 jtc Exp $"; return z; #endif } -weak_alias (__jnf, jnf) #ifdef __STDC__ - float __ynf(int n, float x) /* wrapper ynf */ + float ynf(int n, float x) /* wrapper ynf */ #else - float __ynf(n,x) /* wrapper ynf */ + float ynf(n,x) /* wrapper ynf */ float x; int n; #endif { @@ -70,4 +69,3 @@ weak_alias (__jnf, jnf) return z; #endif } -weak_alias (__ynf, ynf) diff --git a/sysdeps/libm-ieee754/w_jnl.c b/sysdeps/libm-ieee754/w_jnl.c index 0a243db30a..866e3cdb00 100644 --- a/sysdeps/libm-ieee754/w_jnl.c +++ b/sysdeps/libm-ieee754/w_jnl.c @@ -48,9 +48,9 @@ static char rcsid[] = "$NetBSD: $"; #include "math_private.h" #ifdef __STDC__ - long double __jnl(int n, long double x) /* wrapper jnl */ + long double jnl(int n, long double x) /* wrapper jnl */ #else - long double __jnl(n,x) /* wrapper jnl */ + long double jnl(n,x) /* wrapper jnl */ long double x; int n; #endif { @@ -66,12 +66,11 @@ static char rcsid[] = "$NetBSD: $"; return z; #endif } -weak_alias (__jnl, jnl) #ifdef __STDC__ - long double __ynl(int n, long double x) /* wrapper ynl */ + long double ynl(int n, long double x) /* wrapper ynl */ #else - long double __ynl(n,x) /* wrapper ynl */ + long double ynl(n,x) /* wrapper ynl */ long double x; int n; #endif { @@ -95,4 +94,3 @@ weak_alias (__jnl, jnl) return z; #endif } -weak_alias (__ynl, ynl) diff --git a/sysdeps/unix/sysv/linux/i386/sigaction.c b/sysdeps/unix/sysv/linux/i386/sigaction.c index fddb22a4e0..c126cdaee8 100644 --- a/sysdeps/unix/sysv/linux/i386/sigaction.c +++ b/sysdeps/unix/sysv/linux/i386/sigaction.c @@ -75,7 +75,7 @@ __sigaction (int sig, const struct sigaction *act, struct sigaction *oact) { kact.k_sa_handler = act->sa_handler; memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t)); - kact.sa_flags = act->sa_flags; + kact.sa_flags = act->sa_flags | SA_RESTORER; kact.sa_restorer = ((act->sa_flags & SA_SIGINFO) ? &restore_rt : &restore); diff --git a/sysdeps/unix/sysv/linux/if_index.c b/sysdeps/unix/sysv/linux/if_index.c index 9b3db6abfb..67fba93cd4 100644 --- a/sysdeps/unix/sysv/linux/if_index.c +++ b/sysdeps/unix/sysv/linux/if_index.c @@ -26,6 +26,8 @@ #include <sys/ioctl.h> #include <bits/libc-lock.h> +#include "kernel-features.h" + /* Try to get a socket to talk to the kernel. */ #if defined SIOGIFINDEX || defined SIOGIFNAME static int @@ -120,8 +122,12 @@ if_nameindex (void) unsigned int nifs, i; int rq_len; struct if_nameindex *idx = NULL; +# if __ASSUME_SIOCGIFNAME == 0 static int old_siocgifconf; -#define RQ_IFS 4 +# else +# define old_siocgifconf 0 +# endif +# define RQ_IFS 4 if (fd < 0) return NULL; @@ -136,7 +142,9 @@ if_nameindex (void) ifc.ifc_len = 0; if (__ioctl (fd, SIOCGIFCONF, &ifc) < 0 || ifc.ifc_len == 0) { +# if __ASSUME_SIOCGIFNAME == 0 old_siocgifconf = 1; +# endif rq_len = RQ_IFS * sizeof (struct ifreq); } else @@ -199,24 +207,31 @@ if_nameindex (void) char * if_indextoname (unsigned int ifindex, char *ifname) { -#ifndef SIOGIFINDEX +#if !defined SIOGIFINDEX && __ASSUME_SIOCGIFNAME == 0 __set_errno (ENOSYS); return NULL; #else +# if __ASSUME_SIOCGIFNAME == 0 struct if_nameindex *idx; struct if_nameindex *p; char *result = NULL; +# endif -#ifdef SIOGIFNAME +# if defined SIOCGIFNAME || __ASSUME_SIOCGIFNAME > 0 /* We may be able to do the conversion directly, rather than searching a list. This ioctl is not present in kernels before version 2.1.50. */ struct ifreq ifr; int fd; - static int siogifname_works_not; +# if __ASSUME_SIOCGIFNAME == 0 + static int siocgifname_works_not; - if (!siogifname_works_not) + if (!siocgifname_works_not) +# endif { +# if __ASSUME_SIOCGIFNAME == 0 int serrno = errno; +# endif + int status; fd = opensock (); @@ -224,23 +239,27 @@ if_indextoname (unsigned int ifindex, char *ifname) return NULL; ifr.ifr_ifindex = ifindex; - if (__ioctl (fd, SIOGIFNAME, &ifr) < 0) + status = __ioctl (fd, SIOCGIFNAME, &ifr); + + __close (fd); + +# if __ASSUME_SIOCGIFNAME == 0 + if (status < 0) { if (errno == EINVAL) - siogifname_works_not = 1; /* Don't make the same mistake twice. */ + siocgifname_works_not = 1; /* Don't make the same mistake twice. */ } else - { - __close (fd); - return strncpy (ifname, ifr.ifr_name, IFNAMSIZ); - } - - __close (fd); + return strncpy (ifname, ifr.ifr_name, IFNAMSIZ); __set_errno (serrno); +# else + return status < 0 ? NULL : strncpy (ifname, ifr.ifr_name, IFNAMSIZ); +# endif } -#endif +# endif +# if __ASSUME_SIOCGIFNAME == 0 idx = if_nameindex (); if (idx != NULL) @@ -255,5 +274,6 @@ if_indextoname (unsigned int ifindex, char *ifname) if_freenameindex (idx); } return result; +# endif #endif } diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 1bd7ba4ba8..db2bfe24d5 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -69,3 +69,8 @@ #if __LINUX_KERNEL_VERSION >= 131584 # define __ASSUME_SETRESUID_SYSCALL 1 #endif + +/* The SIOCGIFNAME ioctl is available starting with 2.1.50. */ +#if __LINUX_KERNEL_VERSION >= 131408 +# define __ASSUME_SIOCGIFNAME 1 +#endif |