Cleanup: remove checks for old MSVC versions

This commit is contained in:
Rubidium 2024-03-22 23:36:56 +01:00 committed by rubidium42
parent d09b5aaeba
commit caa7c44052
2 changed files with 7 additions and 22 deletions

View File

@ -259,7 +259,7 @@ void CreateConsole()
return;
}
#if defined(_MSC_VER) && _MSC_VER >= 1900
#if defined(_MSC_VER)
freopen("CONOUT$", "a", stdout);
freopen("CONIN$", "r", stdin);
freopen("CONOUT$", "a", stderr);

View File

@ -28,6 +28,12 @@
#if defined(__APPLE__)
# include "os/macosx/osx_stdafx.h"
#else
/* It seems that we need to include stdint.h before anything else
* We need INT64_MAX, which for most systems comes from stdint.h.
* For OSX the inclusion is already done in osx_stdafx.h. */
# define __STDC_LIMIT_MACROS
# include <stdint.h>
#endif /* __APPLE__ */
#if defined(__HAIKU__)
@ -37,15 +43,6 @@
# define _GNU_SOURCE
#endif
/* It seems that we need to include stdint.h before anything else
* We need INT64_MAX, which for most systems comes from stdint.h. However, MSVC
* does not have stdint.h.
* For OSX the inclusion is already done in osx_stdafx.h. */
#if !defined(__APPLE__) && (!defined(_MSC_VER) || _MSC_VER >= 1600)
# define __STDC_LIMIT_MACROS
# include <stdint.h>
#endif
#include <algorithm>
#include <array>
#include <bit>
@ -115,9 +112,6 @@
# pragma warning(disable: 4200) // nonstandard extension used : zero-sized array in struct/union
# pragma warning(disable: 4355) // 'this' : used in base member initializer list
# if (_MSC_VER < 1400) // MSVC 2005 safety checks
# error "Only MSVC 2005 or higher are supported. MSVC 2003 and earlier are not! Upgrade your compiler."
# endif /* (_MSC_VER < 1400) */
# pragma warning(disable: 4291) // no matching operator delete found; memory will not be freed if initialization throws an exception (reason: our overloaded functions never throw an exception)
# pragma warning(disable: 4996) // 'function': was declared deprecated
# pragma warning(disable: 6308) // code analyzer: 'realloc' might return null pointer: assigning null pointer to 't_ptr', which is passed as an argument to 'realloc', will cause the original memory block to be leaked
@ -126,15 +120,6 @@
# pragma warning(disable: 6031) // code analyzer: Return value ignored: 'ReadFile'
# pragma warning(disable: 6246) // code analyzer: Local declaration of 'statspec' hides declaration of the same name in outer scope. For additional information, see previous declaration at ...
# if (_MSC_VER == 1500) // Addresses item #13 on http://blogs.msdn.com/b/vcblog/archive/2008/08/11/tr1-fixes-in-vc9-sp1.aspx, for Visual Studio 2008
# define _DO_NOT_DECLARE_INTERLOCKED_INTRINSICS_IN_MEMORY
# include <intrin.h>
# endif
# if (_MSC_VER < 1900)
# define inline __forceinline
# endif
# define CDECL _cdecl
# if defined(_WIN32) && !defined(_WIN64)