summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--defines.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/defines.h b/defines.h
index c89f85a8d..0420a7e8e 100644
--- a/defines.h
+++ b/defines.h
@@ -328,6 +328,28 @@ typedef unsigned int size_t;
328#define SIZE_MAX SIZE_T_MAX 328#define SIZE_MAX SIZE_T_MAX
329#endif 329#endif
330 330
331#ifndef INT32_MAX
332# if (SIZEOF_INT == 4)
333# define INT32_MAX INT_MAX
334# elif (SIZEOF_LONG == 4)
335# define INT32_MAX LONG_MAX
336# else
337# error "need INT32_MAX"
338# endif
339#endif
340
341#ifndef INT64_MAX
342# if (SIZEOF_INT == 8)
343# define INT64_MAX INT_MAX
344# elif (SIZEOF_LONG == 8)
345# define INT64_MAX LONG_MAX
346# elif (SIZEOF_LONG_LONG_INT == 8)
347# define INT64_MAX LLONG_MAX
348# else
349# error "need INT64_MAX"
350# endif
351#endif
352
331#ifndef HAVE_SSIZE_T 353#ifndef HAVE_SSIZE_T
332typedef int ssize_t; 354typedef int ssize_t;
333# define HAVE_SSIZE_T 355# define HAVE_SSIZE_T