Better implementation of MSVC's _SCL_SECURE macro, plus some PrecompiledHeader.h cleanups.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@690 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-03-05 20:06:38 +00:00
parent 5897d04917
commit 1b95a52b1e
2 changed files with 30 additions and 18 deletions

View File

@ -1,5 +1,21 @@
#pragma once
#ifndef _PCSX2_PRECOMPILED_HEADER_
#define _PCSX2_PRECOMPILED_HEADER_
#endif // pragma once
//////////////////////////////////////////////////////////////////////////////////////////
// Microsoft specific STL extensions for bounds checking and stuff: Enabled in devbuilds,
// disabled in release builds. :)
#ifdef _MSC_VER
#ifdef PCSX2_DEVBUILD
# define _SECURE_SCL 1
# define _SECURE_SCL_THROWS 1
#else
# define _SECURE_SCL 0
#endif
#endif
#define NOMINMAX // Disables other libs inclusion of their own min/max macros (we use std instead)
@ -7,10 +23,14 @@
# define __LINUX__
#endif
#ifndef _WIN32
# include <unistd.h>
#ifdef _WIN32
// disable warning C4244: '=' : conversion from 'big' to 'small', possible loss of data
# pragma warning(disable:4244)
#else
# include <unistd.h> // Non-Windows platforms need this
#endif
//////////////////////////////////////////////////////////////////////////////////////////
// Include the STL junk that's actually handy.
#include <algorithm>
@ -32,22 +52,10 @@
#include <sys/stat.h>
#include <pthread.h>
// TODO : Add items here that are local to Pcsx2 but stay relatively unchanged for
// long periods of time.
#ifdef _WIN32
// disable warning C4244: '=' : conversion from 'big' to 'small', possible loss of data
#pragma warning(disable:4244)
#endif
using std::string; // we use it enough, so bring it into the global namespace.
using std::min;
using std::max;
#include "zlib/zlib.h"
#include "PS2Etypes.h"
#include "StringUtils.h"
typedef int BOOL;
# undef TRUE
@ -55,6 +63,14 @@ typedef int BOOL;
# define TRUE 1
# define FALSE 0
//////////////////////////////////////////////////////////////////////////////////////////
// Begin Pcsx2 Includes: Add items here that are local to Pcsx2 but stay relatively
// unchanged for long periods of time.
#include "zlib/zlib.h"
#include "PS2Etypes.h"
#include "StringUtils.h"
////////////////////////////////////////////////////////////////////
// Compiler/OS specific macros and defines -- Begin Section
@ -119,5 +135,3 @@ enum
EmitterId_Count // must always be last!
};
#endif

View File

@ -19,8 +19,6 @@
#include "PrecompiledHeader.h"
#include "BaseblockEx.h"
#define _SECURE_SCL 0
#include <vector>
using namespace std;