From 89afb970d88e3efa8ddb2f1eafff10cd6525f2b7 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 29 Jan 2012 19:28:19 +0000 Subject: VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization. git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- WebServer/Globals.h | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 WebServer/Globals.h (limited to 'WebServer/Globals.h') diff --git a/WebServer/Globals.h b/WebServer/Globals.h new file mode 100644 index 000000000..027b988ef --- /dev/null +++ b/WebServer/Globals.h @@ -0,0 +1,78 @@ + +// Globals.h + +// This file gets included from every module in the project, so that global symbols may be introduced easily +// Also used for precompiled header generation in MSVC environments + + + + + +// OS-dependent stuff: +#ifdef _WIN32 + #define WIN32_LEAN_AND_MEAN + #include + #include +#else + #include + #include // for mkdir + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include +#endif + + + + + +// CRT stuff: +#include +#include + + + + + +// STL stuff: +#include +#include +#include +#include +#include + + + + + +// Common headers: +#include "../source/cCriticalSection.h" +#include "../source/cMCLogger.h" + + + + + +// Common definitions: + +/// Evaluates to the number of elements in an array (compile-time!) +#define ARRAYCOUNT(X) (sizeof(X) / sizeof(*(X))) + +// sprintf_s is the preferred call in MSVC ("secure"); make it *nix-compatible: +#ifndef _WIN32 + #define sprintf_s(dst, size, format, ...) sprintf(dst, format, __VA_ARGS__ ) + #define vsnprintf_s(buffer, buffer_size, maxcount, stringbuffer, ...) (vsnprintf(buffer, maxcount, stringbuffer, __VA_ARGS__)) +#endif // _WIN32 + + + + + -- cgit v1.2.3