aboutsummaryrefslogtreecommitdiffhomepage
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/ax_ptrdiff_aliases_int.m416
1 files changed, 16 insertions, 0 deletions
diff --git a/m4/ax_ptrdiff_aliases_int.m4 b/m4/ax_ptrdiff_aliases_int.m4
new file mode 100644
index 0000000..f7175cd
--- /dev/null
+++ b/m4/ax_ptrdiff_aliases_int.m4
@@ -0,0 +1,16 @@
+
+AC_DEFUN([AX_PTRDIFF_ALIASES_INT], [
+ AC_CACHE_CHECK([whether ptrdiff_t aliases int], [ax_cv_ptrdiff_aliases_int], [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ @%:@include <stddef.h>
+ ]], [[
+ int a = 23;
+ ptrdiff_t *b = &a;
+ ]])],
+ [ax_cv_ptrdiff_aliases_int=yes],
+ [ax_cv_ptrdiff_aliases_int=no])
+ ])
+ AS_IF([test "x$ax_cv_ptrdiff_aliases_int" = "xyes"], [
+ AC_DEFINE([PTRDIFF_ALIASES_INT], [1], [Whether ptrdiff_t aliases int])
+ ])
+])dnl