[libbluray-devel] commit: Fixed mingw support: (hpi1 )

git at videolan.org git at videolan.org
Mon Aug 23 20:29:40 CEST 2010


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Aug 23 21:24:36 2010 +0300| [cf20fba832979f2001a925e707864d7a935c5a64] | committer: hpi1 

Fixed mingw support:
-std=c99 enables __STRICT_ANSI__ and hides ftello64() and fseeko64() prototypes in stdio.h

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=cf20fba832979f2001a925e707864d7a935c5a64
---

 src/file/file_posix.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/file/file_posix.c b/src/file/file_posix.c
index 451f369..86ca59a 100644
--- a/src/file/file_posix.c
+++ b/src/file/file_posix.c
@@ -22,10 +22,16 @@
 #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"
 
+#include <stdio.h>
 #include <stdlib.h>
 
 static void file_close_linux(BD_FILE_H *file)
@@ -41,7 +47,7 @@ static void file_close_linux(BD_FILE_H *file)
 
 static int64_t file_seek_linux(BD_FILE_H *file, int64_t offset, int32_t origin)
 {
-#if defined(_WIN32)
+#if defined(__MINGW32__)
     return fseeko64((FILE *)file->internal, offset, origin);
 #else
     return fseeko((FILE *)file->internal, offset, origin);
@@ -50,7 +56,7 @@ static int64_t file_seek_linux(BD_FILE_H *file, int64_t offset, int32_t origin)
 
 static int64_t file_tell_linux(BD_FILE_H *file)
 {
-#if defined(_WIN32)
+#if defined(__MINGW32__)
     return ftello64((FILE *)file->internal);
 #else
     return ftello((FILE *)file->internal);



More information about the libbluray-devel mailing list