fix: fseek taking Windows branch
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
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 14:17:25.906754600 -0300
|
||||
@@ -115,7 +115,7 @@
|
||||
+++ 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
|
||||
|
||||
#if !defined(l_fseek) /* { */
|
||||
|
||||
-#if defined(LUA_USE_POSIX) /* { */
|
||||
+#if defined(__MINGW32__) || defined(LUA_USE_POSIX) /* { */
|
||||
|
||||
#include <sys/types.h>
|
||||
-#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)
|
||||
|
||||
@@ -30,7 +30,7 @@ sha256sums=('9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30'
|
||||
'37246417ce7b1d062cb52012c087793c961527e5b6da5318cf573244a477f528'
|
||||
'5f0c29865f9645a61ca62b1860f26ffac8b3458bd5e7b7a9c92daae0927a1914'
|
||||
'2294a245794fac0ec6a6bae990ca2cb7c77b8426026192b5446480abd2a2fd21'
|
||||
'99800c6ca1158ddc8dbb80959491ff757537d3c30b5e921a65e87f50a9abcb00'
|
||||
'9a7cb30b9d6f2a0e4479c4235415670686752553647ff63155ab0c61f9db2310'
|
||||
'0e9f1fab745c8d6cd1fe37a32c8bd6cca665692aac5c130237e648abef86f632'
|
||||
'142fb08b41a807b192b4b2c166696a1830a1c97967e5099ad0e579bf500e1da4')
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ sha256sums=('fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60'
|
||||
'98d2ea184c151236747003f2d2afd0da71d1875d2868e3ac7358b5cf4925cd2b'
|
||||
'40e1d39f289d65e1b689b741689ab6a83bcfb4264f8b2d0d550f96ab3072bb24'
|
||||
'86daf43473959330706c7992fda2a7d67c849b3591eca8ca2f527d61328a9c75'
|
||||
'69dcf68318ebcc8896b9a7902c18c00d90a9999a5b213d416e500f1961cea477'
|
||||
'4cd6769d9327554869b635e3e119519ee71490c1c3f371075e44c7d828a4a20e'
|
||||
'142fb08b41a807b192b4b2c166696a1830a1c97967e5099ad0e579bf500e1da4')
|
||||
|
||||
prepare() {
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
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 15:13:19.827728809 -0300
|
||||
@@ -103,7 +103,7 @@
|
||||
+++ 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
|
||||
|
||||
#if !defined(l_fseek) /* { */
|
||||
|
||||
-#if defined(LUA_USE_POSIX) /* { */
|
||||
+#if defined(__MINGW32__) || defined(LUA_USE_POSIX) /* { */
|
||||
|
||||
#include <sys/types.h>
|
||||
-#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)
|
||||
|
||||
Reference in New Issue
Block a user