summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-05-12 06:31:28 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-05-12 06:31:28 -0700
commitfffdf3f4287dd8636657969a7e39e5a544cdb885 (patch)
treee668b1bb05b91b44f5f10f6dcb6c9afa2a2802d2 /configure
parent45521a7f766a044dfd75f79b79a775791ba5b483 (diff)
downloadtxr-fffdf3f4287dd8636657969a7e39e5a544cdb885.tar.gz
txr-fffdf3f4287dd8636657969a7e39e5a544cdb885.tar.bz2
txr-fffdf3f4287dd8636657969a7e39e5a544cdb885.zip
ffi: darwin port: missing types.
* configure: detect clockid_t and loff_t, providing HAVE_CLOCKID_T and HAVE_LOFF_T config macros. * ffi.c (ffi_init_extra_types): Register clockid-t and loff-t types only if available.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure38
1 files changed, 38 insertions, 0 deletions
diff --git a/configure b/configure
index a59cdaf9..c9b26f23 100755
--- a/configure
+++ b/configure
@@ -2825,6 +2825,44 @@ else
printf "no\n"
fi
+printf "Checking for clockid_t ... "
+cat > conftest.c <<!
+#include <sys/types.h>
+
+int main(void)
+{
+ clockid_t cid = CLOCK_REALTIME;
+ return 0;
+}
+!
+
+if conftest ; then
+ printf "yes\n"
+ printf "#define HAVE_CLOCKID_T 1\n" >> config.h
+ have_sys_types=y
+else
+ printf "no\n"
+fi
+
+printf "Checking for loff_t ... "
+cat > conftest.c <<!
+#include <sys/types.h>
+
+int main(void)
+{
+ loff_t lo = 0;
+ return 0;
+}
+!
+
+if conftest ; then
+ printf "yes\n"
+ printf "#define HAVE_LOFF_T 1\n" >> config.h
+ have_sys_types=y
+else
+ printf "no\n"
+fi
+
#
# Dependent variables
#