diff --git a/src/core/platform.h b/src/core/platform.h index 27f1ac7..654b2f9 100644 --- a/src/core/platform.h +++ b/src/core/platform.h @@ -353,8 +353,7 @@ // Used in twlocale # define USE_STD_CPP_LOCALE_WORKAROUND \ (IS_SUNPRO || (IS_KAI && !IS_KAI_3_4)) // TODO:BAM -- name this something more general. -//# define USE_CLIB_LOCALE IS_KAI || HAVE_GCC -# define USE_CLIB_LOCALE (!HAVE_LOCALE || (HAVE_GCC && (IS_SOLARIS || IS_AIX))) +# define USE_CLIB_LOCALE (!HAVE_LOCALE || HAVE_GCC || IS_KAI) # define USES_CLIB_DATE_FUNCTION \ (USE_CLIB_LOCALE || IS_SUNPRO || \ IS_MSVC) // if we use clib, can't use C++ time_put, and SUNPRO and MSVC add characters diff --git a/src/cryptlib/config.h b/src/cryptlib/config.h index 0f5de86..9fe0838 100644 --- a/src/cryptlib/config.h +++ b/src/cryptlib/config.h @@ -88,6 +88,7 @@ typedef unsigned char uint8_t; #include #endif +#if __cplusplus < 201103L typedef unsigned short word16; #if SIZEOF_INT == 4 typedef unsigned int word32; @@ -96,6 +97,10 @@ typedef unsigned short word16; #else #error "I don't seem to have a 32-bit integer type on this system." #endif +#else +typedef uint16_t word16; +typedef uint32_t word32; +#endif // word should have the same size as your CPU registers // dword should be twice as big as word @@ -146,16 +151,25 @@ typedef unsigned long long word64; #elif defined(__GNUC__) +#if __cplusplus < 201103L typedef word32 word; #if SIZEOF_LONG_LONG == 8 typedef unsigned long long dword; #define WORD64_AVAILABLE typedef unsigned long long word64; #define W64LIT(x) x##LL - #else +#else #error "I don't seem to have a 64-bit integer type on this system." #endif -#else +#else // __cplusplus < 201103L + +typedef uint32_t word; +typedef uint64_t dword; +typedef uint64_t word64; + +#endif + +#else // compiler type typedef unsigned int word; typedef unsigned long dword;