# HG changeset patch # User Jim Meyering # Date 1259168462 -3600 # Node ID 7d728682ee08139b5e469391f395aa3ceb4e10b9 # Parent 9593c7cdb46661fedb097cfd745ed5447d46c699 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. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-11-25 Jim Meyering + 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. diff --git a/lib/pread.c b/lib/pread.c --- a/lib/pread.c +++ b/lib/pread.c @@ -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 diff --git a/modules/pread b/modules/pread --- a/modules/pread +++ b/modules/pread @@ -6,6 +6,7 @@ m4/pread.m4 Depends-on: +lseek unistd configure.ac: