1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2024-11-12 21:09:01 +00:00

fix cstdint.hpp

This commit is contained in:
bolero-MURAKAMI 2014-07-04 00:16:33 +09:00
parent 720500dd75
commit ddde1f87e5

View file

@ -11,36 +11,64 @@
#include <climits>
#include <cstdint>
#include <sprout/config.hpp>
#include <sprout/detail/predef.hpp>
//
// SPROUT_INT[N]_C
// SPROUT_UINT[N]_C
//
#if SPROUT_CLANG_IN_RANGE((3, 0, 0), (3, 3, 0)) && !defined(__STDC_CONSTANT_MACROS)
#ifndef INT8_C
# define SPROUT_INT8_C(n) n
#else
# define SPROUT_INT8_C(n) INT8_C(n)
#endif
#ifndef UINT8_C
# define SPROUT_UINT8_C(n) n
#else
# define SPROUT_UINT8_C(n) UINT8_C(n)
#endif
#ifndef INT16_C
# define SPROUT_INT16_C(n) n
#else
# define SPROUT_INT16_C(n) INT16_C(n)
#endif
#ifndef UINT16_C
# define SPROUT_UINT16_C(n) n
#else
# define SPROUT_UINT16_C(n) UINT16_C(n)
#endif
#ifndef INT32_C
# if LONG_MAX == LLONG_MAX
# define SPROUT_INT32_C(n) n
# define SPROUT_UINT32_C(n) n ## U
# define SPROUT_INT64_C(n) n ## UL
# define SPROUT_UINT64_C(n) n ## UL
# else
# define SPROUT_INT32_C(n) n ## L
# endif
#else
# define SPROUT_INT32_C(n) INT32_C(n)
#endif
#ifndef UINT32_C
# if LONG_MAX == LLONG_MAX
# define SPROUT_UINT32_C(n) n ## U
# else
# define SPROUT_UINT32_C(n) n ## UL
# define SPROUT_INT64_C(n) n ## ULL
# endif
# define SPROUT_UINT32_C(n) UINT32_C(n)
#endif
#ifndef INT64_C
# if LONG_MAX == LLONG_MAX
# define SPROUT_INT64_C(n) n ## L
# else
# define SPROUT_INT64_C(n) n ## LL
# endif
#else
# define SPROUT_INT64_C(n) INT64_C(n)
#endif
#ifndef UINT64_C
# if LONG_MAX == LLONG_MAX
# define SPROUT_UINT64_C(n) n ## UL
# else
# define SPROUT_UINT64_C(n) n ## ULL
# endif
#else
# define SPROUT_INT8_C(n) INT8_C(n)
# define SPROUT_UINT8_C(n) UINT8_C(n)
# define SPROUT_INT16_C(n) INT16_C(n)
# define SPROUT_UINT16_C(n) UINT16_C(n)
# define SPROUT_INT32_C(n) INT32_C(n)
# define SPROUT_UINT32_C(n) UINT32_C(n)
# define SPROUT_INT64_C(n) INT64_C(n)
# define SPROUT_UINT64_C(n) UINT64_C(n)
#endif