use clib locale code whenever compiler is gcc; try to use stdint.h types in cryptlib when possible
This commit is contained in:
		
							parent
							
								
									0467ede8d9
								
							
						
					
					
						commit
						458d8652b3
					
				|  | @ -353,8 +353,7 @@ | ||||||
| // Used in twlocale
 | // Used in twlocale
 | ||||||
| #    define USE_STD_CPP_LOCALE_WORKAROUND \ | #    define USE_STD_CPP_LOCALE_WORKAROUND \ | ||||||
|         (IS_SUNPRO || (IS_KAI && !IS_KAI_3_4)) // TODO:BAM -- name this something more general.
 |         (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_KAI) | ||||||
| #    define USE_CLIB_LOCALE (!HAVE_LOCALE || (HAVE_GCC && (IS_SOLARIS || IS_AIX))) |  | ||||||
| #    define USES_CLIB_DATE_FUNCTION      \ | #    define USES_CLIB_DATE_FUNCTION      \ | ||||||
|         (USE_CLIB_LOCALE || IS_SUNPRO || \ |         (USE_CLIB_LOCALE || IS_SUNPRO || \ | ||||||
|          IS_MSVC) // if we use clib, can't use C++ time_put, and SUNPRO and MSVC add characters
 |          IS_MSVC) // if we use clib, can't use C++ time_put, and SUNPRO and MSVC add characters
 | ||||||
|  |  | ||||||
|  | @ -88,6 +88,7 @@ typedef unsigned char uint8_t; | ||||||
| #include <stdint.h> | #include <stdint.h> | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | #if __cplusplus < 201103L | ||||||
| typedef unsigned short word16; | typedef unsigned short word16; | ||||||
| #if SIZEOF_INT == 4 | #if SIZEOF_INT == 4 | ||||||
|  typedef unsigned int word32; |  typedef unsigned int word32; | ||||||
|  | @ -96,6 +97,10 @@ typedef unsigned short word16; | ||||||
|  #else |  #else | ||||||
|  #error "I don't seem to have a 32-bit integer type on this system." |  #error "I don't seem to have a 32-bit integer type on this system." | ||||||
| #endif | #endif | ||||||
|  | #else | ||||||
|  | typedef uint16_t word16; | ||||||
|  | typedef uint32_t word32; | ||||||
|  | #endif | ||||||
| 
 | 
 | ||||||
| // word should have the same size as your CPU registers
 | // word should have the same size as your CPU registers
 | ||||||
| // dword should be twice as big as word
 | // dword should be twice as big as word
 | ||||||
|  | @ -146,6 +151,7 @@ typedef unsigned long long word64; | ||||||
| 
 | 
 | ||||||
| #elif defined(__GNUC__) | #elif defined(__GNUC__) | ||||||
| 
 | 
 | ||||||
|  | #if __cplusplus < 201103L | ||||||
| typedef word32 word; | typedef word32 word; | ||||||
| #if SIZEOF_LONG_LONG == 8 | #if SIZEOF_LONG_LONG == 8 | ||||||
|  typedef unsigned long long dword; |  typedef unsigned long long dword; | ||||||
|  | @ -155,7 +161,15 @@ typedef word32 word; | ||||||
| #else | #else | ||||||
|  #error "I don't seem to have a 64-bit integer type on this system." |  #error "I don't seem to have a 64-bit integer type on this system." | ||||||
| #endif | #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 int word; | ||||||
| typedef unsigned long dword; | typedef unsigned long dword; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Brian Cox
						Brian Cox