bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

more systematic m4 quoting


From: Bruno Haible
Subject: more systematic m4 quoting
Date: Tue, 11 Jul 2017 13:57:54 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-83-generic; KDE/5.18.0; x86_64; ; )

When going through all AC_RUN_IFELSE invocations, I noticed some places
without systematic m4 quoting (like we used to do in the first years of
autoconf) or misleading indentation.

When people complain about the GNU Build System, one of the arguments is
the steep learning curve of understanding a .m4 file which consists of
a mix of 3 languages: m4 macros, autoconf macros, and shell scripts.
The confusion is bigger when the various levels of m4 expansion are not
properly delimited. Therefore I think systematic quoting is primarily
good to clarify the boundaries of snippets in the 3 languages. Even in
cases where we "know" that an additional m4 expansion will cause no harm.


2017-07-11  Bruno Haible  <address@hidden>

        More systematic m4 quoting and indentation.
        * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Quote systematically.
        * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
        * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
        * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
        * m4/host-os.m4 (gl_HOST_OS): Likewise.
        * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H,
        gl_WINSIZE_IN_PTEM): Likewise.
        * m4/mbrtowc.m4 (AC_FUNC_MBRTOWC): Likewise.
        * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Likewise.
        * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise.
        * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Quote systematically.
        Correct indentation.
        * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
        * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
        * m4/jm-winsz2.m4 (gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Likewise.
        * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
        * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
        * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.

diff --git a/m4/chdir-long.m4 b/m4/chdir-long.m4
index c7363c6..c4c07b5 100644
--- a/m4/chdir-long.m4
+++ b/m4/chdir-long.m4
@@ -1,4 +1,4 @@
-#serial 15
+#serial 16
 
 # Use Gnulib's robust chdir function.
 # It can handle arbitrarily long directory names, which means
@@ -17,14 +17,14 @@ AC_DEFUN([gl_FUNC_CHDIR_LONG],
 [
   AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ])
   AC_CACHE_CHECK([whether this system has an arbitrary file name length limit],
-    gl_cv_have_arbitrary_file_name_length_limit,
+    [gl_cv_have_arbitrary_file_name_length_limit],
     [AC_EGREP_CPP([have_arbitrary_file_name_length_limit],
                   gl_PATHMAX_SNIPPET[
 #ifdef PATH_MAX
 have_arbitrary_file_name_length_limit
 #endif],
-    gl_cv_have_arbitrary_file_name_length_limit=yes,
-    gl_cv_have_arbitrary_file_name_length_limit=no)])
+    [gl_cv_have_arbitrary_file_name_length_limit=yes],
+    [gl_cv_have_arbitrary_file_name_length_limit=no])])
 ])
 
 AC_DEFUN([gl_PREREQ_CHDIR_LONG], [:])
diff --git a/m4/d-ino.m4 b/m4/d-ino.m4
index 65cd4d8..fa599ed 100644
--- a/m4/d-ino.m4
+++ b/m4/d-ino.m4
@@ -1,4 +1,4 @@
-# serial 16
+# serial 17
 
 dnl From Jim Meyering.
 dnl
