]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Updated to fedora-glibc-20060106T2148
authorJakub Jelinek <jakub@redhat.com>
Fri, 6 Jan 2006 21:55:58 +0000 (21:55 +0000)
committerJakub Jelinek <jakub@redhat.com>
Fri, 6 Jan 2006 21:55:58 +0000 (21:55 +0000)
57 files changed:
ChangeLog
Makeconfig
fedora/branch.mk
fedora/glibc.spec.in
include/alloca.h
io/Makefile
io/Versions
io/euidaccess.c
io/faccessat.c [new file with mode: 0644]
io/fcntl.h
io/sys/stat.h
io/tst-faccessat.c [new file with mode: 0644]
nptl/ChangeLog
nptl/descr.h
nptl/pthread_create.c
nptl/sysdeps/ia64/tcb-offsets.sym
nptl/sysdeps/ia64/tls.h
nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
nscd/aicache.c
nscd/grpcache.c
nscd/hstcache.c
nscd/initgrcache.c
nscd/pwdcache.c
posix/unistd.h
scripts/check-local-headers.sh
soft-fp/Makefile
soft-fp/double.h
soft-fp/extended.h
soft-fp/floatundidf.c [new file with mode: 0644]
soft-fp/floatundisf.c [new file with mode: 0644]
soft-fp/floatunditf.c [new file with mode: 0644]
soft-fp/floatunsidf.c [new file with mode: 0644]
soft-fp/floatunsisf.c [new file with mode: 0644]
soft-fp/floatunsitf.c [new file with mode: 0644]
soft-fp/op-common.h
soft-fp/quad.h
soft-fp/single.h
soft-fp/unorddf2.c [new file with mode: 0644]
soft-fp/unordsf2.c [new file with mode: 0644]
soft-fp/unordtf2.c [new file with mode: 0644]
sysdeps/mach/hurd/euidaccess.c
sysdeps/posix/euidaccess.c
sysdeps/unix/sysv/linux/alpha/bits/mman.h
sysdeps/unix/sysv/linux/faccessat.c [new file with mode: 0644]
sysdeps/unix/sysv/linux/i386/bits/mman.h
sysdeps/unix/sysv/linux/ia64/bits/mman.h
sysdeps/unix/sysv/linux/net/if_arp.h
sysdeps/unix/sysv/linux/powerpc/bits/mman.h
sysdeps/unix/sysv/linux/s390/bits/mman.h
sysdeps/unix/sysv/linux/sh/bits/mman.h
sysdeps/unix/sysv/linux/sparc/bits/mman.h
sysdeps/unix/sysv/linux/x86_64/bits/mman.h
sysdeps/wordsize-32/divdi3.c

index 31a5a7a44d5e7152df78e78c0e88ab2fdd970bec..ef35a95bcfefb3af4355117a36aa3261c6ef770f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,79 @@
+2006-01-06  Ulrich Drepper  <drepper@redhat.com>
+
+       [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  <roland@redhat.com>
+
+       * 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  <joseph@codesourcery.com>
+
+       * 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  <vapier@gentoo.org>
+
+       * include/alloca.h (extend_alloca): Fix typoed name 'extern_alloca'.
+
 2006-01-05  Jakub Jelinek  <jakub@redhat.com>
 
        * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_WAITID_SYSCALL):
        * 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.
