]> Savannah Git Hosting - gnulib.git/commitdiff
Fix quoting of AC_LANG_PROGRAM arguments.
authorBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 10:28:42 +0000 (12:28 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 10:28:42 +0000 (12:28 +0200)
* m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Quote the AC_LANG_PROGRAM
arguments through [[...]].
* m4/fpending.m4 (gl_FUNC_FPENDING): Likewise.
* m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
* m4/fseeko.m4 (gl_FUNC_FSEEKO): Likewise.
* m4/ld-output-def.m4 (gl_LD_OUTPUT_DEF): Likewise.
* m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT): Likewise.
* m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
* m4/mountlist.m4 (gl_MOUNTLIST): Likewise.
* m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise.
* m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
* m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Likewise.
* m4/warnings.m4 (gl_COMPILER_OPTION_IF): Likewise.
* m4/wcstok.m4 (gl_FUNC_WCSTOK): Likewise.
* m4/wctype_h.m4 (gl_WCTYPE_H): Likewise.

15 files changed:
ChangeLog
m4/fdopendir.m4
m4/fpending.m4
m4/fpurge.m4
m4/fseeko.m4
m4/ld-output-def.m4
m4/ld-version-script.m4
m4/linkat.m4
m4/mountlist.m4
m4/sys_ioctl_h.m4
m4/ungetc.m4
m4/warn-on-use.m4
m4/warnings.m4
m4/wcstok.m4
m4/wctype_h.m4

index f2e8f8472acdb8f222e0606bd73632fcf9e70688..afad9b2b12b426d9a896d038aeb837e792e894d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2020-08-16  Bruno Haible  <bruno@clisp.org>
+
+       Fix quoting of AC_LANG_PROGRAM arguments.
+       * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Quote the AC_LANG_PROGRAM
+       arguments through [[...]].
+       * m4/fpending.m4 (gl_FUNC_FPENDING): Likewise.
+       * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
+       * m4/fseeko.m4 (gl_FUNC_FSEEKO): Likewise.
+       * m4/ld-output-def.m4 (gl_LD_OUTPUT_DEF): Likewise.
+       * m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT): Likewise.
+       * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
+       * m4/mountlist.m4 (gl_MOUNTLIST): Likewise.
+       * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise.
+       * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
+       * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Likewise.
+       * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Likewise.
+       * m4/wcstok.m4 (gl_FUNC_WCSTOK): Likewise.
+       * m4/wctype_h.m4 (gl_WCTYPE_H): Likewise.
+
 2020-08-16  Bruno Haible  <bruno@clisp.org>
 
        Assume autoconf >= 2.64.
index 454e9adf9811da256f886c5dd4c3c8d24293f278..9937a74ea8da3b23a7217336edd28e75d5cbb9a2 100644 (file)
@@ -1,4 +1,4 @@
-# serial 13
+# serial 14
 # See if we need to provide fdopendir.
 
 dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
