From 48a6564774f35e0c0b2ca55c73ccb26067396439 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 9 Oct 2011 15:08:47 +0200 Subject: [PATCH] Ensure that HAVE_* variables are set to 1 before they are set to 0. * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Require gl_DIRENT_H_DEFAULTS. * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Require gl_ARPA_INET_H_DEFAULTS. * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise. * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Require gl_SIGNAL_H_DEFAULTS. --- ChangeLog | 9 +++++++++ m4/fdopendir.m4 | 5 ++++- m4/inet_ntop.m4 | 4 +++- m4/inet_pton.m4 | 4 +++- m4/pthread_sigmask.m4 | 4 +++- 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9bbca90ff..be2b20bd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2011-10-09 Bruno Haible + Ensure that HAVE_* variables are set to 1 before they are set to 0. + * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Require gl_DIRENT_H_DEFAULTS. + * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Require gl_ARPA_INET_H_DEFAULTS. + * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise. + * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Require + gl_SIGNAL_H_DEFAULTS. + +2011-10-09 Bruno Haible + poll: Make macro safer. * m4/poll.m4 (gl_FUNC_POLL): Complain if, after invoking gl_POLL_H, ac_cv_header_poll_h is not set. diff --git a/m4/fdopendir.m4 b/m4/fdopendir.m4 index f0d8cfa67..3ac08b26d 100644 --- a/m4/fdopendir.m4 +++ b/m4/fdopendir.m4 @@ -1,4 +1,4 @@ -# serial 8 +# serial 9 # See if we need to provide fdopendir. dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. @@ -10,7 +10,10 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FDOPENDIR], [ + AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + dnl FreeBSD 7.3 has the function, but failed to declare it. AC_CHECK_DECLS([fdopendir], [], [HAVE_DECL_FDOPENDIR=0], [[ #include diff --git a/m4/inet_ntop.m4 b/m4/inet_ntop.m4 index 8291edd0a..4936fa382 100644 --- a/m4/inet_ntop.m4 +++ b/m4/inet_ntop.m4 @@ -1,4 +1,4 @@ -# inet_ntop.m4 serial 18 +# inet_ntop.m4 serial 19 dnl Copyright (C) 2005-2006, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,6 +6,8 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_INET_NTOP], [ + AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS]) + dnl Persuade Solaris to declare inet_ntop. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) diff --git a/m4/inet_pton.m4 b/m4/inet_pton.m4 index 807a4dd28..e64da7b01 100644 --- a/m4/inet_pton.m4 +++ b/m4/inet_pton.m4 @@ -1,4 +1,4 @@ -# inet_pton.m4 serial 16 +# inet_pton.m4 serial 17 dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,6 +6,8 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_INET_PTON], [ + AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS]) + dnl Persuade Solaris to declare inet_pton. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4 index f06bc119f..673914022 100644 --- a/m4/pthread_sigmask.m4 +++ b/m4/pthread_sigmask.m4 @@ -1,4 +1,4 @@ -# pthread_sigmask.m4 serial 12 +# pthread_sigmask.m4 serial 13 dnl Copyright (C) 2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,6 +6,8 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK], [ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([pthread_sigmask]) LIB_PTHREAD_SIGMASK= -- 2.11.0