miktex_xfseeko64 and miktex_xftello64 on OS X
MiKTeX source code moved to GitHub
Brought to you by:
csc
The build on OS X fails due to
# error Unimplemented: miktex_xfseeko64() # error Unimplemented: miktex_xftello64
According to http://stackoverflow.com/questions/4003479/how-to-enable-large-file-support-under-darwin it should be sufficient to use a function without the number64 (plus use the extra flag _FILE_OFFSET_BITS == 64
). I didn't test this yet, but here's an example of a patch:
--- a/Libraries/MiKTeX/KPathSeaEmulation/kpsemu.cpp +++ b/Libraries/MiKTeX/KPathSeaEmulation/kpsemu.cpp @@ -463,6 +463,12 @@ MIKTEXKPSCEEAPI(int) miktex_xfseeko64(FILE * pfile, MIKTEX_INT64 offset, int whe MIKTEX_FATAL_CRT_ERROR_2("fseeko64", "fileName", lpszFileName); } return 0; +#elif defined(__APPLE__) + if (fseeko(pfile, offset, where) != 0) + { + MIKTEX_FATAL_CRT_ERROR_2("fseeko", "fileName", lpszFileName); + } + return 0; #else # error Unimplemented: miktex_xfseeko64() #endif @@ -505,6 +511,13 @@ MIKTEXKPSCEEAPI(MIKTEX_INT64) miktex_xftello64(FILE * pfile, const char * lpszFi } return pos; +#elif defined(__APPLE__) + MIKTEX_INT64 pos = ftello(pfile); + if (pos < 0) + { + MIKTEX_FATAL_CRT_ERROR_2("ftello", "fileName", lpszFileName); + } + return pos; #else # error Unimplemented: miktex_xftello64 #endif