diff options
| author | Greg Hudson <ghudson@mit.edu> | 2014-02-01 15:20:08 -0500 |
|---|---|---|
| committer | Greg Hudson <ghudson@mit.edu> | 2014-02-26 16:15:19 -0500 |
| commit | 17e205070745e4712d40eed32d92d02edb47009f (patch) | |
| tree | 7b84dc2f536d8c73da8155a186fbbc23c3b88dc1 /src/include/gssrpc | |
| parent | 4c376a3776aed0fb19b761406eaa2e0516ff6735 (diff) | |
| download | krb5-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/gssrpc')
| -rw-r--r-- | src/include/gssrpc/types.hin | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/src/include/gssrpc/types.hin b/src/include/gssrpc/types.hin index 9d3301217d..022ab4fa90 100644 --- a/src/include/gssrpc/types.hin +++ b/src/include/gssrpc/types.hin @@ -55,16 +55,7 @@ #include <netinet/in.h> #include <stdlib.h> - -/* - * Pull in typedefs for fixed-width integers somehow, if they weren't - * in sys/types.h. - */ -@GSSRPC__STDINT_H@ -@GSSRPC__INTTYPES_H@ -/* Define if there is no uint32_t in system headers. */ -@GSSRPC__FAKE_UINT32@ - +#include <stdint.h> #include <limits.h> #ifndef GSSRPC__BEGIN_DECLS @@ -83,39 +74,6 @@ GSSRPC__BEGIN_DECLS #error "Bytes must be exactly 8 bits." #endif -/* - * If no uint32_t in system headers, fake it by looking for a 32-bit - * two's-complement type. Yes, this stomps on POSIX namespace, but if - * we get here, we're on a system that's far from being - * POSIX-compliant anyway. - */ -#if GSSRPC__FAKE_UINT32 -#if (UINT_MAX == 0xffffffffUL) && (INT_MAX == 0x7fffffffL) \ - && (INT_MIN == -INT_MAX-1) -typedef int int32_t; -typedef unsigned int uint32_t; -#else -#if (ULONG_MAX == 0xffffffffUL) && (LONG_MAX == 0x7fffffffL) \ - && (LONG_MIN == -LONG_MAX-1) -typedef long int32_t; -typedef unsigned long uint32_t; -#else -#if (USHRT_MAX == 0xffffffffUL) && (SHRT_MAX == 0x7fffffffL) \ - && (SHRT_MIN == -SHRT_MAX-1) -typedef short int32_t; -typedef unsigned short uint32_t; -#else -#error "Can't fake up uint32_t." -#endif -#endif -#endif -#endif /* GSSRPC__FAKE_UINT32 */ - -#if (LONG_MIN != -LONG_MAX-1) || (INT_MIN != -INT_MAX-1) \ - || (SHRT_MIN != -SHRT_MAX-1) -#error "Integer types must be two's-complement." -#endif - /* Define if we need to fake up some BSD type aliases. */ #ifndef GSSRPC__BSD_TYPEALIASES /* Allow application to override. */ @GSSRPC__BSD_TYPEALIASES@ |
