[git commit future] lseek[64]: provide hidden __lseek[64]_nocancel needed later

Peter S. Mazinger ps.m at gmx.net
Wed Apr 20 10:50:38 UTC 2011


commit: http://git.uclibc.org/uClibc/commit/?id=7ccf73675edfd3e4f7d7afd269393247dac79754
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/future

Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
---
 include/unistd.h                   |    6 ++++++
 libc/sysdeps/linux/common/llseek.c |    2 +-
 libc/sysdeps/linux/common/lseek.c  |    5 +++--
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/include/unistd.h b/include/unistd.h
index e646e04..432ba6b 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -333,7 +333,10 @@ extern int faccessat (int __fd, __const char *__file, int __type, int __flag)
    Return the new file position.  */
 #ifndef __USE_FILE_OFFSET64
 extern __off_t lseek (int __fd, __off_t __offset, int __whence) __THROW;
+# ifdef _LIBC
+extern __typeof(lseek) __lseek_nocancel attribute_hidden;
 libc_hidden_proto(lseek)
+# endif
 #else
 # ifdef __REDIRECT_NTH
 extern __off64_t __REDIRECT_NTH (lseek,
@@ -346,7 +349,10 @@ extern __off64_t __REDIRECT_NTH (lseek,
 #ifdef __USE_LARGEFILE64
 extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
      __THROW;
+# ifdef _LIBC
+extern __typeof(lseek64) __lseek64_nocancel attribute_hidden;
 libc_hidden_proto(lseek64)
+# endif
 #endif
 
 /* Close the file descriptor FD.
diff --git a/libc/sysdeps/linux/common/llseek.c b/libc/sysdeps/linux/common/llseek.c
index c46fcee..55221d8 100644
--- a/libc/sysdeps/linux/common/llseek.c
+++ b/libc/sysdeps/linux/common/llseek.c
@@ -15,7 +15,7 @@
 # include <unistd.h>
 # include <endian.h>
 # include <cancel.h>
-static off64_t __NC(lseek64)(int fd, off64_t offset, int whence)
+off64_t __NC(lseek64)(int fd, off64_t offset, int whence)
 {
 	off64_t result;
 	/* do we not need to handle the offset with __LONG_LONG_PAIR depending on endianness? */
diff --git a/libc/sysdeps/linux/common/lseek.c b/libc/sysdeps/linux/common/lseek.c
index 2896e0f..ce769d3 100644
--- a/libc/sysdeps/linux/common/lseek.c
+++ b/libc/sysdeps/linux/common/lseek.c
@@ -12,10 +12,10 @@
 #include <cancel.h>
 
 #ifdef __NR_lseek
-static _syscall3(off_t, __NC(lseek), int, fd, off_t, offset, int, whence)
+_syscall3(off_t, __NC(lseek), int, fd, off_t, offset, int, whence)
 #else
 # include <errno.h>
-static off_t __NC(lseek)(int fd, off_t offset attribute_unused, int whence)
+off_t __NC(lseek)(int fd, off_t offset attribute_unused, int whence)
 {
 	if (fd < 0) {
 		__set_errno(EBADF);
@@ -39,6 +39,7 @@ static off_t __NC(lseek)(int fd, off_t offset attribute_unused, int whence)
 CANCELLABLE_SYSCALL(off_t, lseek, (int fd, off_t offset, int whence), (fd, offset, whence))
 lt_libc_hidden(lseek)
 #if defined __UCLIBC_HAS_LFS__ && (__WORDSIZE == 64 || !defined __NR__llseek)
+strong_alias_untyped(__NC(lseek),__NC(lseek64))
 strong_alias_untyped(lseek,lseek64)
 lt_libc_hidden(lseek64)
 #endif
-- 
1.7.3.4



More information about the uClibc-cvs mailing list