@@ -15,7 +15,7 @@ dnl
 AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO],
   [AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
    AC_CACHE_CHECK([for d_ino member in directory struct],
-                  gl_cv_struct_dirent_d_ino,
+                  [gl_cv_struct_dirent_d_ino],
      [AC_RUN_IFELSE(
         [AC_LANG_PROGRAM(
            [[#include <sys/types.h>
diff --git a/m4/d-type.m4 b/m4/d-type.m4
index 64457c8..c819fc0 100644
--- a/m4/d-type.m4
+++ b/m4/d-type.m4
@@ -1,4 +1,4 @@
-# serial 11
+# serial 12
 
 dnl From Jim Meyering.
 dnl
@@ -13,7 +13,7 @@ dnl
 
 AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE],
   [AC_CACHE_CHECK([for d_type member in directory struct],
-                  gl_cv_struct_dirent_d_type,
+                  [gl_cv_struct_dirent_d_type],
      [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
 #include <dirent.h>
diff --git a/m4/dirfd.m4 b/m4/dirfd.m4
index 86c1cb3..d472c38 100644
--- a/m4/dirfd.m4
+++ b/m4/dirfd.m4
@@ -1,4 +1,4 @@
-# serial 25   -*- Autoconf -*-
+# serial 26   -*- Autoconf -*-
 
 dnl Find out how to get the file descriptor associated with an open DIR*.
 
@@ -26,15 +26,15 @@ AC_DEFUN([gl_FUNC_DIRFD],
   fi
 
   AC_CACHE_CHECK([whether dirfd is a macro],
-    gl_cv_func_dirfd_macro,
+    [gl_cv_func_dirfd_macro],
     [AC_EGREP_CPP([dirent_header_defines_dirfd], [
 #include <sys/types.h>
 #include <dirent.h>
 #ifdef dirfd
  dirent_header_defines_dirfd
 #endif],
-       gl_cv_func_dirfd_macro=yes,
-       gl_cv_func_dirfd_macro=no)])
+       [gl_cv_func_dirfd_macro=yes],
+       [gl_cv_func_dirfd_macro=no])])
 
   # Use the replacement if we have no function or macro with that name,
   # or if OS/2 kLIBC whose dirfd() does not work.
diff --git a/m4/fchownat.m4 b/m4/fchownat.m4
index 32b01f5..58eee3b 100644
--- a/m4/fchownat.m4
+++ b/m4/fchownat.m4
@@ -1,4 +1,4 @@
-# fchownat.m4 serial 1
+# fchownat.m4 serial 2
 dnl Copyright (C) 2004-2017 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -43,7 +43,7 @@ AC_DEFUN([gl_FUNC_FCHOWNAT_DEREF_BUG],
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
   AC_CACHE_CHECK([whether fchownat works with AT_SYMLINK_NOFOLLOW],
-    gl_cv_func_fchownat_nofollow_works,
+    [gl_cv_func_fchownat_nofollow_works],
     [
      gl_dangle=conftest.dangle
      # Remove any remnants of a previous test.
@@ -67,10 +67,9 @@ main ()
           && errno == ENOENT);
 }
           ]])],
-    [gl_cv_func_fchownat_nofollow_works=yes],
-    [gl_cv_func_fchownat_nofollow_works=no],
-    [gl_cv_func_fchownat_nofollow_works=no],
-    )
+       [gl_cv_func_fchownat_nofollow_works=yes],
+       [gl_cv_func_fchownat_nofollow_works=no],
+       [gl_cv_func_fchownat_nofollow_works=no])
   ])
   AS_IF([test $gl_cv_func_fchownat_nofollow_works = no], [$1], [$2])
 ])
diff --git a/m4/getcwd-abort-bug.m4 b/m4/getcwd-abort-bug.m4
index 84ecf85..b16bb5a 100644
--- a/m4/getcwd-abort-bug.m4
+++ b/m4/getcwd-abort-bug.m4
@@ -1,4 +1,4 @@
-# serial 7
+# serial 8
 # Determine whether getcwd aborts when the length of the working directory
 # name is unusually large.  Any length between 4k and 16k trigger the bug
 # when using glibc-2.4.90-9 or older.
@@ -18,7 +18,7 @@ AC_DEFUN([gl_FUNC_GETCWD_ABORT_BUG],
   AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ])
   AC_CHECK_FUNCS([getpagesize])
   AC_CACHE_CHECK([whether getcwd aborts when 4k < cwd_length < 16k],
-    gl_cv_func_getcwd_abort_bug,
+    [gl_cv_func_getcwd_abort_bug],
     [# Remove any remnants of a previous test.
      rm -rf confdir-14B---
      # Arrange for deletion of the temporary directory this test creates.
@@ -121,20 +121,20 @@ main ()
   return fail;
 }
           ]])],
-    [gl_cv_func_getcwd_abort_bug=no],
-    [dnl An abort will provoke an exit code of something like 134 (128 + 6).
-     dnl An exit code of 4 can also occur (in OpenBSD 4.9, NetBSD 5.1 for
-     dnl example): getcwd (NULL, 0) fails rather than returning a string
-     dnl longer than PATH_MAX.  This may be POSIX compliant (in some
-     dnl interpretations of POSIX).  But gnulib's getcwd module wants to
-     dnl provide a non-NULL value in this case.
-     ret=$?
-     if test $ret -ge 128 || test $ret = 4; then
-       gl_cv_func_getcwd_abort_bug=yes
-     else
-       gl_cv_func_getcwd_abort_bug=no
-     fi],
-    [gl_cv_func_getcwd_abort_bug=yes])
-  ])
+       [gl_cv_func_getcwd_abort_bug=no],
+       [dnl An abort will provoke an exit code of something like 134 (128 + 6).
+        dnl An exit code of 4 can also occur (in OpenBSD 4.9, NetBSD 5.1 for
+        dnl example): getcwd (NULL, 0) fails rather than returning a string
+        dnl longer than PATH_MAX.  This may be POSIX compliant (in some
+        dnl interpretations of POSIX).  But gnulib's getcwd module wants to
+        dnl provide a non-NULL value in this case.
+        ret=$?
+        if test $ret -ge 128 || test $ret = 4; then
+          gl_cv_func_getcwd_abort_bug=yes
+        else
+          gl_cv_func_getcwd_abort_bug=no
+        fi],
+       [gl_cv_func_getcwd_abort_bug=yes])
+    ])
   AS_IF([test $gl_cv_func_getcwd_abort_bug = yes], [$1], [$2])
 ])
