summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-09-23 14:48:14 +0000
committerJim Meyering <jim@meyering.net>2005-09-23 14:48:14 +0000
commit434de88614023963abe46c2ff5df05c2033600f1 (patch)
tree73afb5bab0251d8c43c859e817c03a0f9c044f96 /m4
parentee0d6b604c87532c2166c6d504212862dfa11a37 (diff)
downloadcoreutils-434de88614023963abe46c2ff5df05c2033600f1.tar.xz
from gnulib
Diffstat (limited to 'm4')
-rw-r--r--m4/socklen.m421
1 files changed, 21 insertions, 0 deletions
diff --git a/m4/socklen.m4 b/m4/socklen.m4
new file mode 100644
index 000000000..c26a2813a
--- /dev/null
+++ b/m4/socklen.m4
@@ -0,0 +1,21 @@
+# socklen.m4 serial 1
+dnl Copyright (C) 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Simon Josefsson.
+
+AC_DEFUN([gl_SOCKLEN_T],
+[
+ AC_CHECK_HEADERS_ONCE(sys/types.h sys/socket.h)
+ AC_CHECK_TYPE([socklen_t],, [AC_DEFINE([socklen_t], [int],
+ [Map `socklen_t' to `int' if it is missing.])], [
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif)
+])
+])