@@ -25,7 +25,8 @@ AC_DEFUN([gl_FUNC_FDOPENDIR],
   else
     AC_CACHE_CHECK([whether fdopendir works],
       [gl_cv_func_fdopendir_works],
-      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+      [AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM([[
 #include <dirent.h>
 #include <fcntl.h>
 #include <unistd.h>
@@ -37,12 +38,14 @@ extern
 # endif
 DIR *fdopendir (int);
 #endif
-]], [int result = 0;
-     int fd = open ("conftest.c", O_RDONLY);
-     if (fd < 0) result |= 1;
-     if (fdopendir (fd)) result |= 2;
-     if (close (fd)) result |= 4;
-     return result;])],
+]],
+            [[int result = 0;
+              int fd = open ("conftest.c", O_RDONLY);
+              if (fd < 0) result |= 1;
+              if (fdopendir (fd)) result |= 2;
+              if (close (fd)) result |= 4;
+              return result;
+            ]])],
          [gl_cv_func_fdopendir_works=yes],
          [gl_cv_func_fdopendir_works=no],
          [case "$host_os" in
index ea9725e4890d6f904173f4da98f965c2a0acdcee..edabcec5f0be3bfc84e5e75c1197ac209a3b7ee8 100644 (file)
@@ -1,4 +1,4 @@
-# serial 22
+# serial 23
 
 # Copyright (C) 2000-2001, 2004-2020 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -25,7 +25,7 @@ AC_DEFUN([gl_FUNC_FPENDING],
   AC_CACHE_CHECK([for __fpending], [gl_cv_func___fpending],
     [
       AC_LINK_IFELSE(
-        [AC_LANG_PROGRAM([$fp_headers],
+        [AC_LANG_PROGRAM([[$fp_headers]],
            [[return ! __fpending (stdin);]])],
         [gl_cv_func___fpending=yes],
         [gl_cv_func___fpending=no])
index 890c3e7e05037cda431076e9aaba7e041aa09968..0796a6f0edda2ad8eea6f45bc9cfa989019c88fb 100644 (file)
@@ -1,4 +1,4 @@
-# fpurge.m4 serial 10
+# fpurge.m4 serial 11
 dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -19,36 +19,36 @@ AC_DEFUN([gl_FUNC_FPURGE],
          [AC_LANG_PROGRAM(
             [[#include <stdio.h>
 ]],
-            [FILE *f = fopen ("conftest.txt", "w+");
-             if (!f)
-               return 1;
-             if (fputc ('a', f) != 'a')
-               { fclose (f); return 2; }
-             rewind (f);
-             if (fgetc (f) != 'a')
-               { fclose (f); return 3; }
-             if (fgetc (f) != EOF)
-               { fclose (f); return 4; }
-             if (fpurge (f) != 0)
-               { fclose (f); return 5; }
-             if (putc ('b', f) != 'b')
-               { fclose (f); return 6; }
-             if (fclose (f) != 0)
-               return 7;
-             if ((f = fopen ("conftest.txt", "r")) == NULL)
-               return 8;
-             if (fgetc (f) != 'a')
-               { fclose (f); return 9; }
-             if (fgetc (f) != 'b')
-               { fclose (f); return 10; }
-             if (fgetc (f) != EOF)
-               { fclose (f); return 11; }
-             if (fclose (f) != 0)
-               return 12;
-             if (remove ("conftest.txt") != 0)
-               return 13;
-             return 0;
-            ])],
+            [[FILE *f = fopen ("conftest.txt", "w+");
+              if (!f)
+                return 1;
+              if (fputc ('a', f) != 'a')
+                { fclose (f); return 2; }
+              rewind (f);
+              if (fgetc (f) != 'a')
+                { fclose (f); return 3; }
+              if (fgetc (f) != EOF)
+                { fclose (f); return 4; }
+              if (fpurge (f) != 0)
+                { fclose (f); return 5; }
+              if (putc ('b', f) != 'b')
+                { fclose (f); return 6; }
+              if (fclose (f) != 0)
+                return 7;
+              if ((f = fopen ("conftest.txt", "r")) == NULL)
+                return 8;
+              if (fgetc (f) != 'a')
+                { fclose (f); return 9; }
+              if (fgetc (f) != 'b')
+                { fclose (f); return 10; }
+              if (fgetc (f) != EOF)
+                { fclose (f); return 11; }
+              if (fclose (f) != 0)
+                return 12;
+              if (remove ("conftest.txt") != 0)
+                return 13;
+              return 0;
+            ]])],
          [gl_cv_func_fpurge_works=yes],
          [gl_cv_func_fpurge_works=no],
          [case "$host_os" in
index 1a10515944465bc8898e6ed5e86e5a045253eee7..a64e64065954ffd3b2bcff5cf58e7314efde72eb 100644 (file)
@@ -1,4 +1,4 @@
-# fseeko.m4 serial 19
+# fseeko.m4 serial 20
 dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,7 @@ AC_DEFUN([gl_FUNC_FSEEKO],
   AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko],
     [
       AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
-]], [fseeko (stdin, 0, 0);])],
+]], [[fseeko (stdin, 0, 0);]])],
         [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no])
     ])
 
