Wrappers for open64/lseek64.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@137 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/arch/x86-linux/vg_libpthread.c b/coregrind/arch/x86-linux/vg_libpthread.c
index 08ce814..db5aa88 100644
--- a/coregrind/arch/x86-linux/vg_libpthread.c
+++ b/coregrind/arch/x86-linux/vg_libpthread.c
@@ -671,6 +671,14 @@
    return __libc_read(fd, buf, count);
 }
 
+ 
+extern
+int __libc_open64(const char *pathname, int flags, ...);
+int open64(const char *pathname, int flags, ...)
+{
+   return __libc_open64(pathname, flags);
+}
+
 
 extern
 int __libc_open(const char *pathname, int flags);
@@ -719,6 +727,7 @@
    return __libc_nanosleep(req, rem);
 }
 
+
 extern
 int __libc_fsync(int fd);
 int fsync(int fd)
@@ -726,6 +735,7 @@
    return __libc_fsync(fd);
 }
 
+
 extern
 off_t __libc_lseek(int fildes, off_t offset, int whence);
 off_t lseek(int fildes, off_t offset, int whence)
@@ -733,6 +743,15 @@
    return __libc_lseek(fildes, offset, whence);
 }
 
+
+extern
+__off64_t __libc_lseek64(int fildes, __off64_t offset, int whence);
+__off64_t lseek64(int fildes, __off64_t offset, int whence)
+{
+   return __libc_lseek64(fildes, offset, whence);
+}
+
+
 extern  
 void __libc_longjmp(jmp_buf env, int val) __attribute((noreturn));
 void longjmp(jmp_buf env, int val)
@@ -740,6 +759,7 @@
    __libc_longjmp(env, val);
 }
 
+
 extern
 int __libc_send(int s, const void *msg, size_t len, int flags);
 int send(int s, const void *msg, size_t len, int flags)
@@ -747,6 +767,7 @@
    return __libc_send(s, msg, len, flags);
 }
 
+
 extern
 int __libc_recv(int s, void *buf, size_t len, int flags);
 int recv(int s, void *buf, size_t len, int flags)
@@ -754,6 +775,7 @@
    return __libc_recv(s, buf, len, flags);
 }
 
+
 extern
 int __libc_sendto(int s, const void *msg, size_t len, int flags, 
                   const struct sockaddr *to, socklen_t tolen);
@@ -763,6 +785,7 @@
    return __libc_sendto(s, msg, len, flags, to, tolen);
 }
 
+
 extern 
 int __libc_system(const char* str);
 int system(const char* str)
@@ -770,6 +793,7 @@
    return __libc_system(str);
 }
 
+
 extern
 pid_t __libc_wait(int *status);
 pid_t wait(int *status)
diff --git a/coregrind/vg_libpthread.c b/coregrind/vg_libpthread.c
index 08ce814..db5aa88 100644
--- a/coregrind/vg_libpthread.c
+++ b/coregrind/vg_libpthread.c
@@ -671,6 +671,14 @@
    return __libc_read(fd, buf, count);
 }
 
+ 
+extern
+int __libc_open64(const char *pathname, int flags, ...);
+int open64(const char *pathname, int flags, ...)
+{
+   return __libc_open64(pathname, flags);
+}
+
 
 extern
 int __libc_open(const char *pathname, int flags);
@@ -719,6 +727,7 @@
    return __libc_nanosleep(req, rem);
 }
 
+
 extern
 int __libc_fsync(int fd);
 int fsync(int fd)
@@ -726,6 +735,7 @@
    return __libc_fsync(fd);
 }
 
+
 extern
 off_t __libc_lseek(int fildes, off_t offset, int whence);
 off_t lseek(int fildes, off_t offset, int whence)
@@ -733,6 +743,15 @@
    return __libc_lseek(fildes, offset, whence);
 }
 
