about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-08-02 08:26:10 +0000
committerJakub Jelinek <jakub@redhat.com>2008-08-02 08:26:10 +0000
commit2fb513c60061821c7e5e7fb6014d2afd0308b7e9 (patch)
treec7d9546bed03277ec2921a1b2cbda1f78620450b /sysdeps/unix
parentc7045198ca8f4ff5b97205340d51127f8503c2bd (diff)
downloadglibc-2fb513c60061821c7e5e7fb6014d2afd0308b7e9.tar.gz
glibc-2fb513c60061821c7e5e7fb6014d2afd0308b7e9.tar.xz
glibc-2fb513c60061821c7e5e7fb6014d2afd0308b7e9.zip
Updated to fedora-glibc-20080802T0809 cvs/fedora-glibc-2_8_90-11
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/Versions2
-rw-r--r--sysdeps/unix/sysv/linux/dl-origin.c10
-rw-r--r--sysdeps/unix/sysv/linux/kernel-features.h16
-rw-r--r--sysdeps/unix/sysv/linux/paccept.c4
-rw-r--r--sysdeps/unix/sysv/linux/sys/epoll.h5
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list2
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/sys/epoll.h14
7 files changed, 34 insertions, 19 deletions
diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions
index 5a76028c6c..76ecae0013 100644
--- a/sysdeps/unix/sysv/linux/Versions
+++ b/sysdeps/unix/sysv/linux/Versions
@@ -136,7 +136,7 @@ libc {
     timerfd_create; timerfd_settime; timerfd_gettime;
   }
   GLIBC_2.9 {
-    epoll_create2; inotify_init1;
+    epoll_create1; inotify_init1;
   }
   GLIBC_PRIVATE {
     # functions used in other libraries
diff --git a/sysdeps/unix/sysv/linux/dl-origin.c b/sysdeps/unix/sysv/linux/dl-origin.c
index fdb6372f09..64e865b92a 100644
--- a/sysdeps/unix/sysv/linux/dl-origin.c
+++ b/sysdeps/unix/sysv/linux/dl-origin.c
@@ -35,16 +35,13 @@
 const char *
 _dl_get_origin (void)
 {
-#ifndef __ASSUME_AT_EXECFN
   char linkval[PATH_MAX];
-#endif
   const char *str;
   char *result = (char *) -1l;
   int len;
 
   str = GLRO(dl_execfn);
-#ifndef __ASSUME_AT_EXECFN
-  if (str == NULL)
+  if (str == NULL || str[0] != '/')
     {
       INTERNAL_SYSCALL_DECL (err);
 
@@ -53,12 +50,12 @@ _dl_get_origin (void)
       if (! INTERNAL_SYSCALL_ERROR_P (len, err)
 	  && len > 0 && linkval[0] != '[')
 	str = linkval;
+      else
+	str = NULL;
     }
   else
-#endif
     len = strlen (str);
 
-#ifndef __ASSUME_AT_EXECFN
   if (str == NULL)
     {
       /* We use the environment variable LD_ORIGIN_PATH.  If it is set make
@@ -79,7 +76,6 @@ _dl_get_origin (void)
 	}
     }
   else
-#endif
     {
       /* We can use this value.  */
       assert (str[0] == '/');
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index df87ae7c48..6031eae2d0 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -488,22 +488,26 @@
 # define __ASSUME_FALLOCATE	1
 #endif
 
+/* Support for various CLOEXEC and NONBLOCK flags was added for x86,
+   x86-64, PPC, IA-64, SPARC< and S390 in 2.6.23.  */
+#if __LINUX_KERNEL_VERSION >= 0x020617 \
+    && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
+	|| defined __ia64__ || defined __sparc__ || defined __s390__)
+# define __ASSUME_O_CLOEXEC	1
+#endif
+
 /* Support for ADJ_OFFSET_SS_READ was added in 2.6.24.  */
 #if __LINUX_KERNEL_VERSION >= 0x020618
 # define __ASSUME_ADJ_OFFSET_SS_READ	1
 #endif
 
-/* Support for AT_EXECFN was added in 2.6.27.  */
-#if __LINUX_KERNEL_VERSION >= 0x02061b
-# define __ASSUME_AT_EXECFN	1
-#endif
-
 /* Support for various CLOEXEC and NONBLOCK flags was added for x86,
    x86-64, PPC, IA-64, and SPARC in 2.6.27.  */
 #if __LINUX_KERNEL_VERSION >= 0x02061b \
     && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
-	|| defined __ia64__ || defined __sparc__)
+	|| defined __ia64__ || defined __sparc__ || __s390__)
 # define __ASSUME_SOCK_CLOEXEC	1
 # define __ASSUME_IN_NONBLOCK	1
 # define __ASSUME_PIPE2		1
