Fix lseek on mingw.
authorEric Blake <ebb9@byu.net>
Thu, 24 May 2007 16:59:20 +0000 (16:59 +0000)
committerEric Blake <ebb9@byu.net>
Thu, 24 May 2007 16:59:20 +0000 (16:59 +0000)
commite461ff7387db733080824cb94b239d8d1d09c4f3
tree0d62b7ae517125e4b6b1148b129d4b320a12c090
parente55d665f2854709002b24e51bb5b2ebbd2941e00
Fix lseek on mingw.
* modules/lseek: New module.
* m4/lseek.m4: New file.
* lib/lseek.c: New file.
* modules/lseek-tests: New file.
* tests/test-lseek.c: New file.
* tests/test-lseek.sh: New file.
* MODULES.html.sh: Document lseek module.
* modules/fflush (Depends-on): Add lseek, fseeko.
* modules/fseeko (Depends-on): Likewise.
* modules/ftello (Depends-on): Likewise.
* m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
broken.
* m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
broken.
* m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
* lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
* lib/ftello.c (rpl_ftello): Likewise.
* tests/test-fseeko.c (main): Test this.
* tests/test-fseeko.sh: Likewise.
* tests/test-ftello.c (main): Likewise.
* tests/test-ftello.sh: Likewise.
* lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
implies replacing fseek.
* modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
HAVE_FTELLO.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
* modules/unistd (Makefile.am): Likewise.
* lib/unistd_.h (lseek): Declare a replacement.
* doc/functions/lseek.texi (lseek): Document this fix.
* doc/functions/fseek.texi (fseek): Likewise.
* doc/functions/ftell.texi (ftell): Likewise.
28 files changed:
ChangeLog
MODULES.html.sh
doc/functions/fseek.texi
doc/functions/ftell.texi
doc/functions/lseek.texi
lib/fseeko.c
lib/ftello.c
lib/lseek.c [new file with mode: 0644]
lib/stdio_.h
lib/unistd_.h
m4/fflush.m4
m4/fseeko.m4
m4/ftello.m4
m4/lseek.m4 [new file with mode: 0644]
m4/unistd_h.m4
modules/fflush
modules/fseeko
modules/ftello
modules/lseek [new file with mode: 0644]
modules/lseek-tests [new file with mode: 0644]
modules/stdio
modules/unistd
tests/test-fseeko.c
tests/test-fseeko.sh
tests/test-ftello.c
tests/test-ftello.sh
tests/test-lseek.c [new file with mode: 0644]
tests/test-lseek.sh [new file with mode: 0755]