X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/b5422865f473faf3977f31b96a635c4c8c4ede09..9dae56ea45a0f5f8136a5c93d6f3a7f99399ca73:/os-win32/stdint.h diff --git a/os-win32/stdint.h b/os-win32/stdint.h index 48ae474..efab2ae 100644 --- a/os-win32/stdint.h +++ b/os-win32/stdint.h @@ -29,6 +29,8 @@ #error "This stdint.h file should only be compiled under Windows" #endif +#include + typedef unsigned char uint8_t; typedef signed char int8_t; typedef unsigned short uint16_t; @@ -38,6 +40,16 @@ typedef int int32_t; typedef __int64 int64_t; typedef unsigned __int64 uint64_t; +#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) +#ifndef SIZE_MAX +#ifdef _WIN64 +#define SIZE_MAX _UI64_MAX +#else +#define SIZE_MAX _UI32_MAX +#endif +#endif +#endif + #ifndef CASSERT #define CASSERT(exp, name) typedef int dummy##name [(exp) ? 1 : -1]; #endif