mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
5897d04917
commit
1b95a52b1e
|
@ -1,5 +1,21 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#ifndef _PCSX2_PRECOMPILED_HEADER_
|
#ifndef _PCSX2_PRECOMPILED_HEADER_
|
||||||
#define _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)
|
#define NOMINMAX // Disables other libs inclusion of their own min/max macros (we use std instead)
|
||||||
|
|
||||||
|
@ -7,10 +23,14 @@
|
||||||
# define __LINUX__
|
# define __LINUX__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifdef _WIN32
|
||||||
# include <unistd.h>
|
// 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
|
#endif
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Include the STL junk that's actually handy.
|
// Include the STL junk that's actually handy.
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
@ -32,22 +52,10 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <pthread.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::string; // we use it enough, so bring it into the global namespace.
|
||||||
using std::min;
|
using std::min;
|
||||||
using std::max;
|
using std::max;
|
||||||
|
|
||||||
#include "zlib/zlib.h"
|
|
||||||
#include "PS2Etypes.h"
|
|
||||||
#include "StringUtils.h"
|
|
||||||
|
|
||||||
typedef int BOOL;
|
typedef int BOOL;
|
||||||
|
|
||||||
# undef TRUE
|
# undef TRUE
|
||||||
|
@ -55,6 +63,14 @@ typedef int BOOL;
|
||||||
# define TRUE 1
|
# define TRUE 1
|
||||||
# define FALSE 0
|
# 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
|
// Compiler/OS specific macros and defines -- Begin Section
|
||||||
|
|
||||||
|
@ -119,5 +135,3 @@ enum
|
||||||
|
|
||||||
EmitterId_Count // must always be last!
|
EmitterId_Count // must always be last!
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
#include "PrecompiledHeader.h"
|
#include "PrecompiledHeader.h"
|
||||||
#include "BaseblockEx.h"
|
#include "BaseblockEx.h"
|
||||||
|
|
||||||
#define _SECURE_SCL 0
|
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
Loading…
Reference in New Issue