From 17e205070745e4712d40eed32d92d02edb47009f Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Sat, 1 Feb 2014 15:20:08 -0500 Subject: Assume and fixed-width types Make unconditional use of and fixed-width types such as uint32_t. k5-plugin.h doesn't use any special integer types, so remove the conditional include block there. Nothing uses INT64_FMT/UINT64_FMT, so leave those out of k5-platform.h for now. --- src/include/krb5/krb5.hin | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) (limited to 'src/include/krb5/krb5.hin') diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin index 8d7a650a2f..43b1f08c00 100644 --- a/src/include/krb5/krb5.hin +++ b/src/include/krb5/krb5.hin @@ -92,6 +92,7 @@ #include #include /* for *_MAX */ #include +#include #ifndef KRB5INT_BEGIN_DECLS #if defined(__cplusplus) @@ -129,30 +130,11 @@ struct _profile_t; * Word-size related definition. */ -typedef unsigned char krb5_octet; - -#if INT_MAX == 0x7fff -typedef int krb5_int16; -typedef unsigned int krb5_ui_2; -#elif SHRT_MAX == 0x7fff -typedef short krb5_int16; -typedef unsigned short krb5_ui_2; -#else -#error undefined 16 bit type -#endif - -#if INT_MAX == 0x7fffffffL -typedef int krb5_int32; -typedef unsigned int krb5_ui_4; -#elif LONG_MAX == 0x7fffffffL -typedef long krb5_int32; -typedef unsigned long krb5_ui_4; -#elif SHRT_MAX == 0x7fffffffL -typedef short krb5_int32; -typedef unsigned short krb5_ui_4; -#else -#error: undefined 32 bit type -#endif +typedef uint8_t krb5_octet; +typedef int16_t krb5_int16; +typedef uint16_t krb5_ui_2; +typedef int32_t krb5_int32; +typedef uint32_t krb5_ui_4; #define VALID_INT_BITS INT_MAX #define VALID_UINT_BITS UINT_MAX -- cgit