summaryrefslogtreecommitdiff
path: root/defines.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-09-23 14:12:24 +1100
committerDamien Miller <djm@mindrot.org>2000-09-23 14:12:24 +1100
commit578783e6bfb3cb81a63aa580f5641af010d73c72 (patch)
treef9b01fb303b71973abf07ed4be4b62188fc293cd /defines.h
parent9600233f0ff7a15c41da766da2f62b9e76565d71 (diff)
- (djm) Seperate tests for int64_t and u_int64_t types
Diffstat (limited to 'defines.h')
-rw-r--r--defines.h41
1 files changed, 23 insertions, 18 deletions
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;
123# else 123# else
124# error "32 bit int type not found." 124# error "32 bit int type not found."
125# endif 125# endif
126# if (SIZEOF_LONG_INT == 8)
127typedef long int int64_t;
128# else
129# if (SIZEOF_LONG_LONG_INT == 8)
130typedef long long int int64_t;
131# define HAVE_INTXX_T 1
132# else
133# error "64 bit int type not found."
134# endif
135# endif
136#endif 126#endif
137 127
138/* If sys/types.h does not supply u_intXX_t, supply them ourselves */ 128/* If sys/types.h does not supply u_intXX_t, supply them ourselves */
@@ -141,7 +131,6 @@ typedef long long int int64_t;
141typedef uint8_t u_int8_t; 131typedef uint8_t u_int8_t;
142typedef uint16_t u_int16_t; 132typedef uint16_t u_int16_t;
143typedef uint32_t u_int32_t; 133typedef uint32_t u_int32_t;
144typedef uint64_t u_int64_t;
145# define HAVE_U_INTXX_T 1 134# define HAVE_U_INTXX_T 1
146# else 135# else
147# if (SIZEOF_CHAR == 1) 136# if (SIZEOF_CHAR == 1)
@@ -159,15 +148,31 @@ typedef unsigned int u_int32_t;
159# else 148# else
160# error "32 bit int type not found." 149# error "32 bit int type not found."
161# endif 150# endif
162# if (SIZEOF_LONG_INT == 8) 151# endif
163typedef unsigned long int u_int64_t; 152#endif
153
154/* 64-bit types */
155#ifndef HAVE_INT64_T
156# if (SIZEOF_LONG_INT == 8)
157typedef long int int64_t;
158# else
159# if (SIZEOF_LONG_LONG_INT == 8)
160typedef long long int int64_t;
161# define HAVE_INTXX_T 1
164# else 162# else
165# if (SIZEOF_LONG_LONG_INT == 8) 163# error "64 bit int type not found."
164# endif
165# endif
166#endif
167#ifndef HAVE_U_INT64_T
168# if (SIZEOF_LONG_INT == 8)
169typedef unsigned long int u_int64_t;
170# else
171# if (SIZEOF_LONG_LONG_INT == 8)
166typedef unsigned long long int u_int64_t; 172typedef unsigned long long int u_int64_t;
167# define HAVE_U_INTXX_T 1 173# define HAVE_U_INTXX_T 1
168# else 174# else
169# error "64 bit int type not found." 175# error "64 bit int type not found."
170# endif
171# endif 176# endif
172# endif 177# endif
173#endif 178#endif