mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-12-12 08:38:24 +00:00
Really fixed macro redefinition warnings for stdint.h limits.
This commit is contained in:
parent
0a24e9b62e
commit
4c48cac66f
@ -291,25 +291,57 @@ typedef unsigned int uint;
|
|||||||
// Maximum and minimum representable values
|
// Maximum and minimum representable values
|
||||||
#if !defined(PLATFORM_OSX) && !defined(__STDC_LIMIT_MACROS)
|
#if !defined(PLATFORM_OSX) && !defined(__STDC_LIMIT_MACROS)
|
||||||
|
|
||||||
|
#ifndef INT8_MAX
|
||||||
#define INT8_MAX SCHAR_MAX
|
#define INT8_MAX SCHAR_MAX
|
||||||
|
#endif
|
||||||
|
#ifndef INT16_MAX
|
||||||
#define INT16_MAX SHRT_MAX
|
#define INT16_MAX SHRT_MAX
|
||||||
|
#endif
|
||||||
|
#ifndef INT32_MAX
|
||||||
#define INT32_MAX LONG_MAX
|
#define INT32_MAX LONG_MAX
|
||||||
|
#endif
|
||||||
|
#ifndef INT64_MAX
|
||||||
#define INT64_MAX (((int64)~0) >> 1)
|
#define INT64_MAX (((int64)~0) >> 1)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef INT8_MIN
|
||||||
#define INT8_MIN SCHAR_MIN
|
#define INT8_MIN SCHAR_MIN
|
||||||
|
#endif
|
||||||
|
#ifndef INT16_MIN
|
||||||
#define INT16_MIN SHRT_MIN
|
#define INT16_MIN SHRT_MIN
|
||||||
|
#endif
|
||||||
|
#ifndef INT32_MIN
|
||||||
#define INT32_MIN LONG_MIN
|
#define INT32_MIN LONG_MIN
|
||||||
|
#endif
|
||||||
|
#ifndef INT64_MIN
|
||||||
#define INT64_MIN (((int64)1) << 63)
|
#define INT64_MIN (((int64)1) << 63)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef UINT8_MAX
|
||||||
#define UINT8_MAX ((uint8)~0)
|
#define UINT8_MAX ((uint8)~0)
|
||||||
|
#endif
|
||||||
|
#ifndef UINT16_MAX
|
||||||
#define UINT16_MAX ((uint16)~0)
|
#define UINT16_MAX ((uint16)~0)
|
||||||
|
#endif
|
||||||
|
#ifndef UINT32_MAX
|
||||||
#define UINT32_MAX ((uint32)~0)
|
#define UINT32_MAX ((uint32)~0)
|
||||||
|
#endif
|
||||||
|
#ifndef UINT16_MAX
|
||||||
#define UINT64_MAX ((uint64)~0)
|
#define UINT64_MAX ((uint64)~0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef UINT8_MIN
|
||||||
#define UINT8_MIN 0
|
#define UINT8_MIN 0
|
||||||
|
#endif
|
||||||
|
#ifndef UINT16_MIN
|
||||||
#define UINT16_MIN 0
|
#define UINT16_MIN 0
|
||||||
|
#endif
|
||||||
|
#ifndef UINT32_MIN
|
||||||
#define UINT32_MIN 0
|
#define UINT32_MIN 0
|
||||||
|
#endif
|
||||||
|
#ifndef UINT64_MIN
|
||||||
#define UINT64_MIN 0
|
#define UINT64_MIN 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // !PLATFORM_OSX && !__STDC_LIMIT_MACROS
|
#endif // !PLATFORM_OSX && !__STDC_LIMIT_MACROS
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user