aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/CMakeLists.txt1
-rw-r--r--config/config.h.in6
2 files changed, 7 insertions, 0 deletions
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt
index b94c3f9f07..747ed175ac 100644
--- a/config/CMakeLists.txt
+++ b/config/CMakeLists.txt
@@ -5,6 +5,7 @@ check_type_size("int" SIZEOF_INT)
check_type_size("long" SIZEOF_LONG)
check_type_size("time_t" SIZEOF_TIME_T)
check_type_size("off_t" SIZEOF_OFF_T)
+check_type_size("void *" SIZEOF_VOID_PTR)
check_symbol_exists(_NSGetEnviron crt_externs.h HAVE__NSGETENVIRON)
diff --git a/config/config.h.in b/config/config.h.in
index ae3b473d1d..95d0d3cf68 100644
--- a/config/config.h.in
+++ b/config/config.h.in
@@ -11,6 +11,12 @@
#define SIZEOF_TIME_T @SIZEOF_TIME_T@
#define SIZEOF_OFF_T @SIZEOF_OFF_T@
+#if @SIZEOF_VOID_PTR@ == 8
+#define ARCH_64
+#elif @SIZEOF_VOID_PTR@ == 4
+#define ARCH_32
+#endif
+
#define _FILE_OFFSET_BITS 64
#cmakedefine HAVE__NSGETENVIRON
#cmakedefine HAVE_CRT_EXTERNS_H