svn commit: trunk/uClibc/libc/sysdeps/linux/common

vapier at uclibc.org vapier at uclibc.org
Mon Jan 23 23:00:20 UTC 2006


Author: vapier
Date: 2006-01-23 15:00:19 -0800 (Mon, 23 Jan 2006)
New Revision: 13543

Log:
cleanup and use the style of other *64 funcs

Modified:
   trunk/uClibc/libc/sysdeps/linux/common/sendfile.c
   trunk/uClibc/libc/sysdeps/linux/common/sendfile64.c


Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/common/sendfile.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/sendfile.c	2006-01-23 22:53:39 UTC (rev 13542)
+++ trunk/uClibc/libc/sysdeps/linux/common/sendfile.c	2006-01-23 23:00:19 UTC (rev 13543)
@@ -10,5 +10,13 @@
 #include "syscalls.h"
 #include <unistd.h>
 #include <sys/sendfile.h>
+
 _syscall4(ssize_t, sendfile, int, out_fd, int, in_fd, __off_t *, offset,
 		  size_t, count);
+
+#if ! defined __NR_sendfile64 && defined __UCLIBC_HAS_LFS__
+extern __typeof(sendfile) sendfile64;
+libc_hidden_proto(sendfile64)
+strong_alias(sendfile,sendfile64)
+libc_hidden_def(sendfile64)
+#endif

Modified: trunk/uClibc/libc/sysdeps/linux/common/sendfile64.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/sendfile64.c	2006-01-23 22:53:39 UTC (rev 13542)
+++ trunk/uClibc/libc/sysdeps/linux/common/sendfile64.c	2006-01-23 23:00:19 UTC (rev 13543)
@@ -17,30 +17,8 @@
 #include <stdint.h>
 #include <sys/sendfile.h>
 #include <sys/syscall.h>
+#include <bits/wordsize.h>
 
-#if defined __NR_sendfile64
-
-# if __WORDSIZE == 64 || (defined(__powerpc__) && defined (__UCLIBC_HAS_LFS__))
-/* For a 64 bit machine, life is simple... */
+#if defined __UCLIBC_HAS_LFS__ && defined __NR_sendfile64
 _syscall4(ssize_t,sendfile64, int, out_fd, int, in_fd, __off64_t *, offset, size_t, count);
-
-# elif __WORDSIZE == 32
-
-#  if defined __UCLIBC_HAS_LFS__
-_syscall4(ssize_t,sendfile64, int, out_fd, int, in_fd, __off64_t *, offset, size_t, count);
-#  endif /* __UCLIBC_HAS_LFS__ */
-
-# else /* __WORDSIZE */
-#  error Your machine is not 64 bit or 32 bit, I am dazed and confused.
-# endif /* __WORDSIZE */
-
-
-#else /* ! defined __NR_sendfile64 */
-
-ssize_t sendfile64 (int out_fd, int in_fd, __off64_t *offset, size_t count)
-{
-  __set_errno (ENOSYS);
-  return -1;
-}
-
 #endif




More information about the uClibc-cvs mailing list