diff --git a/ChangeLog b/ChangeLog index 31a5a7a44d..ef35a95bcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,79 @@ +2006-01-06 Ulrich Drepper + + [BZ #2114] + * ncsd/aicache.c: Don't use sendfile for records on the stack. + * nscd/grpcache.c: Likewise. + * nscd/hstcache.c: Likewise. + * nscd/initgrcache.c: Likewise. + * nscd/pwdcache.c: Likewise. + Patch by dmueller@suse.com. + + * sysdeps/unix/sysv/linux/alpha/bits/mman.h: Define MADV_REMOVE. + * sysdeps/unix/sysv/linux/i386/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/sh/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Likewise. + +2006-01-06 Roland McGrath + + * Makeconfig (+gnu-stabs): Remove ancient cruft. + + [BZ #2103] + * sysdeps/unix/sysv/linux/net/if_arp.h (ARPHRD_HWX25): Corrected macro + name (was typo ARPHDR_HWX25). + (ARPHRD_IEEE80211_PRISM, ARPHRD_IEEE80211_RADIOTAP): New macros. + (ARPHRD_VOID, ARPHRD_NONE): New macros. + + * sysdeps/wordsize-32/divdi3.c (__moddi3): Add a cast. + + * io/fcntl.h [__USE_ATFILE] (AT_EACCESS): New macro. + * posix/unistd.h [__USE_ATFILE]: Declare faccessat. + * io/faccessat.c: New file. + * sysdeps/unix/sysv/linux/faccessat.c: New file. + * io/Makefile (routines): Add faccessat. + * io/Versions (libc: GLIBC_2.4): Likewise. + * io/tst-faccessat.c: New file. + * io/Makefile (tests): Add it. + + * scripts/check-local-headers.sh: Revert last change. + + * io/euidaccess.c: Add eaccess as an alias. + * sysdeps/mach/hurd/euidaccess.c: Likewise. + * sysdeps/posix/euidaccess.c: Likewise. + * posix/unistd.h [__USE_GNU]: Declare eaccess. + * io/Versions (libc: GLIBC_2.4): Add eaccess. + +2005-12-04 Joseph S. Myers + + * soft-fp/Makefile (gcc-single-routines): Add unordsf2, + floatunsisf, floatundisf. + (gcc-double-routines): Add unorddf2, floatunsidf, floatundidf. + (gcc-quad-routines): Add unordtf2, floatunsitf, floatunditf. + * soft-fp/op-common.h (_FP_CMP_UNORD): Define. + * soft-fp/single.h (FP_CMP_UNORD_S): Define. + * soft-fp/double.h (FP_CMP_UNORD_D): Define. + * soft-fp/quad.h (FP_CMP_UNORD_Q): Define. + * soft-fp/extended.h (FP_CMP_UNORD_E): Define. + * soft-fp/unordsf2.c: New file. + * soft-fp/unorddf2.c: New file. + * soft-fp/unordtf2.c: New file. + * soft-fp/floatunsisf.c: New file. + * soft-fp/floatundisf.c: New file. + * soft-fp/floatunsidf.c: New file. + * soft-fp/floatundidf.c: New file. + * soft-fp/floatunsitf.c: New file. + * soft-fp/floatunditf.c: New file. + + * soft-fp/op-common.h (__FP_CLZ): Define using __builtin_clz, + __builtin_clzl and __builtin_clzll. + +2006-01-05 Mike Frysinger + + * include/alloca.h (extend_alloca): Fix typoed name 'extern_alloca'. + 2006-01-05 Jakub Jelinek * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_WAITID_SYSCALL): @@ -29,6 +105,7 @@ * libio/stdio.h: Likewise. * posix/unistd.h: Likewise. * time/sys/time.h: Likewise. + * io/sys/stat.h: Likewise. * io/sys/stat.h [__USE_GNU]: Declare fchmodat. * io/fchmodat.c: New file. diff --git a/Makeconfig b/Makeconfig index 67f85c0905..20b79b1ae2 100644 --- a/Makeconfig +++ b/Makeconfig @@ -1,4 +1,4 @@ -# Copyright (C) 1991-2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1991-2003,2004,2005,2006 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 @@ -742,8 +742,6 @@ endif endif ASFLAGS += $(ASFLAGS-config) -+gnu-stabs = $(shell echo>&2 '*** BARF ON ME') - ifndef BUILD_CC BUILD_CC = $(CC) endif diff --git a/fedora/branch.mk b/fedora/branch.mk index b919262658..eca618c0c3 100644 --- a/fedora/branch.mk +++ b/fedora/branch.mk @@ -3,5 +3,5 @@ glibc-branch := fedora glibc-base := HEAD DIST_BRANCH := devel COLLECTION := dist-fc4 -fedora-sync-date := 2006-01-06 09:16 UTC -fedora-sync-tag := fedora-glibc-20060106T0916 +fedora-sync-date := 2006-01-06 21:48 UTC +fedora-sync-tag := fedora-glibc-20060106T2148 diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in index a4e2a56458..10f39c4593 100644 --- a/fedora/glibc.spec.in +++ b/fedora/glibc.spec.in @@ -1,4 +1,4 @@ -%define glibcrelease 28 +%define glibcrelease 29 %define auxarches i586 i686 athlon sparcv9 alphaev6 %define prelinkarches noarch %define xenarches i686 athlon @@ -1128,6 +1128,11 @@ rm -f *.filelist* %endif %changelog +* Fri Jan 6 2006 Jakub Jelinek 2.3.90-29 +- update from CVS + - make pthread_mutex_t an unnamed union again, as it affects + libstdc++ ABI mangling + * Fri Jan 6 2006 Jakub Jelinek 2.3.90-28 - update from CVS - make aio_suspend interruptible by signals (#171968) diff --git a/include/alloca.h b/include/alloca.h index de541f4e5a..563d7868bd 100644 --- a/include/alloca.h +++ b/include/alloca.h @@ -42,7 +42,7 @@ extern int __libc_alloca_cutoff (size_t size) __attribute__ ((const)); len = __newlen; \ __newbuf; }) #else -# define extern_alloca(buf, len, newlen) \ +# define extend_alloca(buf, len, newlen) \ __alloca (((len) = (newlen))) #endif diff --git a/io/Makefile b/io/Makefile index b263a48705..5e6d72eace 100644 --- a/io/Makefile +++ b/io/Makefile @@ -35,10 +35,10 @@ routines := \ fxstatat fxstatat64 \ statfs fstatfs statfs64 fstatfs64 \ statvfs fstatvfs statvfs64 fstatvfs64 \ - umask chmod fchmod lchmod fchmodat \ + umask chmod fchmod lchmod fchmodat \ mkdir mkdirat \ open open64 openat openat64 close \ - read write lseek lseek64 access euidaccess \ + read write lseek lseek64 access euidaccess faccessat \ fcntl flock lockf lockf64 \ dup dup2 pipe \ creat creat64 \ @@ -64,7 +64,7 @@ test-srcs := ftwtest tests := test-utime test-stat test-stat2 test-lfs tst-getcwd \ tst-fcntl bug-ftw1 bug-ftw2 bug-ftw3 bug-ftw4 tst-statvfs \ tst-openat tst-unlinkat tst-fstatat tst-futimesat \ - tst-renameat tst-fchownat tst-fchmodat + tst-renameat tst-fchownat tst-fchmodat tst-faccessat distribute := ftwtest-sh diff --git a/io/Versions b/io/Versions index 8cb1abdb42..16006a8e08 100644 --- a/io/Versions +++ b/io/Versions @@ -98,6 +98,9 @@ libc { nftw; nftw64; } GLIBC_2.4 { + eaccess; + + faccessat; fchmodat; fchownat; __fxstatat; __fxstatat64; diff --git a/io/euidaccess.c b/io/euidaccess.c index 028fe9085c..943f1f7c82 100644 --- a/io/euidaccess.c +++ b/io/euidaccess.c @@ -1,5 +1,5 @@ /* Test for access to FILE using effective UID and GID. Stub version. - Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1991,1995,1996,1997,2006 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,5 +36,7 @@ __euidaccess (file, type) return -1; } weak_alias (__euidaccess, euidaccess) +weak_alias (__euidaccess, eaccess) stub_warning (euidaccess) +stub_warning (eaccess) #include diff --git a/io/faccessat.c b/io/faccessat.c new file mode 100644 index 0000000000..8e41d37c21 --- /dev/null +++ b/io/faccessat.c @@ -0,0 +1,51 @@ +/* Test for access to file, relative to open directory. Stub version. + Copyright (C) 2006 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include + +int +faccessat (fd, file, type, flag) + int fd; + const char *file; + int type; + int flag; +{ + if (file == NULL || (flag & ~(AT_SYMLINK_NOFOLLOW | AT_EACCESS)) != 0 + || (type & ~(R_OK|W_OK|X_OK|F_OK)) != 0) + { + __set_errno (EINVAL); + return -1; + } + + if (fd < 0 && fd != AT_FDCWD) + { + __set_errno (EBADF); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (faccessat) + +#include diff --git a/io/fcntl.h b/io/fcntl.h index fd45933fc2..e50afbbfd1 100644 --- a/io/fcntl.h +++ b/io/fcntl.h @@ -63,6 +63,8 @@ __BEGIN_DECLS # define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */ # define AT_REMOVEDIR 0x200 /* Remove directory instead of unlinking file. */ +# define AT_EACCESS 0x200 /* Test access permitted for + effective IDs, not real IDs. */ #endif /* Do the file control operation described by CMD on FD. diff --git a/io/sys/stat.h b/io/sys/stat.h index 93cd7d0610..4cc0b429a2 100644 --- a/io/sys/stat.h +++ b/io/sys/stat.h @@ -228,7 +228,7 @@ extern int stat64 (__const char *__restrict __file, extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2)); #endif -#ifdef __USE_GNU +#ifdef __USE_ATFILE /* Similar to stat, get the attributes for FILE and put them in BUF. Relative path names are interpreted relative to FD unless FD is AT_FDCWD. */ @@ -293,12 +293,12 @@ extern int lchmod (__const char *__file, __mode_t __mode) extern int fchmod (int __fd, __mode_t __mode) __THROW; #endif -#ifdef __USE_GNU +#ifdef __USE_ATFILE /* Set file access permissions of FILE relative to the directory FD is open on. */ extern int fchmodat (int __fd, __const char *__file, __mode_t mode, int __flag) __THROW __nonnull ((2)) __wur; -#endif /* Use GNU. */ +#endif /* Use ATFILE. */ @@ -316,7 +316,7 @@ extern __mode_t getumask (void) __THROW; extern int mkdir (__const char *__path, __mode_t __mode) __THROW __nonnull ((1)); -#ifdef __USE_GNU +#ifdef __USE_ATFILE /* Like mkdir, create a new directory with permission bits MODE. But interpret relative PATH names relative to the directory associated with FD. */ @@ -332,7 +332,7 @@ extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev) __THROW __nonnull ((1)); #endif -#ifdef __USE_GNU +#ifdef __USE_ATFILE /* Like mknod, create a new device file with permission bits MODE and device number DEV. But interpret relative PATH names relative to the directory associated with FD. */ @@ -345,7 +345,7 @@ extern int mknodat (int __fd, __const char *__path, __mode_t __mode, extern int mkfifo (__const char *__path, __mode_t __mode) __THROW __nonnull ((1)); -#ifdef __USE_GNU +#ifdef __USE_ATFILE /* Like mkfifo, create a new FIFO with permission bits MODE. But interpret relative PATH names relative to the directory associated with FD. */ @@ -450,7 +450,7 @@ __NTH (fstat (int __fd, struct stat *__statbuf)) return __fxstat (_STAT_VER, __fd, __statbuf); } -# ifdef __USE_GNU +# ifdef __USE_ATFILE extern __inline__ int __NTH (fstatat (int __fd, __const char *__filename, struct stat *__statbuf, int __flag)) @@ -467,7 +467,7 @@ __NTH (mknod (__const char *__path, __mode_t __mode, __dev_t __dev)) } # endif -# ifdef __USE_GNU +# ifdef __USE_ATFILE extern __inline__ int __NTH (mknodat (int __fd, __const char *__path, __mode_t __mode, __dev_t __dev)) diff --git a/io/tst-faccessat.c b/io/tst-faccessat.c new file mode 100644 index 0000000000..3bf7aed2e5 --- /dev/null +++ b/io/tst-faccessat.c @@ -0,0 +1,153 @@ +/* Test for faccessat function. */ + +#include +#include +#include +#include +#include +#include + + +static void prepare (void); +#define PREPARE(argc, argv) prepare () + +static int do_test (void); +#define TEST_FUNCTION do_test () + +#include "../test-skeleton.c" + +static int dir_fd; + +static void +prepare (void) +{ + size_t test_dir_len = strlen (test_dir); + static const char dir_name[] = "/tst-faccessat.XXXXXX"; + + size_t dirbuflen = test_dir_len + sizeof (dir_name); + char *dirbuf = malloc (dirbuflen); + if (dirbuf == NULL) + { + puts ("out of memory"); + exit (1); + } + + snprintf (dirbuf, dirbuflen, "%s%s", test_dir, dir_name); + if (mkdtemp (dirbuf) == NULL) + { + puts ("cannot create temporary directory"); + exit (1); + } + + add_temp_file (dirbuf); + + dir_fd = open (dirbuf, O_RDONLY | O_DIRECTORY); + if (dir_fd == -1) + { + puts ("cannot open directory"); + exit (1); + } +} + + +static int +do_test (void) +{ + /* fdopendir takes over the descriptor, make a copy. */ + int dupfd = dup (dir_fd); + if (dupfd == -1) + { + puts ("dup failed"); + return 1; + } + if (lseek (dupfd, 0, SEEK_SET) != 0) + { + puts ("1st lseek failed"); + return 1; + } + + /* The directory should be empty save the . and .. files. */ + DIR *dir = fdopendir (dupfd); + if (dir == NULL) + { + puts ("fdopendir failed"); + return 1; + } + struct dirent64 *d; + while ((d = readdir64 (dir)) != NULL) + if (strcmp (d->d_name, ".") != 0 && strcmp (d->d_name, "..") != 0) + { + printf ("temp directory contains file \"%s\"\n", d->d_name); + return 1; + } + closedir (dir); + + /* Try to create a file. */ + int fd = openat (dir_fd, "some-file", O_CREAT|O_RDWR|O_EXCL, 0666); + if (fd == -1) + { + if (errno == ENOSYS) + { + puts ("*at functions not supported"); + return 0; + } + + puts ("file creation failed"); + return 1; + } + write (fd, "hello", 5); + puts ("file created"); + + close (fd); + + int result = 0; + + if (faccessat (dir_fd, "some-file", F_OK, AT_EACCESS)) + { + printf ("faccessat F_OK: %m\n"); + result = 1; + } + if (faccessat (dir_fd, "some-file", W_OK, AT_EACCESS)) + { + printf ("faccessat W_OK: %m\n"); + result = 1; + } + + errno = 0; + if (faccessat (dir_fd, "some-file", X_OK, AT_EACCESS) == 0 + || errno != EACCES) + { + printf ("faccessat X_OK on nonexecutable: %m\n"); + result = 1; + } + + if (fchmodat (dir_fd, "some-file", 0400, 0) != 0) + { + printf ("fchownat failed: %m\n"); + return 1; + } + + if (faccessat (dir_fd, "some-file", R_OK, AT_EACCESS)) + { + printf ("faccessat R_OK: %m\n"); + result = 1; + } + + errno = 0; + if (faccessat (dir_fd, "some-file", W_OK, AT_EACCESS) == 0 + || errno != EACCES) + { + printf ("faccessat W_OK on unwritable file: %m\n"); + result = 1; + } + + if (unlinkat (dir_fd, "some-file", 0) != 0) + { + puts ("unlinkat failed"); + result = 1; + } + + close (dir_fd); + + return result; +} diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 73fc297317..a3d46cbf60 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,19 @@ +2006-01-06 Ulrich Drepper + + * sysdeps/ia64/tls.h (tcbhead_t): Rename private membe to __private. + * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private + rename in tcbhead_t. + + * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t): + Don't give the union a name because it changes the mangled name. + Instead name the struct for __data. + * 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/x86_64/bits/pthreadtypes.h: Likewise. + * pthread_create.c (start_thread): Adjust robust mutex free loop. + * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust. + 2006-01-05 Ulrich Drepper * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait): diff --git a/nptl/descr.h b/nptl/descr.h index a9f830ef0b..2a607d3d21 100644 --- a/nptl/descr.h +++ b/nptl/descr.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -135,15 +135,15 @@ struct pthread pid_t pid; /* List of robust mutexes the thread is holding. */ - pthread_mutex_t *robust_list; + struct __pthread_mutex_s *robust_list; #ifdef __PTHREAD_MUTEX_HAVE_PREV # define ENQUEUE_MUTEX(mutex) \ do { \ mutex->__data.__next = THREAD_GETMEM (THREAD_SELF, robust_list); \ - THREAD_SETMEM (THREAD_SELF, robust_list, mutex); \ + THREAD_SETMEM (THREAD_SELF, robust_list, &mutex->__data); \ if (mutex->__data.__next != NULL) \ - mutex->__data.__next->__data.__prev = mutex; \ + mutex->__data.__next->__prev = &mutex->__data; \ mutex->__data.__prev = NULL; \ } while (0) # define DEQUEUE_MUTEX(mutex) \ @@ -151,9 +151,9 @@ struct pthread if (mutex->__data.__prev == NULL) \ THREAD_SETMEM (THREAD_SELF, robust_list, mutex->__data.__next); \ else \ - mutex->__data.__prev->__data.__next = mutex->__data.__next; \ + mutex->__data.__prev->__next = mutex->__data.__next; \ if (mutex->__data.__next != NULL) \ - mutex->__data.__next->__data.__prev = mutex->__data.__prev; \ + mutex->__data.__next->__prev = mutex->__data.__prev; \ mutex->__data.__prev = NULL; \ mutex->__data.__next = NULL; \ } while (0) @@ -161,19 +161,19 @@ struct pthread # define ENQUEUE_MUTEX(mutex) \ do { \ mutex->__data.__next = THREAD_GETMEM (THREAD_SELF, robust_list); \ - THREAD_SETMEM (THREAD_SELF, robust_list, mutex); \ + THREAD_SETMEM (THREAD_SELF, robust_list, &mutex->__data); \ } while (0) # define DEQUEUE_MUTEX(mutex) \ do { \ - pthread_mutex_t *runp = THREAD_GETMEM (THREAD_SELF, robust_list); \ - if (runp == mutex) \ - THREAD_SETMEM (THREAD_SELF, robust_list, runp->__data.__next); \ + struct pthread_mutex_s *runp = THREAD_GETMEM (THREAD_SELF, robust_list); \ + if (runp == &mutex->__data) \ + THREAD_SETMEM (THREAD_SELF, robust_list, runp->__next); \ else \ { \ - while (runp->__data.__next != mutex) \ - runp = runp->__data.__next; \ + while (runp->__next != &mutex->__data) \ + runp = runp->__next; \ \ - runp->__data.__next = runp->__data.__next->__data.__next; \ + runp->__next = runp->__next->__next; \ mutex->__data.__next = NULL; \ } \ } while (0) diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c index 2dbe58dcd4..94d424b1f2 100644 --- a/nptl/pthread_create.c +++ b/nptl/pthread_create.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -311,25 +311,25 @@ start_thread (void *arg) atomic_bit_set (&pd->cancelhandling, EXITING_BIT); /* If this thread has any robust mutexes locked, handle them now. */ - pthread_mutex_t *robust = THREAD_GETMEM (pd, robust_list); + struct __pthread_mutex_s *robust = THREAD_GETMEM (pd, robust_list); if (__builtin_expect (robust != NULL, 0)) { do { - pthread_mutex_t *this = robust; - robust = robust->__data.__next; + struct __pthread_mutex_s *this = robust; + robust = robust->__next; - assert (lll_mutex_islocked (this->__data.__lock)); - this->__data.__count = 0; - --this->__data.__nusers; - assert (this->__data.__owner != PTHREAD_MUTEX_NOTRECOVERABLE); - this->__data.__owner = PTHREAD_MUTEX_OWNERDEAD; - this->__data.__next = NULL; + assert (lll_mutex_islocked (this->__lock)); + this->__count = 0; + --this->__nusers; + assert (this->__owner != PTHREAD_MUTEX_NOTRECOVERABLE); + this->__owner = PTHREAD_MUTEX_OWNERDEAD; + this->__next = NULL; #ifdef __PTHREAD_MUTEX_HAVE_PREV - this->__data.__prev = NULL; + this->__prev = NULL; #endif - lll_mutex_unlock (this->__data.__lock); + lll_mutex_unlock (this->__lock); } while (robust != NULL); diff --git a/nptl/sysdeps/ia64/tcb-offsets.sym b/nptl/sysdeps/ia64/tcb-offsets.sym index 3bc367082d..e1707ab1c8 100644 --- a/nptl/sysdeps/ia64/tcb-offsets.sym +++ b/nptl/sysdeps/ia64/tcb-offsets.sym @@ -4,4 +4,4 @@ PID offsetof (struct pthread, pid) - TLS_PRE_TCB_SIZE TID offsetof (struct pthread, tid) - TLS_PRE_TCB_SIZE MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads) - TLS_PRE_TCB_SIZE -SYSINFO_OFFSET offsetof (tcbhead_t, private) +SYSINFO_OFFSET offsetof (tcbhead_t, __private) diff --git a/nptl/sysdeps/ia64/tls.h b/nptl/sysdeps/ia64/tls.h index eb773aa97d..69101ad8c4 100644 --- a/nptl/sysdeps/ia64/tls.h +++ b/nptl/sysdeps/ia64/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. nptl/IA-64 version. - Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2006 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 @@ -44,7 +44,7 @@ typedef union dtv typedef struct { dtv_t *dtv; - void *private; + void *__private; } tcbhead_t; register struct pthread *__thread_self __asm__("r13"); @@ -113,9 +113,9 @@ register struct pthread *__thread_self __asm__("r13"); # define GET_DTV(descr) \ (((tcbhead_t *) (descr))->dtv) -#define THREAD_SELF_SYSINFO (((tcbhead_t *) __thread_self)->private) +#define THREAD_SELF_SYSINFO (((tcbhead_t *) __thread_self)->__private) #define THREAD_SYSINFO(pd) \ - (((tcbhead_t *) ((char *) (pd) + TLS_PRE_TCB_SIZE))->private) + (((tcbhead_t *) ((char *) (pd) + TLS_PRE_TCB_SIZE))->__private) #if defined NEED_DL_SYSINFO # define INIT_SYSINFO THREAD_SELF_SYSINFO = (void *) GLRO(dl_sysinfo) diff --git a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h index 3bd1019995..2341a9c650 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005, 2006 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 @@ -45,9 +45,9 @@ typedef union /* Data structures for mutex handling. The structure of the attribute type is not exposed on purpose. */ -typedef union __pthread_mutex_u +typedef union { - struct + struct __pthread_mutex_s { int __lock; unsigned int __count; @@ -59,7 +59,7 @@ typedef union __pthread_mutex_u union { int __spins; - union __pthread_mutex_u *__next; + struct __pthread_mutex_s *__next; }; } __data; char __size[__SIZEOF_PTHREAD_MUTEX_T]; diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h index a932101743..a13bb080a4 100644 --- a/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2003. @@ -45,9 +45,9 @@ typedef union /* Data structures for mutex handling. The structure of the attribute type is not exposed on purpose. */ -typedef union __pthread_mutex_u +typedef union { - struct + struct __pthread_mutex_s { int __lock; unsigned int __count; @@ -57,8 +57,8 @@ typedef union __pthread_mutex_u binary compatibility. */ int __kind; int __spins; - union __pthread_mutex_u *__next; - union __pthread_mutex_u *__prev; + struct __pthread_mutex_s *__next; + struct __pthread_mutex_s *__prev; #define __PTHREAD_MUTEX_HAVE_PREV 1 } __data; char __size[__SIZEOF_PTHREAD_MUTEX_T]; diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h index c6f345221b..56ffef3d0b 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h @@ -1,5 +1,5 @@ /* Machine-specific pthread type layouts. PowerPC version. - Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paul Mackerras , 2003. @@ -60,9 +60,9 @@ typedef union /* Data structures for mutex handling. The structure of the attribute type is deliberately not exposed. */ -typedef union __pthread_mutex_u +typedef union { - struct + struct __pthread_mutex_s { int __lock; unsigned int __count; @@ -75,15 +75,15 @@ typedef union __pthread_mutex_u int __kind; #if __WORDSIZE == 64 int __spins; - union __pthread_mutex_u *__next; - union __pthread_mutex_u *__prev; + struct __pthread_mutex_s *__next; + struct __pthread_mutex_s *__prev; # define __PTHREAD_MUTEX_HAVE_PREV 1 #else unsigned int __nusers; union { int __spins; - union __pthread_mutex_u *__next; + struct __pthread_mutex_s *__next; }; #endif } __data; diff --git a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h index 63f7f01fa1..a2ad05dd54 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky , 2003. @@ -59,9 +59,9 @@ typedef union /* Data structures for mutex handling. The structure of the attribute type is not exposed on purpose. */ -typedef union __pthread_mutex_u +typedef union { - struct + struct __pthread_mutex_s { int __lock; unsigned int __count; @@ -74,15 +74,15 @@ typedef union __pthread_mutex_u int __kind; #if __WORDSIZE == 64 int __spins; - union __pthread_mutex_u *__next; - union __pthread_mutex_u *__prev; + struct __pthread_mutex_s *__next; + struct __pthread_mutex_s *__prev; # define __PTHREAD_MUTEX_HAVE_PREV 1 #else unsigned int __nusers; union { int __spins; - union __pthread_mutex_u *__next; + struct __pthread_mutex_s *__next; }; #endif } __data; 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 3eb33a8646..ba940b35e0 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -59,9 +59,9 @@ typedef union /* Data structures for mutex handling. The structure of the attribute type is not exposed on purpose. */ -typedef union __pthread_mutex_u +typedef union { - struct + struct __pthread_mutex_s { int __lock; unsigned int __count; @@ -74,15 +74,15 @@ typedef union __pthread_mutex_u int __kind; #if __WORDSIZE == 64 int __spins; - union __pthread_mutex_u *__next; - union __pthread_mutex_u *__prev; + struct __pthread_mutex_s *__next; + struct __pthread_mutex_s *__prev; # define __PTHREAD_MUTEX_HAVE_PREV 1 #else unsigned int __nusers; union { int __spins; - union __pthread_mutex_u *__next; + struct __pthread_mutex_s *__next; }; #endif } __data; diff --git a/nscd/aicache.c b/nscd/aicache.c index 6f24daabec..4640b4df94 100644 --- a/nscd/aicache.c +++ b/nscd/aicache.c @@ -1,5 +1,5 @@ /* Cache handling for host lookup. - Copyright (C) 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -368,7 +368,7 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req, assert (fd != -1); #ifdef HAVE_SENDFILE - if (__builtin_expect (db->mmap_used, 1)) + if (__builtin_expect (db->mmap_used, 1) && !alloca_used) { assert (db->wr_fd != -1); assert ((char *) &dataset->resp > (char *) db->data); diff --git a/nscd/grpcache.c b/nscd/grpcache.c index d38a92809e..4bc9977bc4 100644 --- a/nscd/grpcache.c +++ b/nscd/grpcache.c @@ -1,5 +1,5 @@ /* Cache handling for group lookup. - Copyright (C) 1998-2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1998-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -296,7 +296,7 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req, assert (fd != -1); #ifdef HAVE_SENDFILE - if (__builtin_expect (db->mmap_used, 1)) + if (__builtin_expect (db->mmap_used, 1) && !alloca_used) { assert (db->wr_fd != -1); assert ((char *) &dataset->resp > (char *) db->data); diff --git a/nscd/hstcache.c b/nscd/hstcache.c index a7d981ad31..e27ece5bc6 100644 --- a/nscd/hstcache.c +++ b/nscd/hstcache.c @@ -1,5 +1,5 @@ /* Cache handling for host lookup. - Copyright (C) 1998-2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1998-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -330,7 +330,7 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req, assert (fd != -1); #ifdef HAVE_SENDFILE - if (__builtin_expect (db->mmap_used, 1)) + if (__builtin_expect (db->mmap_used, 1) && !alloca_used) { assert (db->wr_fd != -1); assert ((char *) &dataset->resp > (char *) db->data); diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c index 423dbbe4d3..f2ff03a0b1 100644 --- a/nscd/initgrcache.c +++ b/nscd/initgrcache.c @@ -1,5 +1,5 @@ /* Cache handling for host lookup. - Copyright (C) 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -347,7 +347,7 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req, assert (fd != -1); #ifdef HAVE_SENDFILE - if (__builtin_expect (db->mmap_used, 1)) + if (__builtin_expect (db->mmap_used, 1) && !alloca_used) { assert (db->wr_fd != -1); assert ((char *) &dataset->resp > (char *) db->data); diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c index 529c707de8..2daff79d78 100644 --- a/nscd/pwdcache.c +++ b/nscd/pwdcache.c @@ -1,5 +1,5 @@ /* Cache handling for passwd lookup. - Copyright (C) 1998-2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1998-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -291,7 +291,7 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req, assert (fd != -1); #ifdef HAVE_SENDFILE - if (__builtin_expect (db->mmap_used, 1)) + if (__builtin_expect (db->mmap_used, 1) && !alloca_used) { assert (db->wr_fd != -1); assert ((char *) &dataset->resp > (char *) db->data); diff --git a/posix/unistd.h b/posix/unistd.h index 480de5e40f..acb8f6f11d 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -260,8 +260,20 @@ extern int access (__const char *__name, int __type) __THROW __nonnull ((1)); (as normal file operations use). */ extern int euidaccess (__const char *__name, int __type) __THROW __nonnull ((1)); + +/* An alias for `euidaccess', used by some other systems. */ +extern int eaccess (__const char *__name, int __type) + __THROW __nonnull ((1)); #endif +#ifdef __USE_ATFILE +/* Test for access to FILE relative to the directory FD is open on. + If AT_EACCESS is set in FLAG, then use effective IDs like `eaccess', + otherwise use real IDs like `access'. */ +extern int faccessat (int __fd, __const char *__file, int __type, int __flag) + __THROW __nonnull ((2)) __wur; +#endif /* Use GNU. */ + /* Values for the WHENCE argument to lseek. */ #ifndef _STDIO_H /* has the same definitions. */ diff --git a/scripts/check-local-headers.sh b/scripts/check-local-headers.sh index 5896a933d2..88c85f7106 100755 --- a/scripts/check-local-headers.sh +++ b/scripts/check-local-headers.sh @@ -30,8 +30,7 @@ if fgrep "$includedir" */*.d | fgrep -v "$includedir/asm" | fgrep -v "$includedir/linux" | fgrep -v "$includedir/selinux" | -fgrep -v "$includedir/gd" | -fgrep -v "$includedir/c++"; then +fgrep -v "$includedir/gd"; then # If we found a match something is wrong. exit 1 fi diff --git a/soft-fp/Makefile b/soft-fp/Makefile index e0a3cfb0df..8eb89c5e51 100644 --- a/soft-fp/Makefile +++ b/soft-fp/Makefile @@ -23,17 +23,18 @@ subdir := soft-fp gcc-single-routines := negsf2 addsf3 subsf3 mulsf3 divsf3 eqsf2 \ - lesf2 gesf2 fixsfsi fixunssfsi floatsisf fixsfdi \ - fixunssfdi floatdisf sqrtsf2 + lesf2 gesf2 unordsf2 fixsfsi fixunssfsi floatsisf fixsfdi \ + fixunssfdi floatdisf sqrtsf2 floatunsisf floatundisf gcc-double-routines := negdf2 adddf3 subdf3 muldf3 divdf3 eqdf2 \ - ledf2 gedf2 fixdfsi fixunsdfsi floatsidf fixdfdi \ - fixunsdfdi floatdidf extendsfdf2 truncdfsf2 sqrtdf2 + ledf2 gedf2 unorddf2 fixdfsi fixunsdfsi floatsidf fixdfdi \ + fixunsdfdi floatdidf extendsfdf2 truncdfsf2 sqrtdf2 floatunsidf \ + floatundidf gcc-quad-routines := negtf2 addtf3 subtf3 multf3 divtf3 eqtf2 \ - letf2 getf2 fixtfsi fixunstfsi floatsitf fixtfdi \ + letf2 getf2 unordtf2 fixtfsi fixunstfsi floatsitf fixtfdi \ fixunstfdi floatditf extendsftf2 trunctfsf2 extenddftf2 \ - trunctfdf2 sqrttf2 + trunctfdf2 sqrttf2 floatunsitf floatunditf distribute := double.h op-1.h op-2.h op-4.h op-common.h quad.h \ single.h soft-fp.h extended.h Banner op-8.h testit.c \ diff --git a/soft-fp/double.h b/soft-fp/double.h index c659adec62..77d439b466 100644 --- a/soft-fp/double.h +++ b/soft-fp/double.h @@ -113,6 +113,7 @@ union _FP_UNION_D #define FP_CMP_D(r,X,Y,un) _FP_CMP(D,2,r,X,Y,un) #define FP_CMP_EQ_D(r,X,Y) _FP_CMP_EQ(D,2,r,X,Y) +#define FP_CMP_UNORD_D(r,X,Y) _FP_CMP_UNORD(D,2,r,X,Y) #define FP_TO_INT_D(r,X,rsz,rsg) _FP_TO_INT(D,2,r,X,rsz,rsg) #define FP_FROM_INT_D(X,r,rs,rt) _FP_FROM_INT(D,2,X,r,rs,rt) diff --git a/soft-fp/extended.h b/soft-fp/extended.h index 2edcbd05f0..a1f54ccceb 100644 --- a/soft-fp/extended.h +++ b/soft-fp/extended.h @@ -224,6 +224,7 @@ union _FP_UNION_E #define FP_CMP_E(r,X,Y,un) _FP_CMP(E,4,r,X,Y,un) #define FP_CMP_EQ_E(r,X,Y) _FP_CMP_EQ(E,4,r,X,Y) +#define FP_CMP_UNORD_E(r,X,Y) _FP_CMP_UNORD(E,4,r,X,Y) #define FP_TO_INT_E(r,X,rsz,rsg) _FP_TO_INT(E,4,r,X,rsz,rsg) #define FP_FROM_INT_E(X,r,rs,rt) _FP_FROM_INT(E,4,X,r,rs,rt) diff --git a/soft-fp/floatundidf.c b/soft-fp/floatundidf.c new file mode 100644 index 0000000000..03bda04e62 --- /dev/null +++ b/soft-fp/floatundidf.c @@ -0,0 +1,38 @@ +/* Software floating-point emulation. + Convert a 64bit unsigned integer to IEEE double + Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include "soft-fp.h" +#include "double.h" + +double +__floatundidf(UDItype i) +{ + FP_DECL_EX; + FP_DECL_D(A); + double a; + + FP_FROM_INT_D(A, i, 64, long long); + FP_PACK_D(a, A); + FP_HANDLE_EXCEPTIONS; + + return a; +} diff --git a/soft-fp/floatundisf.c b/soft-fp/floatundisf.c new file mode 100644 index 0000000000..68aa90fbf7 --- /dev/null +++ b/soft-fp/floatundisf.c @@ -0,0 +1,38 @@ +/* Software floating-point emulation. + Convert a 64bit unsigned integer to IEEE single + Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include "soft-fp.h" +#include "single.h" + +float +__floatundisf(UDItype i) +{ + FP_DECL_EX; + FP_DECL_S(A); + float a; + + FP_FROM_INT_S(A, i, 64, long long); + FP_PACK_S(a, A); + FP_HANDLE_EXCEPTIONS; + + return a; +} diff --git a/soft-fp/floatunditf.c b/soft-fp/floatunditf.c new file mode 100644 index 0000000000..2f53f7d6e4 --- /dev/null +++ b/soft-fp/floatunditf.c @@ -0,0 +1,38 @@ +/* Software floating-point emulation. + Convert a 64bit unsigned integer to IEEE quad + Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include "soft-fp.h" +#include "quad.h" + +long double +__floatunditf(UDItype i) +{ + FP_DECL_EX; + FP_DECL_Q(A); + long double a; + + FP_FROM_INT_Q(A, i, 64, long long); + FP_PACK_Q(a, A); + FP_HANDLE_EXCEPTIONS; + + return a; +} diff --git a/soft-fp/floatunsidf.c b/soft-fp/floatunsidf.c new file mode 100644 index 0000000000..2649adcb6d --- /dev/null +++ b/soft-fp/floatunsidf.c @@ -0,0 +1,38 @@ +/* Software floating-point emulation. + Convert a 32bit unsigned integer to IEEE double + Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include "soft-fp.h" +#include "double.h" + +double +__floatunsidf(USItype i) +{ + FP_DECL_EX; + FP_DECL_D(A); + double a; + + FP_FROM_INT_D(A, i, 32, int); + FP_PACK_D(a, A); + FP_HANDLE_EXCEPTIONS; + + return a; +} diff --git a/soft-fp/floatunsisf.c b/soft-fp/floatunsisf.c new file mode 100644 index 0000000000..a7f21ca68b --- /dev/null +++ b/soft-fp/floatunsisf.c @@ -0,0 +1,38 @@ +/* Software floating-point emulation. + Convert a 32bit unsigned integer to IEEE single + Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include "soft-fp.h" +#include "single.h" + +float +__floatunsisf(USItype i) +{ + FP_DECL_EX; + FP_DECL_S(A); + float a; + + FP_FROM_INT_S(A, i, 32, int); + FP_PACK_S(a, A); + FP_HANDLE_EXCEPTIONS; + + return a; +} diff --git a/soft-fp/floatunsitf.c b/soft-fp/floatunsitf.c new file mode 100644 index 0000000000..efb66e9f0a --- /dev/null +++ b/soft-fp/floatunsitf.c @@ -0,0 +1,38 @@ +/* Software floating-point emulation. + Convert a 32bit unsigned integer to IEEE quad + Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include "soft-fp.h" +#include "quad.h" + +long double +__floatunsitf(USItype i) +{ + FP_DECL_EX; + FP_DECL_Q(A); + long double a; + + FP_FROM_INT_Q(A, i, 32, int); + FP_PACK_Q(a, A); + FP_HANDLE_EXCEPTIONS; + + return a; +} diff --git a/soft-fp/op-common.h b/soft-fp/op-common.h index 3abafa14a8..f30260ede4 100644 --- a/soft-fp/op-common.h +++ b/soft-fp/op-common.h @@ -1,5 +1,5 @@ /* Software floating-point emulation. Common operations. - Copyright (C) 1997,1998,1999 Free Software Foundation, Inc. + Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz), @@ -553,6 +553,14 @@ do { \ } \ } while (0) +/* Version to test unordered. */ + +#define _FP_CMP_UNORD(fs, wc, ret, X, Y) \ + do { \ + ret = ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(X)) \ + || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y))); \ + } while (0) + /* * Main square root routine. The input value should be cooked. */ @@ -725,40 +733,18 @@ do { \ /* Count leading zeros in a word. */ #ifndef __FP_CLZ -#if _FP_W_TYPE_SIZE < 64 -/* this is just to shut the compiler up about shifts > word length -- PMM 02/1998 */ -#define __FP_CLZ(r, x) \ - do { \ - _FP_W_TYPE _t = (x); \ - r = _FP_W_TYPE_SIZE - 1; \ - if (_t > 0xffff) r -= 16; \ - if (_t > 0xffff) _t >>= 16; \ - if (_t > 0xff) r -= 8; \ - if (_t > 0xff) _t >>= 8; \ - if (_t & 0xf0) r -= 4; \ - if (_t & 0xf0) _t >>= 4; \ - if (_t & 0xc) r -= 2; \ - if (_t & 0xc) _t >>= 2; \ - if (_t & 0x2) r -= 1; \ +/* GCC 3.4 and later provide the builtins for us. */ +#define __FP_CLZ(r, x) \ + do { \ + if (sizeof (_FP_W_TYPE) == sizeof (unsigned int)) \ + r = __builtin_clz (x); \ + else if (sizeof (_FP_W_TYPE) == sizeof (unsigned long)) \ + r = __builtin_clzl (x); \ + else if (sizeof (_FP_W_TYPE) == sizeof (unsigned long long)) \ + r = __builtin_clzll (x); \ + else \ + abort (); \ } while (0) -#else /* not _FP_W_TYPE_SIZE < 64 */ -#define __FP_CLZ(r, x) \ - do { \ - _FP_W_TYPE _t = (x); \ - r = _FP_W_TYPE_SIZE - 1; \ - if (_t > 0xffffffff) r -= 32; \ - if (_t > 0xffffffff) _t >>= 32; \ - if (_t > 0xffff) r -= 16; \ - if (_t > 0xffff) _t >>= 16; \ - if (_t > 0xff) r -= 8; \ - if (_t > 0xff) _t >>= 8; \ - if (_t & 0xf0) r -= 4; \ - if (_t & 0xf0) _t >>= 4; \ - if (_t & 0xc) r -= 2; \ - if (_t & 0xc) _t >>= 2; \ - if (_t & 0x2) r -= 1; \ - } while (0) -#endif /* not _FP_W_TYPE_SIZE < 64 */ #endif /* ndef __FP_CLZ */ #define _FP_DIV_HELP_imm(q, r, n, d) \ diff --git a/soft-fp/quad.h b/soft-fp/quad.h index 33ee4d4b20..b03063bc05 100644 --- a/soft-fp/quad.h +++ b/soft-fp/quad.h @@ -119,6 +119,7 @@ union _FP_UNION_Q #define FP_CMP_Q(r,X,Y,un) _FP_CMP(Q,4,r,X,Y,un) #define FP_CMP_EQ_Q(r,X,Y) _FP_CMP_EQ(Q,4,r,X,Y) +#define FP_CMP_UNORD_Q(r,X,Y) _FP_CMP_UNORD(Q,4,r,X,Y) #define FP_TO_INT_Q(r,X,rsz,rsg) _FP_TO_INT(Q,4,r,X,rsz,rsg) #define FP_FROM_INT_Q(X,r,rs,rt) _FP_FROM_INT(Q,4,X,r,rs,rt) diff --git a/soft-fp/single.h b/soft-fp/single.h index b571d5058a..094dc3c484 100644 --- a/soft-fp/single.h +++ b/soft-fp/single.h @@ -102,6 +102,7 @@ union _FP_UNION_S #define FP_CMP_S(r,X,Y,un) _FP_CMP(S,1,r,X,Y,un) #define FP_CMP_EQ_S(r,X,Y) _FP_CMP_EQ(S,1,r,X,Y) +#define FP_CMP_UNORD_S(r,X,Y) _FP_CMP_UNORD(S,1,r,X,Y) #define FP_TO_INT_S(r,X,rsz,rsg) _FP_TO_INT(S,1,r,X,rsz,rsg) #define FP_FROM_INT_S(X,r,rs,rt) _FP_FROM_INT(S,1,X,r,rs,rt) diff --git a/soft-fp/unorddf2.c b/soft-fp/unorddf2.c new file mode 100644 index 0000000000..35f3e673db --- /dev/null +++ b/soft-fp/unorddf2.c @@ -0,0 +1,36 @@ +/* Software floating-point emulation. + Return 1 iff a or b is a NaN, 0 otherwise. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Joseph Myers (joseph@codesourcery.com). + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include "soft-fp.h" +#include "double.h" + +int +__unorddf2(double a, double b) +{ + FP_DECL_D(A); FP_DECL_D(B); + int r; + + FP_UNPACK_RAW_D(A, a); + FP_UNPACK_RAW_D(B, b); + FP_CMP_UNORD_D(r, A, B); + + return r; +} diff --git a/soft-fp/unordsf2.c b/soft-fp/unordsf2.c new file mode 100644 index 0000000000..e741b794c1 --- /dev/null +++ b/soft-fp/unordsf2.c @@ -0,0 +1,37 @@ +/* Software floating-point emulation. + Return 1 iff a or b is a NaN, 0 otherwise. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Joseph Myers (joseph@codesourcery.com). + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include "soft-fp.h" +#include "single.h" + +int +__unordsf2(float a, float b) +{ + FP_DECL_S(A); + FP_DECL_S(B); + int r; + + FP_UNPACK_RAW_S(A, a); + FP_UNPACK_RAW_S(B, b); + FP_CMP_UNORD_S(r, A, B); + + return r; +} diff --git a/soft-fp/unordtf2.c b/soft-fp/unordtf2.c new file mode 100644 index 0000000000..5e30ddb8d2 --- /dev/null +++ b/soft-fp/unordtf2.c @@ -0,0 +1,37 @@ +/* Software floating-point emulation. + Return 1 iff a or b is a NaN, 0 otherwise. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Joseph Myers (joseph@codesourcery.com). + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include "soft-fp.h" +#include "quad.h" + +int +__unordtf2(long double a, long double b) +{ + FP_DECL_Q(A); + FP_DECL_Q(B); + int r; + + FP_UNPACK_RAW_Q(A, a); + FP_UNPACK_RAW_Q(B, b); + FP_CMP_UNORD_Q(r, A, B); + + return r; +} diff --git a/sysdeps/mach/hurd/euidaccess.c b/sysdeps/mach/hurd/euidaccess.c index 4e72e2abb3..57f2a015cc 100644 --- a/sysdeps/mach/hurd/euidaccess.c +++ b/sysdeps/mach/hurd/euidaccess.c @@ -1,5 +1,5 @@ /* Test for access to FILE using effective UID and GID. Hurd version. - Copyright (C) 1991, 1995, 1997 Free Software Foundation, Inc. + Copyright (C) 1991, 1995, 1997, 2006 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 @@ -57,3 +57,4 @@ __euidaccess (file, type) return 0; } weak_alias (__euidaccess, euidaccess) +weak_alias (__euidaccess, eaccess) diff --git a/sysdeps/posix/euidaccess.c b/sysdeps/posix/euidaccess.c index 5464bfb374..76a09d455d 100644 --- a/sysdeps/posix/euidaccess.c +++ b/sysdeps/posix/euidaccess.c @@ -183,8 +183,10 @@ euidaccess (path, mode) return -1; } #undef euidaccess +#undef eaccess #ifdef weak_alias weak_alias (__euidaccess, euidaccess) +weak_alias (__euidaccess, eaccess) #endif #ifdef TEST diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 59574266a4..8ef939aeb3 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/Alpha version. - Copyright (C) 1997, 1998, 2000, 2003 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2003, 2006 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 @@ -96,6 +96,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 6 /* Don't need these pages. */ +# define MADV_REMOVE 7 /* Remove these pages and resources. */ #endif /* The POSIX people had to invent similar names for the same things. */ diff --git a/sysdeps/unix/sysv/linux/faccessat.c b/sysdeps/unix/sysv/linux/faccessat.c new file mode 100644 index 0000000000..80b3b240f7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/faccessat.c @@ -0,0 +1,123 @@ +/* Test for access to file, relative to open directory. Linux version. + Copyright (C) 2006 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +faccessat (fd, file, mode, flag) + int fd; + const char *file; + int mode; + int flag; +{ + if (flag & ~(AT_SYMLINK_NOFOLLOW | AT_EACCESS)) + { + __set_errno (EINVAL); + return -1; + } + + char *buf = NULL; + + if (fd != AT_FDCWD && file[0] != '/') + { + size_t filelen = strlen (file); + static const char procfd[] = "/proc/self/fd/%d/%s"; + /* Buffer for the path name we are going to use. It consists of + - the string /proc/self/fd/ + - the file descriptor number + - the file name provided. + The final NUL is included in the sizeof. A bit of overhead + due to the format elements compensates for possible negative + numbers. */ + size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; + buf = alloca (buflen); + + __snprintf (buf, buflen, procfd, fd, file); + file = buf; + } + + if ((!(flag & AT_EACCESS) || ! __libc_enable_secure) +#ifndef __NR_laccess /* Linux so far has no laccess syscall. */ + && !(flag & AT_SYMLINK_NOFOLLOW) +#endif + ) + { + /* If we are not set-uid or set-gid, access does the same. */ + + int result; + INTERNAL_SYSCALL_DECL (err); + +#ifdef __NR_laccess + if (flag & AT_SYMLINK_NOFOLLOW) + result = INTERNAL_SYSCALL (laccess, err, 2, file, mode); + else +#endif + result = INTERNAL_SYSCALL (access, err, 2, file, mode); + + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) + { + __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); + result = -1; + } + + return result; + } + + struct stat64 stats; + if (fstatat64 (fd, file, &stats, flag & AT_SYMLINK_NOFOLLOW)) + return -1; + + mode &= (X_OK | W_OK | R_OK); /* Clear any bogus bits. */ +#if R_OK != S_IROTH || W_OK != S_IWOTH || X_OK != S_IXOTH +# error Oops, portability assumptions incorrect. +#endif + + if (mode == F_OK) + return 0; /* The file exists. */ + + uid_t uid = (flag & AT_EACCESS) ? __geteuid () : __getuid (); + + /* The super-user can read and write any file, and execute any file + that anyone can execute. */ + if (uid == 0 && ((mode & X_OK) == 0 + || (stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))) + return 0; + + int granted = (uid == stats.st_uid + ? (unsigned int) (stats.st_mode & (mode << 6)) >> 6 + : (stats.st_gid == ((flag & AT_EACCESS) + ? __getegid () : __getgid ()) + || __group_member (stats.st_gid)) + ? (unsigned int) (stats.st_mode & (mode << 3)) >> 3 + : (stats.st_mode & mode)); + + if (granted == mode) + return 0; + + __set_errno (EACCES); + return -1; +} diff --git a/sysdeps/unix/sysv/linux/i386/bits/mman.h b/sysdeps/unix/sysv/linux/i386/bits/mman.h index d0f210f0bc..1c4ffbf581 100644 --- a/sysdeps/unix/sysv/linux/i386/bits/mman.h +++ b/sysdeps/unix/sysv/linux/i386/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/i386 version. - Copyright (C) 1997, 2000, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2003, 2005, 2006 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 @@ -88,6 +88,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_REMOVE 5 /* Remove these pages and resources. */ #endif /* The POSIX people had to invent similar names for the same things. */ diff --git a/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/sysdeps/unix/sysv/linux/ia64/bits/mman.h index a3d1b1dc7e..10bf9632c5 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/mman.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/ia64 version. - Copyright (C) 1997, 1998, 2000, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 1997,1998,2000,2003,2005,2006 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 @@ -89,6 +89,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_REMOVE 5 /* Remove these pages and resources. */ #endif /* The POSIX people had to invent similar names for the same things. */ diff --git a/sysdeps/unix/sysv/linux/net/if_arp.h b/sysdeps/unix/sysv/linux/net/if_arp.h index 46f035bef6..9608652ee4 100644 --- a/sysdeps/unix/sysv/linux/net/if_arp.h +++ b/sysdeps/unix/sysv/linux/net/if_arp.h @@ -1,5 +1,5 @@ /* Definitions for Address Resolution Protocol. - Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2001,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -96,7 +96,7 @@ struct arphdr #define ARPHRD_ADAPT 264 #define ARPHRD_ROSE 270 #define ARPHRD_X25 271 /* CCITT X.25. */ -#define ARPHDR_HWX25 272 /* Boards with X.25 in firmware. */ +#define ARPHRD_HWX25 272 /* Boards with X.25 in firmware. */ #define ARPHRD_PPP 512 #define ARPHRD_CISCO 513 /* Cisco HDLC. */ #define ARPHRD_HDLC ARPHRD_CISCO @@ -126,6 +126,12 @@ struct arphdr #define ARPHRD_FCFABRIC 787 /* Fibrechanel fabric. */ #define ARPHRD_IEEE802_TR 800 /* Magic type ident for TR. */ #define ARPHRD_IEEE80211 801 /* IEEE 802.11. */ +#define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header. */ +#define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header. */ + +#define ARPHRD_VOID 0xFFFF /* Void type, nothing is known. */ +#define ARPHRD_NONE 0xFFFE /* Zero header length. */ + /* ARP ioctl request. */ struct arpreq diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h index c2b195a71e..22ebfd120f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/PowerPC version. - Copyright (C) 1997, 2000, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2003, 2005, 2006 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 @@ -89,6 +89,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_REMOVE 5 /* Remove these pages and resources. */ #endif /* The POSIX people had to invent similar names for the same things. */ diff --git a/sysdeps/unix/sysv/linux/s390/bits/mman.h b/sysdeps/unix/sysv/linux/s390/bits/mman.h index 90604c8322..acedbf0f5d 100644 --- a/sysdeps/unix/sysv/linux/s390/bits/mman.h +++ b/sysdeps/unix/sysv/linux/s390/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/s390 version. - Copyright (C) 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 2000,2001,2002,2003,2005,2006 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 @@ -89,6 +89,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_REMOVE 5 /* Remove these pages and resources. */ #endif /* The POSIX people had to invent similar names for the same things. */ diff --git a/sysdeps/unix/sysv/linux/sh/bits/mman.h b/sysdeps/unix/sysv/linux/sh/bits/mman.h index a3c690b6c6..11067c5209 100644 --- a/sysdeps/unix/sysv/linux/sh/bits/mman.h +++ b/sysdeps/unix/sysv/linux/sh/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/SH version. - Copyright (C) 1997, 1999, 2000, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2000,2003,2005,2006 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 @@ -88,6 +88,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_REMOVE 5 /* Remove these pages and resources. */ #endif /* The POSIX people had to invent similar names for the same things. */ diff --git a/sysdeps/unix/sysv/linux/sparc/bits/mman.h b/sysdeps/unix/sysv/linux/sparc/bits/mman.h index 26425876ff..7c8689f223 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/mman.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/SPARC version. - Copyright (C) 1997, 1999, 2000, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2000,2003,2005,2006 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 @@ -90,6 +90,8 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_FREE 5 /* Content can be freed (Solaris). */ +# define MADV_REMOVE 6 /* Remove these pages and resources. */ #endif /* The POSIX people had to invent similar names for the same things. */ diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/mman.h b/sysdeps/unix/sysv/linux/x86_64/bits/mman.h index cc6be43a1c..b1a8b93d36 100644 --- a/sysdeps/unix/sysv/linux/x86_64/bits/mman.h +++ b/sysdeps/unix/sysv/linux/x86_64/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/x86_64 version. - Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2005, 2006 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 @@ -89,6 +89,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_REMOVE 5 /* Remove these pages and resources. */ #endif /* The POSIX people had to invent similar names for the same things. */ diff --git a/sysdeps/wordsize-32/divdi3.c b/sysdeps/wordsize-32/divdi3.c index 94fb008f1f..8fa6343841 100644 --- a/sysdeps/wordsize-32/divdi3.c +++ b/sysdeps/wordsize-32/divdi3.c @@ -1,6 +1,6 @@ /* 64-bit multiplication and division - Copyright (C) 1989, 1992-1999, 2000, 2001, 2002, 2003, 2004 - Free Software Foundation, Inc. + Copyright (C) 1989, 1992-1999,2000,2001,2002,2003,2004,2005 + 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 @@ -309,7 +309,7 @@ __moddi3 (DWtype u, DWtype v) } if (v < 0) v = -v; - __udivmoddi4 (u, v, &w); + __udivmoddi4 (u, v, (UDWtype *) &w); if (c) w = -w; return w;