From ef725ba3b6bb81ca2fe0aa3d37e920cdbb429c20 Mon Sep 17 00:00:00 2001 From: CYBERDEViL Date: Thu, 4 May 2023 22:15:50 +0200 Subject: [PATCH] Cross compile with MSYS2 --- src/reader.h | 8 +++++++- src/rewise.c | 8 +++++++- src/wisescript.c | 7 ++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/reader.h b/src/reader.h index f334672..9d03343 100644 --- a/src/reader.h +++ b/src/reader.h @@ -18,12 +18,18 @@ #define H_REWISE_READER #include -#include // PATH_MAX #include #include // access, F_OK #include // uint32_t #include // malloc +// PATH_MAX +#ifdef __linux__ +#include +#elif defined(__CYGWIN__) || defined(_WIN32) || defined(_WIN64) +#include +#endif + #include "errors.h" diff --git a/src/rewise.c b/src/rewise.c index 0b35be5..9571e03 100644 --- a/src/rewise.c +++ b/src/rewise.c @@ -17,7 +17,6 @@ #include #include #include -#include // PATH_MAX, NAME_MAX #include #include #include @@ -27,6 +26,13 @@ #include #include +// PATH_MAX, NAME_MAX +#ifdef __linux__ +#include +#elif defined(__CYGWIN__) || defined(_WIN32) || defined(_WIN64) +#include +#endif + #include "print.h" #include "reader.h" #include "inflate.h" diff --git a/src/wisescript.c b/src/wisescript.c index 9a3b6f2..dcb5aa5 100644 --- a/src/wisescript.c +++ b/src/wisescript.c @@ -15,10 +15,15 @@ */ #include -#include #include #include +#ifdef __linux__ +#include +#elif defined(__CYGWIN__) || defined(_WIN32) || defined(_WIN64) +#include +#endif + #include "wisescript.h" #include "reader.h"