pread: improvement and fix
authorJim Meyering <meyering@redhat.com>
Wed, 25 Nov 2009 17:01:02 +0000 (18:01 +0100)
committerJim Meyering <meyering@redhat.com>
Wed, 25 Nov 2009 17:01:02 +0000 (18:01 +0100)
* modules/pread (Depends-on): Depend on lseek, for portability to
e.g., mingw.  Suggested by Eric Blake.
* lib/pread.c (__libc_read): Define.  Reported by Richard W.M. Jones.

ChangeLog
lib/pread.c
modules/pread

index 6128785..2e5f9fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-11-25  Jim Meyering  <meyering@redhat.com>
 
+       pread: improvement and fix
+       * modules/pread (Depends-on): Depend on lseek, for portability to
+       e.g., mingw.  Suggested by Eric Blake.
+       * lib/pread.c (__libc_read): Define.  Reported by Richard W.M. Jones.
+
        unistd.in.h: correct declaration of pread
        * lib/unistd.in.h: Correct type of "buf" parameter: void*, not char*
        Reported by Richard W.M. Jones.
index 632b914..7094ea7 100644 (file)
@@ -23,6 +23,7 @@
 
 #define __libc_lseek(f,o,w) lseek (f, o, w)
 #define __set_errno(Val) errno = (Val)
+#define __libc_read(f,b,n) read (f, b, n)
 
 /* pread substitute for systems that the function, such as mingw32 and BeOS.  */
 /* The following is identical to the function from glibc's
index 06039e6..4fb4424 100644 (file)
@@ -6,6 +6,7 @@ lib/pread.c
 m4/pread.m4
 
 Depends-on:
+lseek
 unistd
 
 configure.ac: