diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-08-10 06:34:46 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-08-10 06:34:46 +0000 |
commit | 256926546643ba909661c83e7a7d24d733b9b390 (patch) | |
tree | 71942c1328ec0cd2dc910d9443124ad2ee0539fc /sysdeps | |
parent | 503d6a958581777473c31f73113d0fa6cff19b30 (diff) |
Updated to fedora-glibc-20060810T0627cvs/fedora-glibc-2_4_90-19
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/s390/fpu/libm-test-ulps | 36 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/fchownat.c | 42 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/ia64/bits/fcntl.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/fchownat.c | 48 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c | 30 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sh/fchownat.c | 30 |
6 files changed, 130 insertions, 58 deletions
diff --git a/sysdeps/s390/fpu/libm-test-ulps b/sysdeps/s390/fpu/libm-test-ulps index 7fbed3caf9..989722e651 100644 --- a/sysdeps/s390/fpu/libm-test-ulps +++ b/sysdeps/s390/fpu/libm-test-ulps @@ -513,16 +513,16 @@ ifloat: 1 # j0 Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 Test "j0 (0.75) == 0.864242275166648623555731103820923211": float: 1 ifloat: 1 Test "j0 (10.0) == -0.245935764451348335197760862485328754": -double: 2 +double: 3 float: 1 -idouble: 2 +idouble: 3 ifloat: 1 ildouble: 2 ldouble: 2 @@ -533,9 +533,9 @@ ildouble: 2 ldouble: 2 Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 Test "j0 (8.0) == 0.171650807137553906090869407851972001": float: 1 ifloat: 1 @@ -569,16 +569,16 @@ ldouble: 4 # jn Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": float: 1 ifloat: 1 Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": -double: 2 +double: 3 float: 1 -idouble: 2 +idouble: 3 ifloat: 1 ildouble: 2 ldouble: 2 @@ -589,9 +589,9 @@ ildouble: 2 ldouble: 2 Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": float: 1 ifloat: 1 @@ -661,9 +661,9 @@ idouble: 1 ifloat: 1 Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": double: 3 -float: 1 +float: 2 idouble: 3 -ifloat: 1 +ifloat: 2 ildouble: 2 ldouble: 2 Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": @@ -925,9 +925,9 @@ ildouble: 1 ldouble: 1 Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": double: 2 -float: 1 +float: 2 idouble: 2 -ifloat: 1 +ifloat: 2 ildouble: 2 ldouble: 2 Test "yn (10, 2.0) == -129184.542208039282635913145923304214": @@ -1228,9 +1228,9 @@ float: 1 ifloat: 1 Function: "j0": -double: 2 +double: 3 float: 2 -idouble: 2 +idouble: 3 ifloat: 2 ildouble: 2 ldouble: 2 diff --git a/sysdeps/unix/sysv/linux/i386/fchownat.c b/sysdeps/unix/sysv/linux/i386/fchownat.c index e5306db6ee..db5481705a 100644 --- a/sysdeps/unix/sysv/linux/i386/fchownat.c +++ b/sysdeps/unix/sysv/linux/i386/fchownat.c @@ -61,6 +61,24 @@ extern int __libc_missing_32bit_uids; int fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) { + int result; + +#ifdef __NR_fchownat +# ifndef __ASSUME_ATFCTS + if (__have_atfcts >= 0) +# endif + { + result = INLINE_SYSCALL (fchownat, 5, fd, file, owner, group, flag); +# ifndef __ASSUME_ATFCTS + if (result == -1 && errno == ENOSYS) + __have_atfcts = -1; + else +# endif + return result; + } +#endif + +#ifndef __ASSUME_ATFCTS if (flag & ~AT_SYMLINK_NOFOLLOW) { __set_errno (EINVAL); @@ -87,14 +105,13 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) file = buf; } - int result; INTERNAL_SYSCALL_DECL (err); -#if defined __NR_lchown || __ASSUME_LCHOWN_SYSCALL > 0 -# if __ASSUME_LCHOWN_SYSCALL == 0 +# if defined __NR_lchown || __ASSUME_LCHOWN_SYSCALL > 0 +# if __ASSUME_LCHOWN_SYSCALL == 0 static int __libc_old_chown; -# ifdef __NR_chown32 +# ifdef __NR_chown32 if (__libc_missing_32bit_uids <= 0) { if (flag & AT_SYMLINK_NOFOLLOW) @@ -111,7 +128,7 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) __libc_missing_32bit_uids = 1; } -# endif /* __NR_chown32 */ +# endif /* __NR_chown32 */ if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U)) || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) @@ -135,13 +152,13 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner, group); -# elif __ASSUME_32BITUIDS +# elif __ASSUME_32BITUIDS /* This implies __ASSUME_LCHOWN_SYSCALL. */ result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, group); -# else +# else /* !__ASSUME_32BITUIDS && ASSUME_LCHOWN_SYSCALL */ -# ifdef __NR_chown32 +# ifdef __NR_chown32 if (__libc_missing_32bit_uids <= 0) { result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, @@ -153,7 +170,7 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) __libc_missing_32bit_uids = 1; } -# endif /* __NR_chown32 */ +# endif /* __NR_chown32 */ if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U)) || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) { @@ -162,10 +179,10 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) } result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, group); -# endif -#else +# endif +# else result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, group); -#endif +# endif if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) goto fail; @@ -175,4 +192,5 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) fail: __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); return -1; +#endif } diff --git a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h index 1ddb4e349f..ef66d465de 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h @@ -43,9 +43,9 @@ #define O_SYNC 010000 #define O_FSYNC O_SYNC #define O_ASYNC 020000 -#define O_DIRECT 040000 #ifdef __USE_GNU +# define O_DIRECT 040000 # define O_DIRECTORY 0200000 /* must be a directory */ # define O_NOFOLLOW 0400000 /* don't follow links */ # define O_NOATIME 01000000 /* Do not set atime. */ diff --git a/sysdeps/unix/sysv/linux/powerpc/fchownat.c b/sysdeps/unix/sysv/linux/powerpc/fchownat.c index 1fbae5c448..f1b9b4db4a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/fchownat.c +++ b/sysdeps/unix/sysv/linux/powerpc/fchownat.c @@ -37,6 +37,24 @@ int fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) { + int result; + +#ifdef __NR_fchownat +# ifndef __ASSUME_ATFCTS + if (__have_atfcts >= 0) +# endif + { + result = INLINE_SYSCALL (fchownat, 5, fd, file, owner, group, flag); +# ifndef __ASSUME_ATFCTS + if (result == -1 && errno == ENOSYS) + __have_atfcts = -1; + else +# endif + return result; + } +#endif + +#ifndef __ASSUME_ATFCTS if (flag & ~AT_SYMLINK_NOFOLLOW) { __set_errno (EINVAL); @@ -63,15 +81,14 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) file = buf; } - int result; INTERNAL_SYSCALL_DECL (err); -#if __ASSUME_LCHOWN_SYSCALL +# if __ASSUME_LCHOWN_SYSCALL if (flag & AT_SYMLINK_NOFOLLOW) result = INTERNAL_SYSCALL (lchown, err, 3, file, owner, group); else result = INTERNAL_SYSCALL (chown, err, 3, file, owner, group); -#else +# else char link[PATH_MAX + 2]; char path[2 * PATH_MAX + 4]; int loopct; @@ -89,7 +106,7 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) goto out; } -# ifdef __NR_lchown +# ifdef __NR_lchown if (flag & AT_SYMLINK_NOFOLLOW) { result = INTERNAL_SYSCALL (lchown, err, 3, __ptrvalue (file), owner, @@ -110,25 +127,25 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) } libc_old_chown = -1; } -# else +# else if (flag & AT_SYMLINK_NOFOLLOW) { result = INTERNAL_SYSCALL (chown, err, 3, __ptrvalue (file), owner, group); goto out; } -# endif +# endif result = __readlink (file, link, PATH_MAX + 1); if (result == -1) { -# ifdef __NR_lchown +# ifdef __NR_lchown result = INTERNAL_SYSCALL (lchown, err, 3, __ptrvalue (file), owner, group); -# else +# else result = INTERNAL_SYSCALL (chown, err, 3, __ptrvalue (file), owner, group); -# endif +# endif goto out; } @@ -178,11 +195,11 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) if (result == -1) { -# ifdef __NR_lchown +# ifdef __NR_lchown result = INTERNAL_SYSCALL (lchown, err, 3, path, owner, group); -# else +# else result = INTERNAL_SYSCALL (chown, err, 3, path, owner, group); -# endif +# endif goto out; } } @@ -190,16 +207,17 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) return -1; out: -#endif +# endif if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) { -#if !__ASSUME_LCHOWN_SYSCALL +# if !__ASSUME_LCHOWN_SYSCALL fail: -#endif +# endif __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); result = -1; } return result; +#endif } diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c b/sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c index d927d7ca0d..abc06b07d9 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c @@ -53,6 +53,24 @@ extern int __libc_missing_32bit_uids; int fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) { + int result; + +#ifdef __NR_fchownat +# ifndef __ASSUME_ATFCTS + if (__have_atfcts >= 0) +# endif + { + result = INLINE_SYSCALL (fchownat, 5, fd, file, owner, group, flag); +# ifndef __ASSUME_ATFCTS + if (result == -1 && errno == ENOSYS) + __have_atfcts = -1; + else +# endif + return result; + } +#endif + +#ifndef __ASSUME_ATFCTS if (flag & ~AT_SYMLINK_NOFOLLOW) { __set_errno (EINVAL); @@ -79,16 +97,15 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) file = buf; } - int result; INTERNAL_SYSCALL_DECL (err); -#if __ASSUME_32BITUIDS > 0 +# if __ASSUME_32BITUIDS > 0 result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, group); -#else +# else static int __libc_old_chown; -# ifdef __NR_chown32 +# ifdef __NR_chown32 if (__libc_missing_32bit_uids <= 0) { if (flag & AT_SYMLINK_NOFOLLOW) @@ -105,7 +122,7 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) __libc_missing_32bit_uids = 1; } -# endif /* __NR_chown32 */ +# endif /* __NR_chown32 */ if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U)) || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) { @@ -128,7 +145,7 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner, group); -#endif +# endif if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) { @@ -138,4 +155,5 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) } return result; +#endif } diff --git a/sysdeps/unix/sysv/linux/sh/fchownat.c b/sysdeps/unix/sysv/linux/sh/fchownat.c index 6cc093222d..61df787c2a 100644 --- a/sysdeps/unix/sysv/linux/sh/fchownat.c +++ b/sysdeps/unix/sysv/linux/sh/fchownat.c @@ -40,6 +40,24 @@ extern int __libc_missing_32bit_uids; int fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) { + int result; + +#ifdef __NR_fchownat +# ifndef __ASSUME_ATFCTS + if (__have_atfcts >= 0) +# endif + { + result = INLINE_SYSCALL (fchownat, 5, fd, file, owner, group, flag); +# ifndef __ASSUME_ATFCTS + if (result == -1 && errno == ENOSYS) + __have_atfcts = -1; + else +# endif + return result; + } +#endif + +#ifndef __ASSUME_ATFCTS if (flag & ~AT_SYMLINK_NOFOLLOW) { __set_errno (EINVAL); @@ -66,18 +84,17 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) file = buf; } - int result; INTERNAL_SYSCALL_DECL (err); -#if __ASSUME_32BITUIDS > 0 +# if __ASSUME_32BITUIDS > 0 if (flag & AT_SYMLINK_NOFOLLOW) result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), owner, group); else result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, group); -#else -# ifdef __NR_chown32 +# else +# ifdef __NR_chown32 if (__libc_missing_32bit_uids <= 0) { if (flag & AT_SYMLINK_NOFOLLOW) @@ -94,7 +111,7 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) __libc_missing_32bit_uids = 1; } -# endif /* __NR_chown32 */ +# endif /* __NR_chown32 */ if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U)) || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) @@ -109,7 +126,7 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) else result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, group); -#endif +# endif if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) { @@ -119,4 +136,5 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) } return result; +#endif } |