diff --git a/m4/getcwd-path-max.m4 b/m4/getcwd-path-max.m4
index 6d58d69..71e7cd0 100644
--- a/m4/getcwd-path-max.m4
+++ b/m4/getcwd-path-max.m4
@@ -1,4 +1,4 @@
-# serial 19
+# serial 20
 # Check for several getcwd bugs with long file names.
 # If so, arrange to compile the wrapper function.
 
@@ -21,7 +21,7 @@ AC_DEFUN([gl_FUNC_GETCWD_PATH_MAX],
   AC_CHECK_HEADERS_ONCE([unistd.h])
   AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ])
   AC_CACHE_CHECK([whether getcwd handles long file names properly],
-    gl_cv_func_getcwd_path_max,
+    [gl_cv_func_getcwd_path_max],
     [# Arrange for deletion of the temporary directory this test creates.
      ac_clean_files="$ac_clean_files confdir3"
      dnl Please keep this in sync with tests/test-getcwd.c.
@@ -202,16 +202,16 @@ main ()
 #endif
 }
           ]])],
-    [gl_cv_func_getcwd_path_max=yes],
-    [case $? in
-     10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
-     31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
-     32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
-     *) gl_cv_func_getcwd_path_max=no;;
-     esac],
-    [case "$host_os" in
-       aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
-       *) gl_cv_func_getcwd_path_max=no;;
-     esac])
-  ])
+       [gl_cv_func_getcwd_path_max=yes],
+       [case $? in
+        10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
+        31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
+        32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
+        *) gl_cv_func_getcwd_path_max=no;;
+        esac],
+       [case "$host_os" in
+          aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
+          *) gl_cv_func_getcwd_path_max=no;;
+        esac])
+    ])
 ])
