Skip to content

Commit

Permalink
Include <cstdint> header in Common.h
Browse files Browse the repository at this point in the history
This change also cleans up some ifdef'd code for no longer supported
versions of MSVC.

Fixes: #3139
  • Loading branch information
arcady-lunarg committed May 15, 2023
1 parent d9c3c75 commit 1e4955a
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions glslang/Include/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#else
#include <cmath>
#endif
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <list>
Expand All @@ -66,7 +67,7 @@ std::string to_string(const T& val) {
}
#endif

#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || (defined(MINGW_HAS_SECURE_API) && MINGW_HAS_SECURE_API)
#if defined(MINGW_HAS_SECURE_API) && MINGW_HAS_SECURE_API
#include <basetsd.h>
#ifndef snprintf
#define snprintf sprintf_s
Expand All @@ -82,22 +83,6 @@ std::string to_string(const T& val) {
#define UINT_PTR uintptr_t
#endif

#if defined(_MSC_VER) && _MSC_VER < 1800
#include <stdlib.h>
inline long long int strtoll (const char* str, char** endptr, int base)
{
return _strtoi64(str, endptr, base);
}
inline unsigned long long int strtoull (const char* str, char** endptr, int base)
{
return _strtoui64(str, endptr, base);
}
inline long long int atoll (const char* str)
{
return strtoll(str, NULL, 10);
}
#endif

#if defined(_MSC_VER)
#define strdup _strdup
#endif
Expand Down

0 comments on commit 1e4955a

Please sign in to comment.