From e834a90f686d8b4f5926c5dbcf86fa3786f29b44 Mon Sep 17 00:00:00 2001 From: Martin Schröder Date: Thu, 21 Feb 2008 20:58:24 +0000 Subject: Add LFS (long -> off_t, fseek -> fseeko) git-svn-id: svn://tug.org/texlive/trunk@6707 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/kpathsea/ChangeLog | 4 ++++ Build/source/texk/kpathsea/lib.h | 4 ++-- Build/source/texk/kpathsea/xfseek.c | 4 ++-- Build/source/texk/kpathsea/xftell.c | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index ca0f8dffb3e..1de1603d5a3 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,7 @@ +2008-02-21 Martin Schröder + * lib.h, xfseek.c, xftell.c: LFS support: use off_t instead off long + and fseeko instead of fseek + 2008-02-14 Karl Berry * texmf.in (font_mem_size): increase to 3000000. diff --git a/Build/source/texk/kpathsea/lib.h b/Build/source/texk/kpathsea/lib.h index af72ed3e5de..4158b69c5c4 100644 --- a/Build/source/texk/kpathsea/lib.h +++ b/Build/source/texk/kpathsea/lib.h @@ -163,8 +163,8 @@ extern KPSEDLL int dir_links P2H(const_string fn, long nlinks); perror(3) with FILENAME as its argument. */ extern KPSEDLL FILE *xfopen P2H(const_string filename, const_string mode); extern KPSEDLL void xfclose P2H(FILE *, const_string filename); -extern KPSEDLL void xfseek P4H(FILE *, long, int, string filename); -extern KPSEDLL unsigned long xftell P2H(FILE *, string filename); +extern KPSEDLL void xfseek P4H(FILE *, off_t, int, string filename); +extern KPSEDLL off_t xftell P2H(FILE *, string filename); /* These call the corresponding function in the standard library, and abort if those routines fail. Also, `xrealloc' calls `xmalloc' if diff --git a/Build/source/texk/kpathsea/xfseek.c b/Build/source/texk/kpathsea/xfseek.c index 22ba8978c4a..3e4d0b93b34 100644 --- a/Build/source/texk/kpathsea/xfseek.c +++ b/Build/source/texk/kpathsea/xfseek.c @@ -23,8 +23,8 @@ void -xfseek P4C(FILE *, f, long, offset, int, wherefrom, string, filename) +xfseek P4C(FILE *, f, off_t, offset, int, wherefrom, string, filename) { - if (fseek(f, offset, wherefrom) < 0) + if (fseeko(f, offset, wherefrom) < 0) FATAL_PERROR(filename); } diff --git a/Build/source/texk/kpathsea/xftell.c b/Build/source/texk/kpathsea/xftell.c index 0548e1abd94..541a3ec1171 100644 --- a/Build/source/texk/kpathsea/xftell.c +++ b/Build/source/texk/kpathsea/xftell.c @@ -21,10 +21,10 @@ #include -unsigned long +off_t xftell P2C(FILE *, f, string, filename) { - long where = ftell (f); + off_t where = ftello (f); if (where < 0) FATAL_PERROR(filename); -- cgit v1.2.3