From ebff01c4632d08a8103e6dee1bdb010eb2993a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Ko=C5=82odziejski?= Date: Tue, 17 Feb 2009 20:26:57 +0000 Subject: [PATCH] shat up ARRAYSIZE redefine compiler warnings svn-id: r38444 --- engines/sci/engine/kernel.cpp | 7 ++++--- engines/sci/engine/kfile.cpp | 15 ++++++--------- engines/sci/engine/scriptdebug.cpp | 25 ++++++++++++------------- engines/sci/scicore/tools.cpp | 29 ++++++++++++++--------------- 4 files changed, 36 insertions(+), 40 deletions(-) diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 17e82101613..503ac29c796 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -23,14 +23,15 @@ * */ -#include "sci/engine/gc.h" -#include "sci/include/sciresource.h" -#include "sci/include/engine.h" #ifdef WIN32 # include # include +# undef ARRAYSIZE #endif +#include "sci/engine/gc.h" +#include "sci/include/sciresource.h" +#include "sci/include/engine.h" #include "sci/include/gfx_operations.h" #include "sci/engine/kernel_types.h" diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 774c8778337..b1ef350b9fb 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -23,21 +23,18 @@ * */ +#ifdef WIN32 +# include +#elif defined (__DC__) +# include +#endif + #include "common/str.h" #include "sci/include/engine.h" #include -#ifdef WIN32 -# define WIN32_LEAN_AND_MEAN -# include -# include -# include -#elif defined (__DC__) -# include -#endif - #ifndef O_BINARY #define O_BINARY 0 #endif diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 4f0ee57560d..fd3ddd7a5d9 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -25,22 +25,9 @@ /* Script debugger functionality. Absolutely not threadsafe. */ -#include "sci/engine/gc.h" -#include "sci/include/sciresource.h" -#include "sci/include/engine.h" -#include "sci/include/console.h" -#include "sci/include/kdebug.h" -#include "sci/include/vocabulary.h" -#include "sci/engine/kernel_types.h" -#include "sci/include/sci_midi.h" -#include "sci/include/sci_widgets.h" - -#include "common/util.h" - #ifdef WIN32 # include # include -# include # ifdef sleep # undef sleep # endif @@ -59,6 +46,18 @@ } while (0); #endif +#include "sci/engine/gc.h" +#include "sci/include/sciresource.h" +#include "sci/include/engine.h" +#include "sci/include/console.h" +#include "sci/include/kdebug.h" +#include "sci/include/vocabulary.h" +#include "sci/engine/kernel_types.h" +#include "sci/include/sci_midi.h" +#include "sci/include/sci_widgets.h" + +#include "common/util.h" + #ifdef HAVE_UNISTD_H # include /* Assume this is a sufficient precondition */ diff --git a/engines/sci/scicore/tools.cpp b/engines/sci/scicore/tools.cpp index ec9580681e2..4436ce2e415 100644 --- a/engines/sci/scicore/tools.cpp +++ b/engines/sci/scicore/tools.cpp @@ -24,19 +24,6 @@ */ -#include "common/scummsys.h" -#include "common/str.h" - -#ifdef UNIX -#define _GNU_SOURCE /* For FNM_CASEFOLD in fnmatch.h */ -#include -#endif - -#include "sci/include/engine.h" - -#ifdef HAVE_SYS_TIME_H -# include -#endif #ifdef _MSC_VER # include # include @@ -49,8 +36,6 @@ # include # include -void usleep(long usec); - # ifdef sleep # undef sleep # endif @@ -69,6 +54,20 @@ void usleep(long usec); } while (0); #endif +#include "common/scummsys.h" +#include "common/str.h" + +#ifdef UNIX +#define _GNU_SOURCE /* For FNM_CASEFOLD in fnmatch.h */ +#include +#endif + +#include "sci/include/engine.h" + +#ifdef HAVE_SYS_TIME_H +# include +#endif + #ifdef __DC__ # include #endif