From: Jim Meyering Date: Wed, 25 Nov 2009 17:01:02 +0000 (+0100) Subject: pread: improvement and fix X-Git-Tag: v0.1~5125 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=23cd74133c81b80d335c701848b71d85a53402c6;p=gnulib.git 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 index 6128785ab..2e5f9fbe6 100644 --- 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 index 632b91497..7094ea7d0 100644 --- 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 index 06039e64d..4fb442467 100644 --- a/modules/pread +++ b/modules/pread @@ -6,6 +6,7 @@ lib/pread.c m4/pread.m4 Depends-on: +lseek unistd configure.ac: