Mercurial > hg > octave-nkf > gnulib-hg
changeset 12362:7d728682ee08
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.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Wed, 25 Nov 2009 18:01:02 +0100 |
parents | 9593c7cdb466 |
children | 6fe970af0447 |
files | ChangeLog lib/pread.c modules/pread |
diffstat | 3 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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.
--- 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