From ba2f35e44f26ac9e42466048fc90b2470a197692 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 10 Jan 2017 18:20:47 +0100 Subject: [PATCH] more stbool.h includes, MSVC has no unlink --- src/attributes/key.h | 3 +++ src/donations.test.c | 1 + src/give.h | 3 +++ src/kernel/command.test.c | 2 ++ src/market.h | 3 +++ src/monsters.h | 3 +++ src/platform.h | 5 ++++- src/renumber.test.c | 1 + src/reports.h | 2 +- src/summary.h | 2 ++ src/util/xml.h | 2 ++ 11 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/attributes/key.h b/src/attributes/key.h index 89292db1d..d2cea1ff0 100644 --- a/src/attributes/key.h +++ b/src/attributes/key.h @@ -18,6 +18,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef H_ATTRIBUTE_KEY #define H_ATTRIBUTE_KEY + +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/src/donations.test.c b/src/donations.test.c index 068aba74a..09cd31977 100644 --- a/src/donations.test.c +++ b/src/donations.test.c @@ -1,3 +1,4 @@ +#include #include "donations.h" #include diff --git a/src/give.h b/src/give.h index 9c06e89ca..94eee729c 100644 --- a/src/give.h +++ b/src/give.h @@ -12,6 +12,9 @@ */ #ifndef H_GC_GIVE #define H_GC_GIVE + +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/src/kernel/command.test.c b/src/kernel/command.test.c index f38c7e443..25e75fdc3 100644 --- a/src/kernel/command.test.c +++ b/src/kernel/command.test.c @@ -10,7 +10,9 @@ without prior permission by the authors of Eressea. */ +#include #include "command.h" + #include "unit.h" #include "order.h" diff --git a/src/market.h b/src/market.h index a74c88391..74dc8db17 100644 --- a/src/market.h +++ b/src/market.h @@ -12,6 +12,9 @@ without prior permission by the authors of Eressea. */ #ifndef H_GC_MARKET #define H_GC_MARKET + +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/src/monsters.h b/src/monsters.h index 52e9ebf37..a5a3ccd15 100644 --- a/src/monsters.h +++ b/src/monsters.h @@ -18,6 +18,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef H_GC_MONSTER #define H_GC_MONSTER + +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/src/platform.h b/src/platform.h index f3fd9fbae..88bff8ad5 100644 --- a/src/platform.h +++ b/src/platform.h @@ -9,7 +9,7 @@ #endif #define NO_STRDUP #define NO_MKDIR -#define mkdir(d, a) _mkdir(d) +#define NO_UNLINK #define _CRT_SECURE_NO_WARNINGS #pragma warning(disable: 4710 4820) #pragma warning(disable: 4100) // unreferenced formal parameter @@ -38,4 +38,7 @@ char * strdup(const char *s); int mkdir(const char *pathname, int mode); #endif +#ifdef NO_UNLINK +int unlink(const char *pathname); +#endif #endif diff --git a/src/renumber.test.c b/src/renumber.test.c index 6c3f0f17b..8f6f91a59 100644 --- a/src/renumber.test.c +++ b/src/renumber.test.c @@ -1,3 +1,4 @@ +#include #include "renumber.h" #include diff --git a/src/reports.h b/src/reports.h index e5fd976e3..99dd7ebf6 100644 --- a/src/reports.h +++ b/src/reports.h @@ -20,10 +20,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef H_KRNL_REPORTS #define H_KRNL_REPORTS -#include #include #include #include +#include struct stream; struct seen_region; diff --git a/src/summary.h b/src/summary.h index ea8daeee1..b12d74009 100644 --- a/src/summary.h +++ b/src/summary.h @@ -11,6 +11,8 @@ #ifndef H_GC_SUMMARY #define H_GC_SUMMARY +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/src/util/xml.h b/src/util/xml.h index 921cd3f53..bd22e3e0a 100644 --- a/src/util/xml.h +++ b/src/util/xml.h @@ -13,6 +13,8 @@ #ifndef H_UTIL_XML #define H_UTIL_XML +#include + #ifdef __cplusplus extern "C" { #endif