From ea6e9d54915fc972bbc7a3de56cb5d2341e0d569 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Fri, 4 May 2012 23:35:51 +0000 Subject: rewrite xftell64 for W32 git-svn-id: svn://tug.org/texlive/trunk@26190 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/kpathsea/ChangeLog | 4 ++++ Build/source/texk/kpathsea/win32lib.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index 04fa0557f77..ed2bea5af96 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,7 @@ +2012-05-05 Akira Kakuto + + * win32lib.c: rewrite xftell64 for W32. + 2012-05-04 Akira Kakuto * win32lib.c: rewrite xftell64 and xfseek64 for W32. diff --git a/Build/source/texk/kpathsea/win32lib.c b/Build/source/texk/kpathsea/win32lib.c index 6a346ebfdde..e572d813dd3 100644 --- a/Build/source/texk/kpathsea/win32lib.c +++ b/Build/source/texk/kpathsea/win32lib.c @@ -294,7 +294,10 @@ xftell64 (FILE *f, const char *filename) FATAL_PERROR(filename); return (__int64)(-1); } - where = filepos - f->_cnt; + if(filepos == (__int64)0) + where = (__int64)(f->_ptr - f->_base); + else + where = filepos - f->_cnt; return where; } -- cgit v1.2.3