diff options
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/win32lib.c | 5 |
2 files changed, 8 insertions, 1 deletions
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 <kakuto@fuk.kindai.ac.jp> + + * win32lib.c: rewrite xftell64 for W32. + 2012-05-04 Akira Kakuto <kakuto@fuk.kindai.ac.jp> * 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; } |