+
+extern
+__off64_t __libc_lseek64(int fildes, __off64_t offset, int whence);
+__off64_t lseek64(int fildes, __off64_t offset, int whence)
+{
+   return __libc_lseek64(fildes, offset, whence);
+}
+
+
 extern  
 void __libc_longjmp(jmp_buf env, int val) __attribute((noreturn));
 void longjmp(jmp_buf env, int val)
@@ -740,6 +759,7 @@
    __libc_longjmp(env, val);
 }
 
+
 extern
 int __libc_send(int s, const void *msg, size_t len, int flags);
 int send(int s, const void *msg, size_t len, int flags)
@@ -747,6 +767,7 @@
    return __libc_send(s, msg, len, flags);
 }
 
+
 extern
 int __libc_recv(int s, void *buf, size_t len, int flags);
 int recv(int s, void *buf, size_t len, int flags)
@@ -754,6 +775,7 @@
    return __libc_recv(s, buf, len, flags);
 }
 
+
 extern
 int __libc_sendto(int s, const void *msg, size_t len, int flags, 
                   const struct sockaddr *to, socklen_t tolen);
@@ -763,6 +785,7 @@
    return __libc_sendto(s, msg, len, flags, to, tolen);
 }
 
+
 extern 
 int __libc_system(const char* str);
 int system(const char* str)
@@ -770,6 +793,7 @@
    return __libc_system(str);
 }
 
+
 extern
 pid_t __libc_wait(int *status);
 pid_t wait(int *status)
diff --git a/vg_libpthread.c b/vg_libpthread.c
index 08ce814..db5aa88 100644
--- a/vg_libpthread.c
+++ b/vg_libpthread.c
@@ -671,6 +671,14 @@
    return __libc_read(fd, buf, count);
 }
 
+ 
+extern
+int __libc_open64(const char *pathname, int flags, ...);
+int open64(const char *pathname, int flags, ...)
+{
+   return __libc_open64(pathname, flags);
+}
+
 
 extern
 int __libc_open(const char *pathname, int flags);
@@ -719,6 +727,7 @@
    return __libc_nanosleep(req, rem);
 }
 
+
 extern
 int __libc_fsync(int fd);
 int fsync(int fd)
@@ -726,6 +735,7 @@
    return __libc_fsync(fd);
 }
 
+
 extern
 off_t __libc_lseek(int fildes, off_t offset, int whence);
 off_t lseek(int fildes, off_t offset, int whence)
@@ -733,6 +743,15 @@
    return __libc_lseek(fildes, offset, whence);
 }
 
+
+extern
+__off64_t __libc_lseek64(int fildes, __off64_t offset, int whence);
+__off64_t lseek64(int fildes, __off64_t offset, int whence)
+{
+   return __libc_lseek64(fildes, offset, whence);
+}
+
+
 extern  
 void __libc_longjmp(jmp_buf env, int val) __attribute((noreturn));
 void longjmp(jmp_buf env, int val)
@@ -740,6 +759,7 @@
    __libc_longjmp(env, val);
 }
 
+
 extern
 int __libc_send(int s, const void *msg, size_t len, int flags);
 int send(int s, const void *msg, size_t len, int flags)
@@ -747,6 +767,7 @@
    return __libc_send(s, msg, len, flags);
 }
 
+
 extern
 int __libc_recv(int s, void *buf, size_t len, int flags);
 int recv(int s, void *buf, size_t len, int flags)
@@ -754,6 +775,7 @@
    return __libc_recv(s, buf, len, flags);
 }
 
+
 extern
 int __libc_sendto(int s, const void *msg, size_t len, int flags, 
                   const struct sockaddr *to, socklen_t tolen);
@@ -763,6 +785,7 @@
    return __libc_sendto(s, msg, len, flags, to, tolen);
 }
 
+
 extern 
 int __libc_system(const char* str);
 int system(const char* str)
@@ -770,6 +793,7 @@
    return __libc_system(str);
 }
 
+
 extern
 pid_t __libc_wait(int *status);
 pid_t wait(int *status)