index 150788ab01b4f094fc5099cda11e842cab4bcb02..af80b4be7fcc41282da880b8e5db1d273d21ebc3 100644 (file)
@@ -1,4 +1,4 @@
-# ld-output-def.m4 serial 2
+# ld-output-def.m4 serial 3
 dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -19,7 +19,7 @@ AC_DEFUN([gl_LD_OUTPUT_DEF],
      else
        gl_ldflags_save=$LDFLAGS
        LDFLAGS="-Wl,--output-def,conftest.def"
-       AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
+       AC_LINK_IFELSE([AC_LANG_PROGRAM([[]])],
                    [gl_cv_ld_output_def=yes],
                    [gl_cv_ld_output_def=no])
        rm -f conftest.def
index 98366e93e51ccd83faebdd7a82f78556050049b8..c51c8130ac6413b9870ca350afbc5ff1ec6c2438 100644 (file)
@@ -1,4 +1,4 @@
-# ld-version-script.m4 serial 4
+# ld-version-script.m4 serial 5
 dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,7 @@ AC_DEFUN([gl_LD_VERSION_SCRIPT],
         save_LDFLAGS=$LDFLAGS
         LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
         echo foo >conftest.map
-        AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
           [],
           [cat > conftest.map <<EOF
 VERS_1 {
@@ -38,7 +38,7 @@ VERS_2 {
         global: sym;
 } VERS_1;
 EOF
-           AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+           AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
              [gl_cv_sys_ld_version_script=yes])])
         rm -f conftest.map
         LDFLAGS=$save_LDFLAGS])
index de1bf288b3577fb44e0fd990725e38a1cae941ef..e9b3d8266c66e30f091f21c11122b33a2892968e 100644 (file)
@@ -1,4 +1,4 @@
-# serial 12
+# serial 13
 # See if we need to provide linkat replacement.
 
 dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
@@ -32,9 +32,9 @@ AC_DEFUN([gl_FUNC_LINKAT],
                         [[#include <fcntl.h>
                           #include <unistd.h>
                         ]],
-                        [return linkat (AT_FDCWD, "conftest.l1", AT_FDCWD,
-                                            "conftest.l2", 0);
-                        ])],
+                        [[return linkat (AT_FDCWD, "conftest.l1", AT_FDCWD,
+                                         "conftest.l2", 0);
+                        ]])],
          [gl_cv_func_linkat_nofollow=yes],
          [gl_cv_func_linkat_nofollow=no],
          [case "$host_os" in
index 68276ff5a47a003637f1acde03d186215ab39b64..7756955ead06fd8ae4811f1cbe83ad05159b3db9 100644 (file)
@@ -1,4 +1,4 @@
-# serial 13
+# serial 14
 dnl Copyright (C) 2002-2006, 2009-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -244,7 +244,7 @@ extern
 "C"
 #endif
 int getmntinfo (struct statfs **, int);
-              ]], [])],
+              ]], [[]])],
            [fu_cv_sys_mounted_getmntinfo2=no],
            [fu_cv_sys_mounted_getmntinfo2=yes])
         ])
index cd2735e3062ec0c23e4e463d3f270236208431d5..98d24e8a39d363ab987332a8e4325f8e01e6538d 100644 (file)
@@ -1,4 +1,4 @@
-# sys_ioctl_h.m4 serial 11
+# sys_ioctl_h.m4 serial 12
 dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -23,7 +23,7 @@ AC_DEFUN([gl_SYS_IOCTL_H],
        AC_COMPILE_IFELSE(
          [AC_LANG_PROGRAM(
             [[#include <sys/ioctl.h>]],
-            [(void) ioctl;])],
+            [[(void) ioctl;]])],
          [gl_cv_decl_ioctl_in_sys_ioctl_h=yes],
          [gl_cv_decl_ioctl_in_sys_ioctl_h=no])
       ])
