+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.
-# serial 13
+# serial 14
# See if we need to provide fdopendir.
dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
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>
# 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
-# serial 22
+# serial 23
# Copyright (C) 2000-2001, 2004-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
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])
-# 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,
[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
-# 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,
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])
])
-# 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,
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
-# 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,
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 {
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])
-# serial 12
+# serial 13
# See if we need to provide linkat replacement.
dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
[[#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
-# 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,
"C"
#endif
int getmntinfo (struct statfs **, int);
- ]], [])],
+ ]], [[]])],
[fu_cv_sys_mounted_getmntinfo2=no],
[fu_cv_sys_mounted_getmntinfo2=yes])
])
-# 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,
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])
])
-# 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,
[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.
-# 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,
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])
-# 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,
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"
-# 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,
#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])
])
-# wctype_h.m4 serial 24
+# wctype_h.m4 serial 25
dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
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"])
])