libaacs | branch: master | npzacs <[email protected]> | Wed Sep 22 14:23:11 2010 +0300| [5830453f701e09a29e1badef248ccd1980b08337] | committer: npzacs
Ported mingw compability from libbluray > http://git.videolan.org/gitweb.cgi/libaacs.git/?a=commit;h=5830453f701e09a29e1badef248ccd1980b08337 --- src/file/file_posix.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/file/file_posix.c b/src/file/file_posix.c index 77ebb5f..43eca2b 100644 --- a/src/file/file_posix.c +++ b/src/file/file_posix.c @@ -17,6 +17,15 @@ * <http://www.gnu.org/licenses/>. */ +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#if defined(__MINGW32__) +/* ftello64() and fseeko64() prototypes from stdio.h */ +# undef __STRICT_ANSI__ +#endif + #include "file.h" #include "util/macro.h" #include "util/logging.h" @@ -37,12 +46,20 @@ static void file_close_linux(AACS_FILE_H *file) static int64_t file_seek_linux(AACS_FILE_H *file, int64_t offset, int32_t origin) { +#if defined(__MINGW32__) + return fseeko64((FILE *)file->internal, offset, origin); +#else return fseeko((FILE *)file->internal, offset, origin); +#endif } static int64_t file_tell_linux(AACS_FILE_H *file) { +#if defined(__MINGW32__) + return ftello64((FILE *)file->internal); +#else return ftello((FILE *)file->internal); +#endif } static int file_eof_linux(AACS_FILE_H *file) _______________________________________________ libaacs-devel mailing list [email protected] http://mailman.videolan.org/listinfo/libaacs-devel
