summaryrefslogtreecommitdiff
path: root/m4/socklen.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2018-10-12 02:42:44 +0200
committerBruno Haible <bruno@clisp.org>2018-10-12 10:05:27 +0200
commitfa3e2ad20d10d648cc74a5d320ce531a80ff7b1f (patch)
tree02eb6414fa54fb96a5b506a6db187c55e4fb68d1 /m4/socklen.m4
parent74c29c68bba3fe7c2f02eb3fc9f7ef196cec1bc6 (diff)
downloadgnulib-fa3e2ad20d10d648cc74a5d320ce531a80ff7b1f.tar.gz
Make better use of Autoconf.
* m4/environ.m4: Use AC_CACHE_CHECK where possible. * m4/manywarnings.m4: Likewise. * m4/manywarnings-c++.m4: Likewise. * m4/socklen.m4: Likewise. * m4/sockpfaf.m4: Likewise. * m4/stdarg.m4: Likewise. * m4/visibility.m4: Likewise. * m4/fsusage.m4: Use AC_CACHE_CHECK where possible. Modernize indentation. * m4/ls-mntd-fs.m4: Likewise.
Diffstat (limited to 'm4/socklen.m4')
-rw-r--r--m4/socklen.m415
1 files changed, 7 insertions, 8 deletions
diff --git a/m4/socklen.m4 b/m4/socklen.m4
index f2d996d0eb..fa79b07b6e 100644
--- a/m4/socklen.m4
+++ b/m4/socklen.m4
@@ -1,4 +1,4 @@
-# socklen.m4 serial 10
+# socklen.m4 serial 11
dnl Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -15,8 +15,8 @@ dnl So we have to test to find something that will work.
AC_DEFUN([gl_TYPE_SOCKLEN_T],
[AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])dnl
AC_CHECK_TYPE([socklen_t], ,
- [AC_MSG_CHECKING([for socklen_t equivalent])
- AC_CACHE_VAL([gl_cv_socklen_t_equiv],
+ [AC_CACHE_CHECK([for socklen_t equivalent],
+ [gl_cv_socklen_t_equiv],
[# Systems have either "struct sockaddr *" or
# "void *" as the second argument to getpeername
gl_cv_socklen_t_equiv=
@@ -34,11 +34,10 @@ AC_DEFUN([gl_TYPE_SOCKLEN_T],
done
test "$gl_cv_socklen_t_equiv" != "" && break
done
- ])
- if test "$gl_cv_socklen_t_equiv" = ""; then
- AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
- fi
- AC_MSG_RESULT([$gl_cv_socklen_t_equiv])
+ if test "$gl_cv_socklen_t_equiv" = ""; then
+ AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
+ fi
+ ])
AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv],
[type to use in place of socklen_t if not defined])],
[gl_SOCKET_HEADERS])])