diff --git a/m4/host-os.m4 b/m4/host-os.m4
index 9bce9a8..0f1a104 100644
--- a/m4/host-os.m4
+++ b/m4/host-os.m4
@@ -1,4 +1,4 @@
-# serial 9
+# serial 10
 
 # Copyright (C) 2001, 2003-2004, 2006, 2009-2017 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -14,7 +14,7 @@ AC_DEFUN([gl_HOST_OS],
 [
   AC_REQUIRE([AC_CANONICAL_HOST])dnl
   AC_CACHE_CHECK([host operating system],
-    gl_cv_host_operating_system,
+    [gl_cv_host_operating_system],
 
     [[case $host_os in
 
diff --git a/m4/jm-winsz1.m4 b/m4/jm-winsz1.m4
index daee16a..cad70a1 100644
--- a/m4/jm-winsz1.m4
+++ b/m4/jm-winsz1.m4
@@ -1,4 +1,4 @@
-# serial 11
+# serial 12
 
 # Copyright (C) 1996, 1999, 2001-2002, 2004, 2006, 2009-2017 Free Software
 # Foundation, Inc.
@@ -10,7 +10,7 @@ dnl From Jim Meyering and Paul Eggert.
 AC_DEFUN([gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H],
 [AC_REQUIRE([AC_SYS_POSIX_TERMIOS])
  AC_CACHE_CHECK([whether use of TIOCGWINSZ requires termios.h],
-                gl_cv_sys_tiocgwinsz_needs_termios_h,
+                [gl_cv_sys_tiocgwinsz_needs_termios_h],
   [gl_cv_sys_tiocgwinsz_needs_termios_h=no
 
    if test $ac_cv_sys_posix_termios = yes; then
@@ -20,15 +20,16 @@ AC_DEFUN([gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H],
 #      ifdef TIOCGWINSZ
          yes
 #      endif
-     ], gl_cv_sys_tiocgwinsz_needs_termios_h=yes)
+     ], [gl_cv_sys_tiocgwinsz_needs_termios_h=yes])
    fi
   ])
 ])
 
 AC_DEFUN([gl_WINSIZE_IN_PTEM],
-  [AC_REQUIRE([AC_SYS_POSIX_TERMIOS])
+[
+   AC_REQUIRE([AC_SYS_POSIX_TERMIOS])
    AC_CACHE_CHECK([whether use of struct winsize requires sys/ptem.h],
-     gl_cv_sys_struct_winsize_needs_sys_ptem_h,
+     [gl_cv_sys_struct_winsize_needs_sys_ptem_h],
      [gl_cv_sys_struct_winsize_needs_sys_ptem_h=yes
       if test $ac_cv_sys_posix_termios = yes; then
         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <termios.h>]],
@@ -45,4 +46,5 @@ AC_DEFUN([gl_WINSIZE_IN_PTEM],
    if test $gl_cv_sys_struct_winsize_needs_sys_ptem_h = yes; then
      AC_DEFINE([WINSIZE_IN_PTEM], [1],
        [Define if sys/ptem.h is required for struct winsize.])
-   fi])
+   fi
+])
diff --git a/m4/jm-winsz2.m4 b/m4/jm-winsz2.m4
index cc1ba9f..ebf2d60 100644
--- a/m4/jm-winsz2.m4
+++ b/m4/jm-winsz2.m4
@@ -1,4 +1,4 @@
-# serial 7
+# serial 8
 
 # Copyright (C) 1996, 1999, 2001, 2004, 2009-2017 Free Software Foundation,
 # Inc.
@@ -9,18 +9,18 @@
 AC_DEFUN([gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL],
 [AC_REQUIRE([gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H])
  AC_CACHE_CHECK([whether use of TIOCGWINSZ requires sys/ioctl.h],
-                gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h,
+                [gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h],
   [gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
 
-  if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no; then
-    AC_EGREP_CPP([yes],
-    [#include <sys/types.h>
-#     include <sys/ioctl.h>
-#     ifdef TIOCGWINSZ
-        yes
-#     endif
-    ], gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes)
-  fi
+   if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no; then
+     AC_EGREP_CPP([yes],
+       [#include <sys/types.h>
+#        include <sys/ioctl.h>
+#        ifdef TIOCGWINSZ
+           yes
+#        endif
+       ], [gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes])
+   fi
   ])
   if test $gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
     AC_DEFINE([GWINSZ_IN_SYS_IOCTL], [1],
diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4
index 536183f..4982b4b 100644
--- a/m4/mbrtowc.m4
+++ b/m4/mbrtowc.m4
@@ -1,4 +1,4 @@
-# mbrtowc.m4 serial 27  -*- coding: utf-8 -*-
+# mbrtowc.m4 serial 28  -*- coding: utf-8 -*-
 dnl Copyright (C) 2001-2002, 2004-2005, 2008-2017 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -639,7 +639,7 @@ AC_DEFUN([AC_FUNC_MBRTOWC],
 [
   dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60.
   AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
-    gl_cv_func_mbrtowc,
+    [gl_cv_func_mbrtowc],
     [AC_LINK_IFELSE(
        [AC_LANG_PROGRAM(
             [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
@@ -655,8 +655,8 @@ AC_DEFUN([AC_FUNC_MBRTOWC],
               size_t n = 1;
               mbstate_t state;
               return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])],
-       gl_cv_func_mbrtowc=yes,
-       gl_cv_func_mbrtowc=no)])
+       [gl_cv_func_mbrtowc=yes],
+       [gl_cv_func_mbrtowc=no])])
   if test $gl_cv_func_mbrtowc = yes; then
     AC_DEFINE([HAVE_MBRTOWC], [1],
       [Define to 1 if mbrtowc and mbstate_t are properly declared.])
diff --git a/m4/physmem.m4 b/m4/physmem.m4
index 38b86bc..2851a63 100644
--- a/m4/physmem.m4
+++ b/m4/physmem.m4
@@ -1,4 +1,4 @@
-# physmem.m4 serial 11
+# physmem.m4 serial 12
 dnl Copyright (C) 2002-2003, 2005-2006, 2008-2017 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -9,7 +9,7 @@ dnl with or without modifications, as long as this notice is 
preserved.
 # a struct with member 'physmem'.
 AC_DEFUN([gl_SYS__SYSTEM_CONFIGURATION],
   [AC_CACHE_CHECK([for external symbol _system_configuration],
-                  gl_cv_var__system_configuration,
+                  [gl_cv_var__system_configuration],
     [AC_LINK_IFELSE([AC_LANG_PROGRAM(
                       [[#include <sys/systemcfg.h>
                       ]],
diff --git a/m4/pselect.m4 b/m4/pselect.m4
index ea925cb..eb1ad11 100644
--- a/m4/pselect.m4
+++ b/m4/pselect.m4
@@ -1,4 +1,4 @@
-# pselect.m4 serial 3
+# pselect.m4 serial 4
 dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_PSELECT],
 
   if test $ac_cv_func_pselect = yes; then
     AC_CACHE_CHECK([whether signature of pselect conforms to POSIX],
-      gl_cv_sig_pselect,
+      [gl_cv_sig_pselect],
       [AC_LINK_IFELSE(
          [AC_LANG_PROGRAM(
               [[#include <sys/select.h>
diff --git a/m4/rmdir-errno.m4 b/m4/rmdir-errno.m4
index a389329..65fb8a8 100644
--- a/m4/rmdir-errno.m4
+++ b/m4/rmdir-errno.m4
@@ -1,4 +1,4 @@
-# serial 11
+# serial 12
 
 # Copyright (C) 2000-2001, 2005-2006, 2009-2017 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -14,7 +14,7 @@ AC_DEFUN([gl_FUNC_RMDIR_NOTEMPTY],
 [dnl
   AC_CHECK_HEADERS_ONCE([unistd.h])
   AC_CACHE_CHECK([for rmdir-not-empty errno value],
-    gl_cv_func_rmdir_errno_not_empty,
+    [gl_cv_func_rmdir_errno_not_empty],
     [
       # Arrange for deletion of the temporary directory this test creates.
       ac_clean_files="$ac_clean_files confdir2"
@@ -37,10 +37,9 @@ AC_DEFUN([gl_FUNC_RMDIR_NOTEMPTY],
           return 0;
         }
         ]])],
-      [gl_cv_func_rmdir_errno_not_empty=`cat confdir2/errno`],
-      [gl_cv_func_rmdir_errno_not_empty='configure error in rmdir-errno.m4'],
-      [gl_cv_func_rmdir_errno_not_empty=ENOTEMPTY]
-      )
+        [gl_cv_func_rmdir_errno_not_empty=`cat confdir2/errno`],
+        [gl_cv_func_rmdir_errno_not_empty='configure error in rmdir-errno.m4'],
+        [gl_cv_func_rmdir_errno_not_empty=ENOTEMPTY])
     ]
   )
 
diff --git a/m4/tzset.m4 b/m4/tzset.m4
index 08362fe..f8f7736 100644
--- a/m4/tzset.m4
+++ b/m4/tzset.m4
@@ -1,4 +1,4 @@
-# serial 8
+# serial 9
 
 # Copyright (C) 2003, 2007, 2009-2017 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -42,9 +42,8 @@ AC_DEFUN([gl_FUNC_TZSET_CLOBBER],
 [
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([whether tzset clobbers localtime buffer],
-                 gl_cv_func_tzset_clobber,
-  [
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[
+                 [gl_cv_func_tzset_clobber],
+    [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <time.h>
 #include <stdlib.h>
 
@@ -74,7 +73,8 @@ main ()
                   # If we don't know, assume the worst.
           *)      gl_cv_func_tzset_clobber="guessing yes" ;;
         esac
-       ])])
+       ])
+    ])
 
   AC_DEFINE([HAVE_RUN_TZSET_TEST], [1],
     [Define to 1 if you have run the test for working tzset.])
diff --git a/m4/unlink-busy.m4 b/m4/unlink-busy.m4
index a6498a6..331ac7a 100644
--- a/m4/unlink-busy.m4
+++ b/m4/unlink-busy.m4
@@ -1,4 +1,4 @@
-#serial 12
+#serial 13
 
 dnl From J. David Anglin.
 
@@ -12,7 +12,7 @@ dnl HPUX and other systems can't unlink shared text that is 
being executed.
 AC_DEFUN([gl_FUNC_UNLINK_BUSY_TEXT],
 [dnl
   AC_CACHE_CHECK([whether a running program can be unlinked],
-    gl_cv_func_unlink_busy_text,
+    [gl_cv_func_unlink_busy_text],
     [
       AC_RUN_IFELSE(
         [AC_LANG_SOURCE(
@@ -27,9 +27,9 @@ AC_DEFUN([gl_FUNC_UNLINK_BUSY_TEXT],
                 result |= 2;
               return result;
             }]])],
-      gl_cv_func_unlink_busy_text=yes,
-      gl_cv_func_unlink_busy_text=no,
-      gl_cv_func_unlink_busy_text=no
+        [gl_cv_func_unlink_busy_text=yes],
+        [gl_cv_func_unlink_busy_text=no],
+        [gl_cv_func_unlink_busy_text=no]
       )
     ]
   )




reply via email to

[Prev in Thread] Current Thread [Next in Thread]