about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-07-16 18:11:48 +0000
committerUlrich Drepper <drepper@redhat.com>2004-07-16 18:11:48 +0000
commit06eee9f5f6e6911d6ded34eab033373057cfe16e (patch)
tree45f338afbed5fe3150a70c34448e38409e28eaf0
parentf17ed1a9ee9116a4792d22763a8c5912e5076473 (diff)
downloadglibc-06eee9f5f6e6911d6ded34eab033373057cfe16e.tar.gz
glibc-06eee9f5f6e6911d6ded34eab033373057cfe16e.tar.xz
glibc-06eee9f5f6e6911d6ded34eab033373057cfe16e.zip
Update.
	* sysdeps/unix/sysv/linux/fcntl.c (__fcntl_nocancel): Remove
	static inline __attribute ((always_inline)).  Don't define if
	NO_CANCELLATION.
	(__libc_fcntl): Use INLINE_SYSCALL directly instead of
	__fcntl_nocancel.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c (__fcntl_nocancel):
	Remove static inline __attribute ((always_inline)).  Don't define
	if NO_CANCELLATION.
	(__libc_fcntl): Use INLINE_SYSCALL directly instead of
	__fcntl_nocancel.
	* sysdeps/unix/sysv/linux/i386/fcntl.c (__fcntl_nocancel): Define to
	__libc_fcntl if NO_CANCELLATION and __ASSUME_FCNTL64 == 0.
	Don't define at all if NO_CANCELLATION and __ASSUME_FCNTL64 > 0.
	(__libc_fcntl): Don't define if __fcntl_nocancel is a macro.
-rw-r--r--ChangeLog15
-rw-r--r--sysdeps/unix/sysv/linux/fcntl.c9
-rw-r--r--sysdeps/unix/sysv/linux/i386/fcntl.c10
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c9
4 files changed, 30 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index faa6faa920..ac1511ed9e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
 2004-07-15  Jakub Jelinek  <jakub@redhat.com>
 
+	* sysdeps/unix/sysv/linux/fcntl.c (__fcntl_nocancel): Remove
+	static inline __attribute ((always_inline)).  Don't define if
+	NO_CANCELLATION.
+	(__libc_fcntl): Use INLINE_SYSCALL directly instead of
+	__fcntl_nocancel.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c (__fcntl_nocancel):
+	Remove static inline __attribute ((always_inline)).  Don't define
+	if NO_CANCELLATION.
+	(__libc_fcntl): Use INLINE_SYSCALL directly instead of
+	__fcntl_nocancel.
+	* sysdeps/unix/sysv/linux/i386/fcntl.c (__fcntl_nocancel): Define to
+	__libc_fcntl if NO_CANCELLATION and __ASSUME_FCNTL64 == 0.
+	Don't define at all if NO_CANCELLATION and __ASSUME_FCNTL64 > 0.
+	(__libc_fcntl): Don't define if __fcntl_nocancel is a macro.
+
 	[BZ #262]
 	* sysdeps/i386/elf/start.S (_start): Use @GOT instead of @GOTOFF
 	for main.
diff --git a/sysdeps/unix/sysv/linux/fcntl.c b/sysdeps/unix/sysv/linux/fcntl.c
index 87fa2ffe31..1f5aca14a4 100644
--- a/sysdeps/unix/sysv/linux/fcntl.c
+++ b/sysdeps/unix/sysv/linux/fcntl.c
@@ -25,9 +25,7 @@
 #include <sys/syscall.h>
 
 
-#ifdef NO_CANCELLATION
-static inline __attribute ((always_inline))
-#endif
+#ifndef NO_CANCELLATION
 int
 __fcntl_nocancel (int fd, int cmd, ...)
 {
@@ -40,6 +38,7 @@ __fcntl_nocancel (int fd, int cmd, ...)
 
   return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
 }
+#endif
 
 
 int
@@ -53,11 +52,11 @@ __libc_fcntl (int fd, int cmd, ...)
   va_end (ap);
 
   if (SINGLE_THREAD_P || cmd != F_SETLKW)
-    return __fcntl_nocancel (fd, cmd, arg);
+    return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
 
   int oldtype = LIBC_CANCEL_ASYNC ();
 
-  int result = __fcntl_nocancel (fd, cmd, arg);
+  int result = INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
 
   LIBC_CANCEL_RESET (oldtype);
 
diff --git a/sysdeps/unix/sysv/linux/i386/fcntl.c b/sysdeps/unix/sysv/linux/i386/fcntl.c
index 7787c5863b..210faba2a7 100644
--- a/sysdeps/unix/sysv/linux/i386/fcntl.c
+++ b/sysdeps/unix/sysv/linux/i386/fcntl.c
@@ -30,10 +30,11 @@
 int __have_no_fcntl64;
 #endif
 
-
-#ifdef NO_CANCELLATION
-static inline __attribute ((always_inline))
+#if defined NO_CANCELLATION && __ASSUME_FCNTL64 == 0
+# define __fcntl_nocancel  __libc_fcntl
 #endif
+
+#if !defined NO_CANCELLATION || __ASSUME_FCNTL64 == 0
 int
 __fcntl_nocancel (int fd, int cmd, ...)
 {
@@ -126,8 +127,10 @@ __fcntl_nocancel (int fd, int cmd, ...)
   return INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
 #endif  /* !__ASSUME_FCNTL64  */
 }
+#endif /* NO_CANCELLATION || !__ASSUME_FCNTL64 */
 
 
+#ifndef __fcntl_nocancel
 int
 __libc_fcntl (int fd, int cmd, ...)
 {
@@ -158,6 +161,7 @@ __libc_fcntl (int fd, int cmd, ...)
 
   return result;
 }
+#endif
 libc_hidden_def (__libc_fcntl)
 
 weak_alias (__libc_fcntl, __fcntl)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c
index 95b817bc40..e7ec85de63 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c
@@ -25,9 +25,7 @@
 #include <sys/syscall.h>
 
 
-#ifdef NO_CANCELLATION
-static inline __attribute ((always_inline))
-#endif
+#ifndef NO_CANCELLATION
 int
 __fcntl_nocancel (int fd, int cmd, ...)
 {
@@ -40,6 +38,7 @@ __fcntl_nocancel (int fd, int cmd, ...)
 
   return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
 }
+#endif
 
 
 int
@@ -56,11 +55,11 @@ __libc_fcntl (int fd, int cmd, ...)
     cmd -= F_GETLK64 - F_GETLK;
 
   if (SINGLE_THREAD_P || cmd != F_SETLKW)
-    return __fcntl_nocancel (fd, cmd, arg);
+    return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
 
   int oldtype = LIBC_CANCEL_ASYNC ();
 
-  int result = __fcntl_nocancel (fd, cmd, arg);
+  int result = INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
 
   LIBC_CANCEL_RESET (oldtype);