summaryrefslogtreecommitdiffstats
path: root/src/include/krb5/krb5.hin
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2014-02-01 15:20:08 -0500
committerGreg Hudson <ghudson@mit.edu>2014-02-26 16:15:19 -0500
commit17e205070745e4712d40eed32d92d02edb47009f (patch)
tree7b84dc2f536d8c73da8155a186fbbc23c3b88dc1 /src/include/krb5/krb5.hin
parent4c376a3776aed0fb19b761406eaa2e0516ff6735 (diff)
downloadkrb5-17e205070745e4712d40eed32d92d02edb47009f.tar.gz
krb5-17e205070745e4712d40eed32d92d02edb47009f.tar.xz
krb5-17e205070745e4712d40eed32d92d02edb47009f.zip
Assume <stdint.h> and fixed-width types
Make unconditional use of <stdint.h> 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.
Diffstat (limited to 'src/include/krb5/krb5.hin')
-rw-r--r--src/include/krb5/krb5.hin30
1 files changed, 6 insertions, 24 deletions
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 <stdlib.h>
#include <limits.h> /* for *_MAX */
#include <stdarg.h>
+#include <stdint.h>
#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