index 67f85c09051a8069ae2b2f62e75e69c3a0d26c12..20b79b1ae257613c2b8c579ac36fa93511da616e 100644 (file)
@@ -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
index b919262658b8ab6bdf006810c806725dc028bac9..eca618c0c3b62d797c000d360c979c710cae4fca 100644 (file)
@@ -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
index a4e2a564588b8209cb260eb0cb5f67adae4aa19f..10f39c4593723396f22705ec57c5a9a1d0187ce9 100644 (file)
@@ -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 <jakub@redhat.com> 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 <jakub@redhat.com> 2.3.90-28
 - update from CVS
   - make aio_suspend interruptible by signals (#171968)
index de541f4e5ad86c6f7687c76eef222b7cb896463a..563d7868bdc89adc04a2f9ac43ae59b96698f28e 100644 (file)
@@ -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
 
index b263a487054c4228347c39e95f90e6fb2caf427b..5e6d72eacee7442c48d542c0c60c13c9e3e55486 100644 (file)
@@ -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
 
index 8cb1abdb4208ea9bdb3715d599a4f1d63d3546b2..16006a8e08ba5eb3a7de2869d2edb58873a65c75 100644 (file)
@@ -98,6 +98,9 @@ libc {
     nftw; nftw64;
   }
   GLIBC_2.4 {
+    eaccess;
+
+    faccessat;
     fchmodat;
     fchownat;
     __fxstatat; __fxstatat64;
index 028fe9085c25628c68ac540a93bc3feff1c03fb8..943f1f7c82c05dd5a6ea3e4a87c35e5f80eeb389 100644 (file)
@@ -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 <stub-tag.h>
diff --git a/io/faccessat.c b/io/faccessat.c
new file mode 100644 (file)
index 0000000..8e41d37
--- /dev/null
@@ -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 <errno.h>
+#include <fcntl.h>
+#include <stddef.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+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 <stub-tag.h>
index fd45933fc266304e13342c170203eeb56017ae3b..e50afbbfd12f15fd193385abfafa5ffa81121b96 100644 (file)
@@ -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.
index 93cd7d0610937e3744349bae1a9fd56a269efb97..4cc0b429a2e55285307a093a0154ce0cf6df6ca1 100644 (file)
@@ -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 (file)
index 0000000..3bf7aed
--- /dev/null
@@ -0,0 +1,153 @@
+/* Test for faccessat function.  */
+
+#include <dirent.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+
+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;
+}
index 73fc297317284eee16b7507b9f84a47afe04c7cc..a3d46cbf60e132bdfda61d0d415ae2765ebadacf 100644 (file)
@@ -1,3 +1,19 @@
+2006-01-06  Ulrich Drepper  <drepper@redhat.com>
+
+       * 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  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
index a9f830ef0bb9a9d27fd56247a12edd96c85c6821..2a607d3d2175e5e4280f96eec48d7b645ca495f8 100644 (file)
@@ -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 <drepper@redhat.com>, 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)
index 2dbe58dcd400415ea3641a10464d733d21af248d..94d424b1f28bf1aa736e14db7009d3772b343d85 100644 (file)
@@ -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 <drepper@redhat.com>, 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;
-
-         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;
+         struct __pthread_mutex_s *this = robust;
+         robust = robust->__next;
+
+         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);
 
index 3bc367082de0e16bc1bac47958da70b40a1204ef..e1707ab1c8c288570f7ca53f7448ebd4c59c57f9 100644 (file)
@@ -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)
index eb773aa97d1d52436eabc1637b9b8aa5ae051257..69101ad8c4c6941f91e590afea274dc3451a78aa 100644 (file)
@@ -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)
index 3bd101999564b697dd999722acca7f5663990869..2341a9c6501713d1ffa9659948bc5ff359ec6b4f 100644 (file)
@@ -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];
index a9321017435857288dbca2e8ac29a4dc3ec2cba0..a13bb080a4338436f500a90fde1aa6ed69a23904 100644 (file)
@@ -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 <jakub@redhat.com>, 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];
index c6f345221b0dea7699693c7a59d41618a0fa22af..56ffef3d0baa4b541a2ef9ac5eaba278256cb7a9 100644 (file)
@@ -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 <paulus@au.ibm.com>, 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;
index 63f7f01fa16046ad44aa17165ead5d52b20b28ab..a2ad05dd54c476f657ffaaac245f3824a434b53a 100644 (file)
@@ -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 <schwidefsky@de.ibm.com>, 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;
index 3eb33a8646cf60ff58fc89b13b8ae32915906590..ba940b35e09a88e071fd2810d8d8cb91bb40c561 100644 (file)
@@ -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 <drepper@redhat.com>, 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;
index 6f24daabecba603a482e2205fb2def56fc293b0a..4640b4df948a524e0d3ffaaee7809ec7fbeaecdc 100644 (file)
@@ -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 <drepper@redhat.com>, 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);
index d38a92809e9575756ee19b299337c9e2a921a0b7..4bc9977bc4e523ba10b2584aacf1648cae6aaba6 100644 (file)
@@ -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 <drepper@cygnus.com>, 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);
index a7d981ad316c1a96f414dd579aa3226814898724..e27ece5bc6fdeae307692c9267a7e31dbe0e4ae1 100644 (file)
@@ -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 <drepper@cygnus.com>, 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);
index 423dbbe4d3a7a49f1c278b4295f0999ee740a811..f2ff03a0b15a2dcff70318c47ec9622d4ba508ff 100644 (file)
@@ -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 <drepper@redhat.com>, 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);
index 529c707de8cab29b211ddf986375a691edd02024..2daff79d78ea514774d4a25970b62e99ae513304 100644 (file)
@@ -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 <drepper@cygnus.com>, 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);
index 480de5e40f1b687aa3ced53871861242f07de925..acb8f6f11d1651b5aa6bcc365fb99621e2745dbf 100644 (file)
@@ -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                /* <stdio.h> has the same definitions.  */
index 5896a933d29d259c2aabb9ef8e98df7fe4eada56..88c85f7106993b973aa9b86ee7c15578c870a5f4 100755 (executable)
@@ -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
index e0a3cfb0df99f4d944c1a57e75659bcf31941e86..8eb89c5e517b3a2a59462db8eab2d67cbc74f2f6 100644 (file)
 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 \
