-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use fseek solution for mingw provided by Lua's author
- Loading branch information
1 parent
1964876
commit 73ec825
Showing
4 changed files
with
38 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
diff -Naur a/src/liolib.c b/src/liolib.c | ||
--- a/src/liolib.c 2024-06-13 19:15:09.000000000 -0300 | ||
+++ b/src/liolib.c 2024-06-27 18:04:03.461495748 -0300 | ||
@@ -123,8 +123,8 @@ | ||
#define l_ftell(f) ftello(f) | ||
#define l_seeknum off_t | ||
|
||
-#elif defined(LUA_USE_WINDOWS) && !defined(_CRTIMP_TYPEINFO) \ | ||
- && defined(_MSC_VER) && (_MSC_VER >= 1400) /* }{ */ | ||
+#elif defined(LUA_USE_WINDOWS) && (defined(__MINGW32__) || !defined(_CRTIMP_TYPEINFO) \ | ||
+ && defined(_MSC_VER) && (_MSC_VER >= 1400)) /* }{ */ | ||
|
||
/* Windows (but not DDK) and Visual C++ 2005 or higher */ | ||
#define l_fseek(f,o,w) _fseeki64(f,o,w) | ||
diff -Naur a/src/luaconf.h b/src/luaconf.h | ||
--- a/src/luaconf.h 2024-06-13 19:15:10.000000000 -0300 | ||
+++ b/src/luaconf.h 2024-10-17 12:49:27.896223751 -0300 | ||
@@ -795,7 +795,13 @@ | ||
*/ | ||
|
||
|
||
+#if defined(liolib_c) && defined(__MINGW32__) | ||
+#include <sys/types.h> | ||
|
||
+#define l_fseek(f,o,w) fseeko(f,o,w) | ||
+#define l_ftell(f) ftello(f) | ||
+#define l_seeknum off_t | ||
+#endif | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
diff -Naur a/src/liolib.c b/src/liolib.c | ||
--- a/src/liolib.c 2020-09-14 12:34:00.000000000 -0300 | ||
+++ b/src/liolib.c 2024-06-27 18:06:27.801668564 -0300 | ||
@@ -111,8 +111,8 @@ | ||
#define l_ftell(f) ftello(f) | ||
#define l_seeknum off_t | ||
|
||
-#elif defined(LUA_USE_WINDOWS) && !defined(_CRTIMP_TYPEINFO) \ | ||
- && defined(_MSC_VER) && (_MSC_VER >= 1400) /* }{ */ | ||
+#elif defined(LUA_USE_WINDOWS) && (defined(__MINGW32__) || !defined(_CRTIMP_TYPEINFO) \ | ||
+ && defined(_MSC_VER) && (_MSC_VER >= 1400)) /* }{ */ | ||
|
||
/* Windows (but not DDK) and Visual C++ 2005 or higher */ | ||
#define l_fseek(f,o,w) _fseeki64(f,o,w) | ||
diff -Naur a/src/luaconf.h b/src/luaconf.h | ||
--- a/src/luaconf.h 2020-09-14 12:34:01.000000000 -0300 | ||
+++ b/src/luaconf.h 2024-10-17 12:47:20.901419421 -0300 | ||
@@ -783,7 +783,13 @@ | ||
*/ | ||
|
||
|
||
+#if defined(liolib_c) && defined(__MINGW32__) | ||
+#include <sys/types.h> | ||
|
||
+#define l_fseek(f,o,w) fseeko(f,o,w) | ||
+#define l_ftell(f) ftello(f) | ||
+#define l_seeknum off_t | ||
+#endif | ||
|
||
|
||
#endif |