Hash :
85d1d48f
Author :
Date :
2020-08-16T12:28:42
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
# 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,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_WCSTOK],
[
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CHECK_FUNCS_ONCE([wcstok])
if test $ac_cv_func_wcstok = yes; then
dnl On HP-UX 11.31, it depends on the compiler and linker whether wcstok()
dnl uses hidden state, ignoring the third argument, and thus exhibits a
dnl bug when two or more wcstok() iteration loops are being performed in
dnl the same thread.
case "$host_os" in
hpux*)
REPLACE_WCSTOK=1
;;
*)
dnl POSIX: wchar_t *wcstok (wchar_t *, const wchar_t *, wchar_t **);
dnl mingw, MSVC: wchar_t *wcstok (wchar_t *, const wchar_t *);
AC_CACHE_CHECK([for wcstok with POSIX signature],
[gl_cv_func_wcstok_posix_signature],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
#include <stddef.h>
#include <stdio.h>
#include <time.h>
#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])
])
if test $gl_cv_func_wcstok_posix_signature = no; then
REPLACE_WCSTOK=1
fi
;;
esac
else
HAVE_WCSTOK=0
fi
])