From ac9a882f0782001c9f4dd79e5f548c54c8948cd2 Mon Sep 17 00:00:00 2001 From: Buginator Date: Sun, 15 Feb 2009 06:09:24 +0000 Subject: [PATCH] Fixes #257 Can compile OK with MSVC once again. Frame.h must be included before default system header #includes, so we don't have linker redefinitions & conflicts with the non C99 compliant routines that MSVC uses. Or in other words, we want our C99 compliant routines to override the default routines that MSVC uses. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6640 4a71c877-e1ca-e34f-864e-861f7616d084 --- lib/framework/frame.h | 6 ++++++ lib/framework/stdio_ext.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/framework/frame.h b/lib/framework/frame.h index 9c32aaad2..a5f5dbfb5 100644 --- a/lib/framework/frame.h +++ b/lib/framework/frame.h @@ -31,6 +31,12 @@ #endif #include "types.h" +/** +* NOTE: the next two #include lines are needed by MSVC to override the default, +* non C99 compliant routines, and redefinition; different linkage errors +*/ +#include "stdio_ext.h" +#include "string_ext.h" #include "macros.h" #include "debug.h" diff --git a/lib/framework/stdio_ext.c b/lib/framework/stdio_ext.c index 4cc8183f2..87d05aa03 100644 --- a/lib/framework/stdio_ext.c +++ b/lib/framework/stdio_ext.c @@ -17,14 +17,13 @@ along with Warzone 2100; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "frame.h" #include "stdio_ext.h" #include #include #include -#include "frame.h" - int vslcatprintf(char* str, size_t size, const char* format, va_list ap) {