+# define __ASSUME_PACCEPT	1
 #endif
diff --git a/sysdeps/unix/sysv/linux/paccept.c b/sysdeps/unix/sysv/linux/paccept.c
index 1817d381d9..cc2979c0ed 100644
--- a/sysdeps/unix/sysv/linux/paccept.c
+++ b/sysdeps/unix/sysv/linux/paccept.c
@@ -30,12 +30,12 @@ paccept (int fd, __SOCKADDR_ARG addr, socklen_t *addr_len,
 	 const __sigset_t *ss, int flags)
 {
   if (SINGLE_THREAD_P)
-    return INLINE_SYSCALL (paccept, 6, fd, addr, addr_len, ss,
+    return INLINE_SYSCALL (paccept, 6, fd, addr.__sockaddr__, addr_len, ss,
 			   _NSIG / 8, flags);
 
   int oldtype = LIBC_CANCEL_ASYNC ();
 
-  int result = INLINE_SYSCALL (paccept, 6, fd, addr, addr_len, ss,
+  int result = INLINE_SYSCALL (paccept, 6, fd, addr.__sockaddr__, addr_len, ss,
 			       _NSIG / 8, flags);
 
   LIBC_CANCEL_RESET (oldtype);
diff --git a/sysdeps/unix/sysv/linux/sys/epoll.h b/sysdeps/unix/sysv/linux/sys/epoll.h
index aa8784b1ee..12de0bcfe2 100644
--- a/sysdeps/unix/sysv/linux/sys/epoll.h
+++ b/sysdeps/unix/sysv/linux/sys/epoll.h
@@ -101,8 +101,9 @@ __BEGIN_DECLS
    returned by epoll_create() should be closed with close().  */
 extern int epoll_create (int __size) __THROW;
 
-/* Same as epoll_create but with an additional FLAGS parameter.  */
-extern int epoll_create2 (int __size, int __flags) __THROW;
+/* Same as epoll_create but with an FLAGS parameter.  The unused SIZE
+   parameter has been dropped.  */
+extern int epoll_create1 (int __flags) __THROW;
 
 
 /* Manipulate an epoll instance "epfd". Returns 0 in case of success,
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index f654d5ee00..a87906a4e3 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -8,7 +8,7 @@ creat		-	creat		Ci:si	__libc_creat creat
 create_module	EXTRA	create_module	3	create_module
 delete_module	EXTRA	delete_module	3	delete_module
 epoll_create	EXTRA	epoll_create	i:i	epoll_create
-epoll_create2	EXTRA	epoll_create2	i:ii	epoll_create2
+epoll_create1	EXTRA	epoll_create1	i:i	epoll_create1
 epoll_ctl	EXTRA	epoll_ctl	i:iiip	epoll_ctl
 epoll_wait	EXTRA	epoll_wait	Ci:ipii	epoll_wait
 fdatasync	-	fdatasync	Ci:i	fdatasync
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h b/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
index dfb65fe5fa..234798e4b8 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
@@ -31,6 +31,16 @@ typedef __sigset_t sigset_t;
 #endif
 
 
+/* Flags to be passed to epoll_create2.  */
+enum
+  {
+    EPOLL_CLOEXEC = 02000000,
+#define EPOLL_CLOEXEC EPOLL_CLOEXEC
+    EPOLL_NONBLOCK = 04000
+#define EPOLL_NONBLOCK EPOLL_NONBLOCK
+  };
+
+
 enum EPOLL_EVENTS
   {
     EPOLLIN = 0x001,
@@ -91,6 +101,10 @@ __BEGIN_DECLS
    returned by epoll_create() should be closed with close().  */
 extern int epoll_create (int __size) __THROW;
 
+/* Same as epoll_create but with an FLAGS parameter.  The unused SIZE
+   parameter has been dropped.  */
+extern int epoll_create1 (int __flags) __THROW;
+
 
 /* Manipulate an epoll instance "epfd". Returns 0 in case of success,
    -1 in case of error ( the "errno" variable will contain the