index 66492af6ee624971bdd26f3ef874fa69f8d34286..ce74706c139747699eaa75dd892fd557a5176637 100644 (file)
@@ -1,4 +1,4 @@
-# ungetc.m4 serial 8
+# ungetc.m4 serial 9
 dnl Copyright (C) 2009-2020 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,32 +13,33 @@ AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS],
     [gl_cv_func_ungetc_works],
     [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
 #include <stdio.h>
-      ]], [FILE *f;
-           if (!(f = fopen ("conftest.tmp", "w+")))
-             return 1;
-           if (fputs ("abc", f) < 0)
-             { fclose (f); return 2; }
-           rewind (f);
-           if (fgetc (f) != 'a')
-             { fclose (f); return 3; }
-           if (fgetc (f) != 'b')
-             { fclose (f); return 4; }
-           if (ungetc ('d', f) != 'd')
-             { fclose (f); return 5; }
-           if (ftell (f) != 1)
-             { fclose (f); return 6; }
-           if (fgetc (f) != 'd')
-             { fclose (f); return 7; }
-           if (ftell (f) != 2)
-             { fclose (f); return 8; }
-           if (fseek (f, 0, SEEK_CUR) != 0)
-             { fclose (f); return 9; }
-           if (ftell (f) != 2)
-             { fclose (f); return 10; }
-           if (fgetc (f) != 'c')
-             { fclose (f); return 11; }
-           fclose (f);
-           remove ("conftest.tmp");])],
+      ]], [[FILE *f;
+            if (!(f = fopen ("conftest.tmp", "w+")))
+              return 1;
+            if (fputs ("abc", f) < 0)
+              { fclose (f); return 2; }
+            rewind (f);
+            if (fgetc (f) != 'a')
+              { fclose (f); return 3; }
+            if (fgetc (f) != 'b')
+              { fclose (f); return 4; }
+            if (ungetc ('d', f) != 'd')
+              { fclose (f); return 5; }
+            if (ftell (f) != 1)
+              { fclose (f); return 6; }
+            if (fgetc (f) != 'd')
+              { fclose (f); return 7; }
+            if (ftell (f) != 2)
+              { fclose (f); return 8; }
+            if (fseek (f, 0, SEEK_CUR) != 0)
+              { fclose (f); return 9; }
+            if (ftell (f) != 2)
+              { fclose (f); return 10; }
+            if (fgetc (f) != 'c')
+              { fclose (f); return 11; }
+            fclose (f);
+            remove ("conftest.tmp");
+          ]])],
         [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no],
         [case "$host_os" in
                           # Guess yes on glibc systems.
index f36551c11080ae65c6cebd01e615f8a69bb6272c..3a692c710bb752758fa4901aa8f43033a17f4ec2 100644 (file)
@@ -1,4 +1,4 @@
-# warn-on-use.m4 serial 7
+# warn-on-use.m4 serial 8
 dnl Copyright (C) 2010-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -35,8 +35,8 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
        AC_CACHE_CHECK([whether $gl_func is declared without a macro],
          [gl_Symbol],
          [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1],
-[@%:@undef $gl_func
-  (void) $gl_func;])],
+[[@%:@undef $gl_func
+  (void) $gl_func;]])],
            [AS_VAR_SET([gl_Symbol], [yes])], [AS_VAR_SET([gl_Symbol], [no])])])
        AS_VAR_IF([gl_Symbol], [yes],
          [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
index e01dc6c8ee96e82c62d79271bd63574b7e214ba3..d4e4b0734531d657d33072c36218b4339fdc6d7e 100644 (file)
@@ -1,4 +1,4 @@
-# warnings.m4 serial 15
+# warnings.m4 serial 16
 dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -36,7 +36,7 @@ AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], [gl_Warn], [
   gl_save_compiler_FLAGS="$gl_Flags"
   gl_AS_VAR_APPEND(m4_defn([gl_Flags]),
     [" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["])
-  AC_LINK_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
+  AC_LINK_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([[]])])],
                  [AS_VAR_SET([gl_Warn], [yes])],
                  [AS_VAR_SET([gl_Warn], [no])])
   gl_Flags="$gl_save_compiler_FLAGS"
index f5f7f83306f6d619306c8ef0b4d46b68a3b0324c..d61d387397ac577df7aeb3fd5f07ab834699563c 100644 (file)
@@ -1,4 +1,4 @@
-# wcstok.m4 serial 4
+# wcstok.m4 serial 5
 dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -36,7 +36,7 @@ AC_DEFUN([gl_FUNC_WCSTOK],
 #include <wchar.h>
 wchar_t *wcstok (wchar_t *, const wchar_t *, wchar_t **);
 ]],
-                [])],
+                [[]])],
              [gl_cv_func_wcstok_posix_signature=yes],
              [gl_cv_func_wcstok_posix_signature=no])
           ])
index 5c844b60a97cda052b4a3e19250622f63867d589..a3cfc833fd3adce8bfbbade61ac7b1cac8063a87 100644 (file)
@@ -1,4 +1,4 @@
-# wctype_h.m4 serial 24
+# wctype_h.m4 serial 25
 
 dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
 
@@ -57,7 +57,7 @@ AC_DEFUN([gl_WCTYPE_H],
              AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
                           #if __GNU_LIBRARY__ == 1
                           Linux libc5 i18n is broken.
-                          #endif]], [])],
+                          #endif]], [[]])],
               [gl_cv_func_iswcntrl_works="guessing yes"],
               [gl_cv_func_iswcntrl_works="guessing no"])
             ])