about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--include/fcntl.h7
-rw-r--r--io/openat.c6
-rw-r--r--io/openat64.c6
-rw-r--r--libio/genops.c3
-rw-r--r--sysdeps/unix/sysv/linux/openat.c8
6 files changed, 34 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 799d1bb296..50ceb0aed8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2006-02-28  Roland McGrath  <roland@redhat.com>
 
+	* include/fcntl.h: Declare __openat, __open64.  Use libc_hidden_proto.
+	* io/openat.c (__openat): Define instead of openat.
+	Use libc_hidden_def.  Define openat with weak_alias.
+	* io/openat64.c (__openat64): Define instead of openat64.
+	Use libc_hidden_def.  Define openat64 with weak_alias.
+	* sysdeps/unix/sysv/linux/openat.c: Likewise.
+
+	* libio/genops.c: Include <sched.h> for __sched_yield decl.
+
 	* Makeconfig (+includes): Add back $(includes)
 	after $(+sysdep-includes).
 
diff --git a/include/fcntl.h b/include/fcntl.h
index f00881449d..e23af1c3d3 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -17,6 +17,13 @@ extern int __open (__const char *__file, int __oflag, ...);
 libc_hidden_proto (__open)
 extern int __fcntl (int __fd, int __cmd, ...);
 libc_hidden_proto (__fcntl)
+extern int __openat (int __fd, __const char *__file, int __oflag, ...)
+  __nonnull ((2));
+libc_hidden_proto (__openat)
+extern int __openat64 (int __fd, __const char *__file, int __oflag, ...)
+  __nonnull ((2));
+libc_hidden_proto (__openat64)
+
 
 /* Helper functions for the various *at functions.  For Linux.  */
 extern void __atfct_seterrno (int errval, int fd, const char *buf)
diff --git a/io/openat.c b/io/openat.c
index f3f699ca23..c65ad19c7a 100644
--- a/io/openat.c
+++ b/io/openat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 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
@@ -26,7 +26,7 @@
    the directory associated with FD.  If OFLAG includes O_CREAT, a
    third argument is the file protection.  */
 int
-openat (fd, file, oflag)
+__openat (fd, file, oflag)
      int fd;
      const char *file;
      int oflag;
@@ -64,6 +64,8 @@ openat (fd, file, oflag)
   __set_errno (ENOSYS);
   return -1;
 }
+libc_hidden_def (__openat)
+weak_alias (__openat, openat)
 stub_warning (openat)
 
 #include <stub-tag.h>
diff --git a/io/openat64.c b/io/openat64.c
index 87952d38d6..830701a949 100644
--- a/io/openat64.c
+++ b/io/openat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 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
@@ -26,7 +26,7 @@
    the directory associated with FD.  If OFLAG includes O_CREAT, a
    third argument is the file protection.  */
 int
-openat64 (fd, file, oflag)
+__openat64 (fd, file, oflag)
      int fd;
      const char *file;
      int oflag;
@@ -64,6 +64,8 @@ openat64 (fd, file, oflag)
   __set_errno (ENOSYS);
   return -1;
 }
+libc_hidden_def (__openat64)
+weak_alias (__openat64, openat64)
 stub_warning (openat64)
 
 #include <stub-tag.h>
diff --git a/libio/genops.c b/libio/genops.c
index 030343e7aa..5f223524a0 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -34,6 +34,9 @@
 #endif
 #include <string.h>
 #include <stdbool.h>
+#ifdef _LIBC
+#include <sched.h>
+#endif
 
 #ifdef _IO_MTSAFE_IO
 static _IO_lock_t list_all_lock = _IO_lock_initializer;
diff --git a/sysdeps/unix/sysv/linux/openat.c b/sysdeps/unix/sysv/linux/openat.c
index 38ffe85b56..7dfe367425 100644
--- a/sysdeps/unix/sysv/linux/openat.c
+++ b/sysdeps/unix/sysv/linux/openat.c
@@ -135,12 +135,16 @@ OPENAT_NOT_CANCEL (fd, file, oflag, mode)
 #endif
 }
 
+#define UNDERIZE(name) UNDERIZE_1 (name)
+#define UNDERIZE_1(name) __##name
+#define __OPENAT UNDERIZE (OPENAT)
+
 
 /* Open FILE with access OFLAG.  Interpret relative paths relative to
    the directory associated with FD.  If OFLAG includes O_CREAT, a
    third argument is the file protection.  */
 int
-OPENAT (fd, file, oflag)
+__OPENAT (fd, file, oflag)
      int fd;
      const char *file;
      int oflag;
@@ -165,3 +169,5 @@ OPENAT (fd, file, oflag)
 
   return res;
 }
+libc_hidden_def (__OPENAT)
+weak_alias (__OPENAT, OPENAT)