index c659adec6213e4c01af16504622431a65c1e1c0f..77d439b4660adaf0cf87157d5524d5151be3845f 100644 (file)
@@ -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)
index 2edcbd05f089d7c8c6b618d5d5ceaa2210ef3d28..a1f54ccceb0acbb42120204b7e2134bdde5393fe 100644 (file)
@@ -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 (file)
index 0000000..03bda04
--- /dev/null
@@ -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 (file)
index 0000000..68aa90f
--- /dev/null
@@ -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 (file)
index 0000000..2f53f7d
--- /dev/null
@@ -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 (file)
index 0000000..2649adc
--- /dev/null
@@ -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 (file)
index 0000000..a7f21ca
--- /dev/null
@@ -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 (file)
index 0000000..efb66e9
--- /dev/null
@@ -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;
+}
index 3abafa14a8af59df09068f46c9dc0317c5ff57ea..f30260ede4228140c2ddf8262fbe7d67e2313b2d 100644 (file)
@@ -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;                      \
-  } 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;                      \
+/* 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)
-#endif /* not _FP_W_TYPE_SIZE < 64 */
 #endif /* ndef __FP_CLZ */
 
 #define _FP_DIV_HELP_imm(q, r, n, d)           \
index 33ee4d4b20aa09cc87402f62e41bd0ba5c0ab4de..b03063bc0544824b0998caad68d8261c63a9020e 100644 (file)
@@ -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)
index b571d5058a32e6d375915b2b810a66b9d8b3fb26..094dc3c484e3a00f17e0562baa1a263f9dc10608 100644 (file)
@@ -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 (file)
index 0000000..35f3e67
--- /dev/null
@@ -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 (file)
index 0000000..e741b79
--- /dev/null
@@ -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 (file)
index 0000000..5e30ddb
--- /dev/null
@@ -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;
+}
index 4e72e2abb39b4bb487f65fd2b728192c42ee584d..57f2a015cc24568ce7a6c2c5cd0a0dff244fea0d 100644 (file)
@@ -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)
index 5464bfb374dc050d14133ab85e63877b0dcde103..76a09d455d67297421456ba148b19d4d39c9a8c3 100644 (file)
@@ -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
 \f
 #ifdef TEST
index 59574266a497e97a60f4468014c2bf424c3e33b4..8ef939aeb352f41fecc9ff11ece40ffcb0885015 100644 (file)
@@ -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 (file)
index 0000000..80b3b24
--- /dev/null
@@ -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 <errno.h>
+#include <fcntl.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <alloca.h>
+#include <sysdep.h>
+
+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;
+}
index d0f210f0bceb0c5b51b809c824859e51914c6d06..1c4ffbf5818abc0263ce498a85c840526fa7a9eb 100644 (file)
@@ -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.  */
index a3d1b1dc7e78d617ba133b3d98e5dbab0d81023f..10bf9632c51a763e06b7e99a4a8c559923641ccb 100644 (file)
@@ -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.  */
index 46f035bef6a9ffe8c89b56bb0e7c96cc7d9db5bc..9608652ee4ce2a5af2ffe31e498f11c3ddaf7244 100644 (file)
@@ -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 <drepper@cygnus.com>, 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
index c2b195a71e0dc1b0257f6dfc2645dddabcda1ae0..22ebfd120f3ce86ab4b0be3bb1e95bcfdda7ad8a 100644 (file)
@@ -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.  */
index 90604c8322043c5e854b7457e9c382c95f4bfd59..acedbf0f5d179ef46f585f182df68ac244632b4d 100644 (file)
@@ -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.  */
index a3c690b6c6429fc51f42a2472c600c2185f4e522..11067c5209321c401f401ba9362e0b3b1fc33784 100644 (file)
@@ -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.  */
index 26425876ffa4ba708a80f3a205f674e54f9076df..7c8689f22334f50f7dd2b40c651f65774db45be3 100644 (file)
@@ -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.  */
index cc6be43a1c51e346882fe45dbf2d526a54530043..b1a8b93d3644ed84d50784b8ebd8bed9c49e4846 100644 (file)
@@ -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.  */
index 94fb008f1fc3997cc14ad3de80c532337cd7804e..8fa63438419f41dc608c961b6178c9205f99af36 100644 (file)
@@ -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;