]> sourceware.org Git - glibc.git/commitdiff
function if it is not defined. Add some necessary casts.
authorUlrich Drepper <drepper@redhat.com>
Thu, 9 Apr 2009 22:06:07 +0000 (22:06 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 9 Apr 2009 22:06:07 +0000 (22:06 +0000)
ChangeLog
sysdeps/unix/sysv/linux/preadv.c
sysdeps/unix/sysv/linux/pwritev.c

index b3c1302937b1a64a7f3cd910ac5ffe61879a825b..200c8187d1fbfd00953802b215fb086adb4cbfa6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
 2009-04-09  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/preadv.c: Avoid prototype for static
-       function if it is not defined.
+       function if it is not defined.  Add some necessary casts.
        * sysdeps/unix/sysv/linux/pwritev.c: Likewise.
 
        * sysdeps/unix/sysv/linux/kernel-features.h: SPARC and IA64 also
index ff9af6fa058ffcf5a72d2576b8143f373819c321..8c89d9200efdf9abd61203cd7b4d79ba51683866 100644 (file)
 #include <sys/syscall.h>
 #include <kernel-features.h>
 
+#ifdef __x86_64__
+#define __NR_preadv                            295
+#elif defined __i386__
+#define __NR_preadv            333
+#endif
+
+
 #ifndef PREADV
 # define PREADV preadv
 # define PREADV_REPLACEMENT __atomic_preadv_replacement
@@ -53,14 +60,16 @@ PREADV (fd, vector, count, offset)
   ssize_t result;
 
   if (SINGLE_THREAD_P)
-    result = INLINE_SYSCALL (preadv, 5, fd, vector, count, offset >> 32,
-                            offset & 0xffffffff);
+    result = INLINE_SYSCALL (preadv, 5, fd, vector, count,
+                            (off_t) ((off64_t) offset >> 32),
+                            (off_t) (offset & 0xffffffff));
   else
     {
       int oldtype = LIBC_CANCEL_ASYNC ();
 
-      result = INLINE_SYSCALL (preadv, 5, fd, vector, count, offset >> 32,
-                              offset & 0xffffffff);
+      result = INLINE_SYSCALL (preadv, 5, fd, vector, count,
+                              (off_t) ((off64_t) offset >> 32),
+                              (off_t) (offset & 0xffffffff));
 
       LIBC_CANCEL_RESET (oldtype);
     }
index 2031adda105be326ee8cf25455d438a926783779..1916abe485b7054a26d60f6f4ea231b265fb5e7b 100644 (file)
 #include <sys/syscall.h>
 #include <kernel-features.h>
 
+#ifdef __x86_64__
+#define __NR_pwritev                           296
+#elif defined __i386__
+#define __NR_pwritev           334
+#endif
+
+
 #ifndef PWRITEV
 # define PWRITEV pwritev
 # define PWRITEV_REPLACEMENT __atomic_pwritev_replacement
@@ -53,14 +60,16 @@ PWRITEV (fd, vector, count, offset)
   ssize_t result;
 
   if (SINGLE_THREAD_P)
-    result = INLINE_SYSCALL (pwritev, 5, fd, vector, count, offset >> 32,
-                            offset & 0xffffffff);
+    result = INLINE_SYSCALL (pwritev, 5, fd, vector, count,
+                            (off_t) ((off64_t) offset >> 32),
+                            (off_t) (offset & 0xffffffff));
   else
     {
       int oldtype = LIBC_CANCEL_ASYNC ();
 
-      result = INLINE_SYSCALL (pwritev, 5, fd, vector, count, offset >> 32,
-                              offset & 0xffffffff);
+      result = INLINE_SYSCALL (pwritev, 5, fd, vector, count,
+                              (off_t) ((off64_t) offset >> 32),
+                              (off_t) (offset & 0xffffffff));
 
       LIBC_CANCEL_RESET (oldtype);
     }
This page took 0.0558 seconds and 5 git commands to generate.