diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2004-08-02 05:20:05 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2004-08-02 05:20:05 +0000 |
commit | 90cfcabe9570779a66bd5c3d954eea6081f7e2b1 (patch) | |
tree | b47e3e37a1c5d3c7a19a1e4f610399bc7621b218 | |
parent | aa0a7d5865c74260009f373da4216c2c83866c77 (diff) | |
download | coreutils-90cfcabe9570779a66bd5c3d954eea6081f7e2b1.tar.xz |
Don't include <limits.h>. Include <inttypes.h> if available,
as it defines symbols like UINT32_MAX on Solaris 8.
(md5_uint32): Assume uint32_t exists; Autoconf will define it
otherwise (if the host has a 32-bit unsigned type, anyway).
-rw-r--r-- | lib/md5.h | 22 |
1 files changed, 3 insertions, 19 deletions
@@ -25,31 +25,15 @@ #define _MD5_H 1 #include <stdio.h> -#include <limits.h> - -/* The following contortions are an attempt to use the C preprocessor - to determine an unsigned integral type that is exactly 32 bits wide. */ +#if HAVE_INTTYPES_H +# include <inttypes.h> +#endif #if HAVE_STDINT_H || _LIBC # include <stdint.h> #endif -#ifdef UINT32_MAX typedef uint32_t md5_uint32; -#else -# define UINT_MAX_32_BITS 4294967295U -# if UINT_MAX == UINT_MAX_32_BITS - typedef unsigned int md5_uint32; -# elif USHRT_MAX == UINT_MAX_32_BITS - typedef unsigned short int md5_uint32; -# elif ULONG_MAX == UINT_MAX_32_BITS - typedef unsigned long md5_uint32; -# else - /* The following line is intended to evoke an error. - Using #error is not portable enough. */ - "Cannot determine unsigned 32-bit data type." -# endif -#endif /* Structure to save state of computation between the single steps. */ struct md5_ctx |