about summary refs log tree commit diff
path: root/aczsh.m4
diff options
context:
space:
mode:
authorAndrey Borzenkov <bor@users.sourceforge.net>2001-06-19 06:59:24 +0000
committerAndrey Borzenkov <bor@users.sourceforge.net>2001-06-19 06:59:24 +0000
commit9b9e9401178190a75b03662416265993dea06f09 (patch)
tree97f8d48127c485c1dc4b9090646915b7096c3bec /aczsh.m4
parent7bac7b6f76334e83d017edf1801ef7a3df5a9aa9 (diff)
downloadzsh-9b9e9401178190a75b03662416265993dea06f09.tar.gz
zsh-9b9e9401178190a75b03662416265993dea06f09.tar.xz
zsh-9b9e9401178190a75b03662416265993dea06f09.zip
14973: fix for reported problems on AIX.
Diffstat (limited to 'aczsh.m4')
-rw-r--r--aczsh.m428
1 files changed, 28 insertions, 0 deletions
diff --git a/aczsh.m4 b/aczsh.m4
index 45334b6dc..d1419e21e 100644
--- a/aczsh.m4
+++ b/aczsh.m4
@@ -683,3 +683,31 @@ AC_DEFUN(zsh_COMPILE_FLAGS,
 	then LIBS="$4"
 	else LIBS="$enable_libs"
 	fi)])
+
+dnl 
+dnl zsh_CHECK_SOCKLEN_T
+dnl
+dnl	check type of third argument of some network functions; currently
+dnl	tested are size_t *, unsigned long *, int *.
+dnl
+AC_DEFUN([zsh_CHECK_SOCKLEN_T],[
+  AC_CACHE_CHECK(
+    [base type of the third argument to accept],
+    [zsh_cv_type_socklen_t],
+    [zsh_cv_type_socklen_t=
+    for zsh_type in int "unsigned long" size_t ; do
+      AC_TRY_COMPILE(
+        [#include <sys/types.h>
+         #include <sys/socket.h>],
+        [extern int accept (int, struct sockaddr *, $zsh_type *);],
+        [zsh_cv_type_socklen_t="$zsh_type"; break],
+        []
+      )
+    done
+    if test -z "$zsh_cv_type_socklen_t"; then
+      zsh_cv_type_socklen_t=int
+    fi]
+  )
+  AC_DEFINE_UNQUOTED([SOCKLEN_T], [$zsh_cv_type_socklen_t])]
+)
+