diff --git a/starboard/common/optional.h b/starboard/common/optional.h index b7cd608eac44..af0522365cae 100644 --- a/starboard/common/optional.h +++ b/starboard/common/optional.h @@ -184,8 +184,7 @@ class optional { // Overloaded conversion to bool operator for determining whether the optional // is engaged or not. It returns true if the optional is engaged, and false // otherwise. -#if (defined(_MSC_VER) && (_MSC_VER < 1800)) || \ - (defined(__GNUC__) && \ +#if (defined(__GNUC__) && \ (__GNUC__ < 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ < 5)))) // MSVC 2012 does not support explicit cast operators. // http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx diff --git a/starboard/configuration.h b/starboard/configuration.h index 7a3711f0a157..b38c94112604 100644 --- a/starboard/configuration.h +++ b/starboard/configuration.h @@ -45,8 +45,6 @@ #if defined(__GNUC__) #define SB_IS_COMPILER_GCC 1 -#elif defined(_MSC_VER) -#define SB_IS_COMPILER_MSVC 1 #endif // --- Common Helper Macros -------------------------------------------------- diff --git a/starboard/elf_loader/exported_symbols.cc b/starboard/elf_loader/exported_symbols.cc index 33ecbf6ebac6..bcb28b1b4059 100644 --- a/starboard/elf_loader/exported_symbols.cc +++ b/starboard/elf_loader/exported_symbols.cc @@ -387,16 +387,7 @@ ExportedSymbols::ExportedSymbols() { map_["getifaddrs"] = reinterpret_cast(&__abi_wrap_getifaddrs); map_["setsockopt"] = reinterpret_cast(&__abi_wrap_setsockopt); -#if defined(_MSC_VER) - // MSVC provides a template with the same name. - // The cast helps the compiler to pick the correct C function pointer to be - // used. - REGISTER_SYMBOL( - static_cast(vswprintf)); -#else REGISTER_SYMBOL(vswprintf); -#endif // defined(_MSC_VER) } // NOLINT diff --git a/starboard/shared/modular/starboard_layer_posix_stat_abi_wrappers.cc b/starboard/shared/modular/starboard_layer_posix_stat_abi_wrappers.cc index 4f1602662904..c91e9116d29e 100644 --- a/starboard/shared/modular/starboard_layer_posix_stat_abi_wrappers.cc +++ b/starboard/shared/modular/starboard_layer_posix_stat_abi_wrappers.cc @@ -23,21 +23,13 @@ int stat_helper(int retval, musl_info->st_size = stat_info->st_size; musl_info->st_mode = stat_info->st_mode; -#if defined(_MSC_VER) - musl_info->st_atim.tv_sec = stat_info->st_atime; - musl_info->st_atim.tv_nsec = 0; - musl_info->st_mtim.tv_sec = stat_info->st_mtime; - musl_info->st_mtim.tv_nsec = 0; - musl_info->st_ctim.tv_sec = stat_info->st_ctime; - musl_info->st_ctim.tv_nsec = 0; -#else musl_info->st_atim.tv_sec = stat_info->st_atim.tv_sec; musl_info->st_atim.tv_nsec = stat_info->st_atim.tv_nsec; musl_info->st_mtim.tv_sec = stat_info->st_mtim.tv_sec; musl_info->st_mtim.tv_nsec = stat_info->st_mtim.tv_nsec; musl_info->st_ctim.tv_sec = stat_info->st_ctim.tv_sec; musl_info->st_ctim.tv_nsec = stat_info->st_ctim.tv_nsec; -#endif + return retval; } diff --git a/starboard/shared/testing/no_inline.h b/starboard/shared/testing/no_inline.h index 33ebc1f6a1fa..2113bbc3c49b 100644 --- a/starboard/shared/testing/no_inline.h +++ b/starboard/shared/testing/no_inline.h @@ -16,8 +16,6 @@ #define STARBOARD_SHARED_TESTING_NO_INLINE_H_ #if defined(__GNUC__) #define SB_TEST_FORCE_NO_INLINE __attribute__((noinline)) -#elif defined(_MSC_VER) -#define SB_TEST_FORCE_NO_INLINE __declspec(noinline) #else #error "Your compiler is not supported" #endif diff --git a/starboard/types.h b/starboard/types.h index 68c5a5ebb3cb..55d5f7c1ac98 100644 --- a/starboard/types.h +++ b/starboard/types.h @@ -55,11 +55,6 @@ typedef int64_t ssize_t; #endif #endif // !SB_HAS(SSIZE_T) -#if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable : 4310) // Cast truncates constant value. -#endif - // Simulate needed portions of limits.h for platforms that don't provide it. static const int8_t kSbInt8Min = ((int8_t)0x80); @@ -78,10 +73,6 @@ static const int64_t kSbInt64Min = ((int64_t)SB_INT64_C(0x8000000000000000)); static const int64_t kSbInt64Max = ((int64_t)SB_INT64_C(0x7FFFFFFFFFFFFFFF)); static const uint64_t kSbUInt64Max = ((uint64_t)SB_INT64_C(0xFFFFFFFFFFFFFFFF)); -#if defined(_MSC_VER) -#pragma warning(pop) -#endif - // A value that represents an int that is probably invalid. #define kSbInvalidInt kSbInt32Min