Remove workarounds for ancient MSVC versions

This commit is contained in:
Martin Natano
2022-06-07 22:49:05 +02:00
parent 838de6fb81
commit c40985122e
20 changed files with 32 additions and 239 deletions
@@ -29,9 +29,7 @@
#include "RageFileDriverDeflate.h"
#include "ver.h"
#if defined(_MSC_VER)
#pragma comment(lib, "dbghelp.lib")
#endif
// XXX: What happens when we *don't* have version info? Does that ever actually happen?
#include "ver.h"
@@ -7,9 +7,7 @@
#include <windows.h>
#include <tlhelp32.h>
#if defined(_MSC_VER)
#pragma comment(lib, "version.lib")
#endif
bool GetFileVersion( RString sFile, RString &sOut )
{
-2
View File
@@ -4,10 +4,8 @@
#include "RageUtil.h"
#include "archutils/Win32/ErrorStrings.h"
#if defined(_MSC_VER)
#pragma comment(lib, "setupapi.lib")
#pragma comment(lib, "hid.lib")
#endif
extern "C" {
#include "archutils/Win32/ddk/setupapi.h"
-25
View File
@@ -2,15 +2,9 @@
#define ARCH_SETUP_WINDOWS_H
#define SUPPORT_OPENGL
#if defined(_MSC_VER)
#define SUPPORT_D3D
#endif
#if defined(_MSC_VER)
#if _MSC_VER == 1400 // VC8 specific warnings
#pragma warning (disable : 4005) // macro redefinitions (ARRAYSIZE)
#endif
/*
The following warnings are disabled in all builds.
@@ -62,8 +56,6 @@ C4355: 'this' : used in base member initializer list
// If this isn't defined to 0, VC fails to define things like stat and alloca.
#define __STDC__ 0
#endif
#include <wchar.h> // needs to be included before our fixes below
#define lstat stat
@@ -77,10 +69,8 @@ struct tm *my_localtime_r( const time_t *timep, struct tm *result );
#define localtime_r my_localtime_r
struct tm *my_gmtime_r( const time_t *timep, struct tm *result );
#define gmtime_r my_gmtime_r
#if defined(_MSC_VER)
void my_usleep( unsigned long usec );
#define usleep my_usleep
#endif
// Missing stdint types:
typedef signed char int8_t;
@@ -94,20 +84,6 @@ typedef int int32_t;
typedef unsigned int uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#if defined(_MSC_VER)
#if _MSC_VER < 1700 // 1700 = VC++ 2011
#define INT64_C(i) i##i64
#ifndef UINT64_C
#define UINT64_C(i) i##ui64
#endif
#endif // #if _MSC_VER < 1700
#if (_MSC_VER >= 1400) && (_MSC_VER < 1800) // 1800 = VC++ 2013
#define llabs(i) _abs64(i)
#endif // #if (_MSC_VER >= 1400) && (_MSC_VER < 1800)
#if _MSC_VER < 1400 // 1400 = VC++ 2005
int64_t llabs( int64_t i ) { return i >= 0 ? i : -i; }
#endif // #if _MSC_VER < 1400
#endif // #if defined(_MSC_VER)
#undef min
#undef max
@@ -119,7 +95,6 @@ int64_t llabs( int64_t i ) { return i >= 0 ? i : -i; }
#define CRASH_HANDLER
#endif
#if defined(_MSC_VER) && (_MSC_VER >= 1310) // Byte swap functions were first implemented in Visual Studio .NET 2003
#define ArchSwap32(n) _byteswap_ulong(n)
#define ArchSwap24(n) _byteswap_ulong(n) >> 8
#define ArchSwap16(n) _byteswap_ushort(n)
+1 -17
View File
@@ -20,9 +20,7 @@ Revision History:
#ifndef _DBGHELP_
#define _DBGHELP_
#if _MSC_VER > 1020
#pragma once
#endif
// As a general principal always call the 64 bit version
@@ -46,7 +44,7 @@ extern "C" {
#define DBHLP_DEPRECIATED
#else
#define IMAGEAPI DECLSPEC_IMPORT __stdcall
#if (_MSC_VER >= 1300) && !defined(MIDL_PASS)
#if !defined(MIDL_PASS)
#define DBHLP_DEPRECIATED __declspec(deprecated)
#else
#define DBHLP_DEPRECIATED
@@ -2044,14 +2042,8 @@ typedef enum _MINIDUMP_STREAM_TYPE {
// Operating System specific information.
//
#if defined(_MSC_VER)
#if _MSC_VER >= 800
#if _MSC_VER >= 1200
#pragma warning(push)
#endif
#pragma warning(disable:4201) /* Nameless struct/union */
#endif
#endif
typedef struct _MINIDUMP_SYSTEM_INFO {
@@ -2161,15 +2153,7 @@ typedef struct _MINIDUMP_SYSTEM_INFO {
typedef union _CPU_INFORMATION CPU_INFORMATION, *PCPU_INFORMATION;
#if defined(_MSC_VER)
#if _MSC_VER >= 800
#if _MSC_VER >= 1200
#pragma warning(pop)
#else
#pragma warning(disable:4201) /* Nameless struct/union */
#endif
#endif
#endif
//
// The minidump thread contains standard thread
-2
View File
@@ -15,9 +15,7 @@ Abstract:
#ifndef _INC_SETUPAPI
#define _INC_SETUPAPI
#if _MSC_VER > 1000
#pragma once
#endif
//
// Define API decoration for direct importing of DLL references.