From bd5fe66fec02f951e1513a6ec894994b51425b72 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Wed, 29 Jun 2011 12:43:43 +0000 Subject: [PATCH] Another compile fix for echoprint on mingw. --- 3rdparty/echoprint-codegen/src/File.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/3rdparty/echoprint-codegen/src/File.h b/3rdparty/echoprint-codegen/src/File.h index 3c5a8fadb..80a3f6840 100644 --- a/3rdparty/echoprint-codegen/src/File.h +++ b/3rdparty/echoprint-codegen/src/File.h @@ -7,9 +7,14 @@ #ifndef FILE_H #define FILE_H #include -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__MINGW32__) #include "win_unistd.h" #endif + +#ifdef __MINGW32__ +#include // For F_OK +#endif + /* This makes file writing a bit easier (makes sure we don't forget to fclose, basically). Use it like this: @@ -31,7 +36,7 @@ public: static bool ends_with(const char* filename, const char* ending) { int nFilename = strlen(filename); int nEnding = strlen(ending); - + bool same = false; if (nEnding <= nFilename) { const char* file_end = filename + strlen(filename) - strlen(ending);