From 578783e6bfb3cb81a63aa580f5641af010d73c72 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 23 Sep 2000 14:12:24 +1100 Subject: - (djm) Seperate tests for int64_t and u_int64_t types --- defines.h | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'defines.h') diff --git a/defines.h b/defines.h index 0ac3e96b2..cf2a34291 100644 --- a/defines.h +++ b/defines.h @@ -123,16 +123,6 @@ typedef int int32_t; # else # error "32 bit int type not found." # endif -# if (SIZEOF_LONG_INT == 8) -typedef long int int64_t; -# else -# if (SIZEOF_LONG_LONG_INT == 8) -typedef long long int int64_t; -# define HAVE_INTXX_T 1 -# else -# error "64 bit int type not found." -# endif -# endif #endif /* If sys/types.h does not supply u_intXX_t, supply them ourselves */ @@ -141,7 +131,6 @@ typedef long long int int64_t; typedef uint8_t u_int8_t; typedef uint16_t u_int16_t; typedef uint32_t u_int32_t; -typedef uint64_t u_int64_t; # define HAVE_U_INTXX_T 1 # else # if (SIZEOF_CHAR == 1) @@ -159,15 +148,31 @@ typedef unsigned int u_int32_t; # else # error "32 bit int type not found." # endif -# if (SIZEOF_LONG_INT == 8) -typedef unsigned long int u_int64_t; +# endif +#endif + +/* 64-bit types */ +#ifndef HAVE_INT64_T +# if (SIZEOF_LONG_INT == 8) +typedef long int int64_t; +# else +# if (SIZEOF_LONG_LONG_INT == 8) +typedef long long int int64_t; +# define HAVE_INTXX_T 1 # else -# if (SIZEOF_LONG_LONG_INT == 8) +# error "64 bit int type not found." +# endif +# endif +#endif +#ifndef HAVE_U_INT64_T +# if (SIZEOF_LONG_INT == 8) +typedef unsigned long int u_int64_t; +# else +# if (SIZEOF_LONG_LONG_INT == 8) typedef unsigned long long int u_int64_t; -# define HAVE_U_INTXX_T 1 -# else -# error "64 bit int type not found." -# endif +# define HAVE_U_INTXX_T 1 +# else +# error "64 bit int type not found." # endif # endif #endif -- cgit v1.2.3