summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-08-16 12:28:42 +0200
committerBruno Haible <bruno@clisp.org>2020-08-16 12:28:42 +0200
commit85d1d48f6fa89de6a5de9e7794bda3255f0f32aa (patch)
tree9e4af9f6f8e89caaa12050547c9e2485a5504c6e /m4
parent15ce5a630b02af7c7104650dfb18e443b4111564 (diff)
downloadgnulib-85d1d48f6fa89de6a5de9e7794bda3255f0f32aa.tar.gz
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.
Diffstat (limited to 'm4')
-rw-r--r--m4/fdopendir.m419
-rw-r--r--m4/fpending.m44
-rw-r--r--m4/fpurge.m462
-rw-r--r--m4/fseeko.m44
-rw-r--r--m4/ld-output-def.m44
-rw-r--r--m4/ld-version-script.m46
-rw-r--r--m4/linkat.m48
-rw-r--r--m4/mountlist.m44
-rw-r--r--m4/sys_ioctl_h.m44
-rw-r--r--m4/ungetc.m455
-rw-r--r--m4/warn-on-use.m46
-rw-r--r--m4/warnings.m44
-rw-r--r--m4/wcstok.m44
-rw-r--r--m4/wctype_h.m44
14 files changed, 96 insertions, 92 deletions
diff --git a/m4/fdopendir.m4 b/m4/fdopendir.m4
index 454e9adf98..9937a74ea8 100644
--- a/m4/fdopendir.m4
+++ b/m4/fdopendir.m4
@@ -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
diff --git a/m4/fpending.m4 b/m4/fpending.m4
index ea9725e489..edabcec5f0 100644
--- a/m4/fpending.m4
+++ b/m4/fpending.m4
@@ -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])
diff --git a/m4/fpurge.m4 b/m4/fpurge.m4
index 890c3e7e05..0796a6f0ed 100644
--- a/m4/fpurge.m4
+++ b/m4/fpurge.m4
@@ -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
diff --git a/m4/fseeko.m4 b/m4/fseeko.m4
index 1a10515944..a64e640659 100644
--- a/m4/fseeko.m4
+++ b/m4/fseeko.m4
@@ -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])
])
diff --git a/m4/ld-output-def.m4 b/m4/ld-output-def.m4
index 150788ab01..af80b4be7f 100644
--- a/m4/ld-output-def.m4
+++ b/m4/ld-output-def.m4
@@ -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
diff --git a/m4/ld-version-script.m4 b/m4/ld-version-script.m4
index 98366e93e5..c51c8130ac 100644
--- a/m4/ld-version-script.m4
+++ b/m4/ld-version-script.m4
@@ -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])
diff --git a/m4/linkat.m4 b/m4/linkat.m4
index de1bf288b3..e9b3d8266c 100644
--- a/m4/linkat.m4
+++ b/m4/linkat.m4
@@ -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
diff --git a/m4/mountlist.m4 b/m4/mountlist.m4
index 68276ff5a4..7756955ead 100644
--- a/m4/mountlist.m4
+++ b/m4/mountlist.m4
@@ -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])
])
diff --git a/m4/sys_ioctl_h.m4 b/m4/sys_ioctl_h.m4
index cd2735e306..98d24e8a39 100644
--- a/m4/sys_ioctl_h.m4
+++ b/m4/sys_ioctl_h.m4
@@ -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])
])
diff --git a/m4/ungetc.m4 b/m4/ungetc.m4
index 66492af6ee..ce74706c13 100644
--- a/m4/ungetc.m4
+++ b/m4/ungetc.m4
@@ -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.
diff --git a/m4/warn-on-use.m4 b/m4/warn-on-use.m4
index f36551c110..3a692c710b 100644
--- a/m4/warn-on-use.m4
+++ b/m4/warn-on-use.m4
@@ -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])
diff --git a/m4/warnings.m4 b/m4/warnings.m4
index e01dc6c8ee..d4e4b07345 100644
--- a/m4/warnings.m4
+++ b/m4/warnings.m4
@@ -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"
diff --git a/m4/wcstok.m4 b/m4/wcstok.m4
index f5f7f83306..d61d387397 100644
--- a/m4/wcstok.m4
+++ b/m4/wcstok.m4
@@ -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])
])
diff --git a/m4/wctype_h.m4 b/m4/wctype_h.m4
index 5c844b60a9..a3cfc833fd 100644
--- a/m4/wctype_h.m4
+++ b/m4/wctype_h.m4
@@ -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"])
])