Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove MSC_VER from starboard #4129

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions starboard/common/optional.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__) && \
madhurajayaraman marked this conversation as resolved.
Show resolved Hide resolved
(__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
Expand Down
2 changes: 0 additions & 2 deletions starboard/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 --------------------------------------------------
Expand Down
9 changes: 0 additions & 9 deletions starboard/elf_loader/exported_symbols.cc
Original file line number Diff line number Diff line change
Expand Up @@ -387,16 +387,7 @@ ExportedSymbols::ExportedSymbols() {
map_["getifaddrs"] = reinterpret_cast<const void*>(&__abi_wrap_getifaddrs);
map_["setsockopt"] = reinterpret_cast<const void*>(&__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<int (*)(wchar_t* buffer, size_t count, const wchar_t* format,
va_list argptr)>(vswprintf));
#else
REGISTER_SYMBOL(vswprintf);
#endif // defined(_MSC_VER)

} // NOLINT

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 0 additions & 2 deletions starboard/shared/testing/no_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 7 additions & 16 deletions starboard/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@

// The C library used must provide these headers to be standard conforming.

#include <float.h>
#include <inttypes.h>
#include <limits.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <float.h> // NOLINT
#include <inttypes.h> // NOLINT
#include <limits.h> // NOLINT
#include <stdarg.h> // NOLINT
#include <stdbool.h> // NOLINT
#include <stddef.h> // NOLINT
#include <stdint.h> // NOLINT

#if SB_HAS(SYS_TYPES_H)
#include <sys/types.h>
Expand All @@ -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);
Expand All @@ -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

Expand Down
Loading