* lib/stddef.in.h (wchar_t): Remove fallback definition.
* m4/stddef_h.m4 (gl_STDDEF_H): Don't require gt_TYPE_WCHAR_T. Assume
gt_cv_c_wchar_t is 'yes'.
(gl_STDDEF_H_DEFAULTS): Don't initialize HAVE_WCHAR_T.
* modules/stddef (Files): Remove m4/wchar_t.m4.
(Makefile.am): Don't substitute HAVE_WCHAR_T.
* doc/posix-headers/stddef.texi: Don't mention the problem of a missing
wchar_t.
* lib/printf-args.h (arg_type): Assume HAVE_WCHAR_T is 1.
* lib/printf-args.c (PRINTF_FETCHARGS): Likewise.
* lib/printf-parse.c (PRINTF_PARSE): Likewise.
* lib/vasnprintf.c: Likewise.
* m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
gl_PREREQ_VASNXPRINTF): Don't require gt_TYPE_WCHAR_T.
* modules/c-vasnprintf (Files): Remove m4/wchar_t.m4.
* modules/vasnprintf (Files): Likewise.
* modules/vasnwprintf (Files): Likewise.
* modules/unistdio/u16-u16-vasnprintf (Files): Likewise.
* modules/unistdio/u16-vasnprintf (Files): Likewise.
* modules/unistdio/u32-u32-vasnprintf (Files): Likewise.
* modules/unistdio/u32-vasnprintf (Files): Likewise.
* modules/unistdio/u8-u8-vasnprintf (Files): Likewise.
* modules/unistdio/u8-vasnprintf (Files): Likewise.
* modules/unistdio/ulc-vasnprintf (Files): Likewise.
* tests/test-sprintf-posix.h (test_function): Assume HAVE_WCHAR_T is 1.
* tests/test-snprintf-posix.h (test_function): Likewise.
* tests/test-vasnprintf-posix.c (test_function): Likewise.
* tests/test-vasnwprintf-posix.c (test_function): Likewise.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Don't require gt_TYPE_WCHAR_T.
* modules/wcwidth (Files): Remove m4/wchar_t.m4.
* tests/test-stdint.c: Assume HAVE_WCHAR_T is 1.
* modules/stdint-tests (Files): Remove m4/wchar_t.m4.
(configure.ac): Don't require gt_TYPE_WCHAR_T.
* m4/wchar_t.m4: Remove file.
+2024-06-13 Bruno Haible <bruno@clisp.org>
+
+ Assume wchar_t.
+ * lib/stddef.in.h (wchar_t): Remove fallback definition.
+ * m4/stddef_h.m4 (gl_STDDEF_H): Don't require gt_TYPE_WCHAR_T. Assume
+ gt_cv_c_wchar_t is 'yes'.
+ (gl_STDDEF_H_DEFAULTS): Don't initialize HAVE_WCHAR_T.
+ * modules/stddef (Files): Remove m4/wchar_t.m4.
+ (Makefile.am): Don't substitute HAVE_WCHAR_T.
+ * doc/posix-headers/stddef.texi: Don't mention the problem of a missing
+ wchar_t.
+ --
+ * lib/printf-args.h (arg_type): Assume HAVE_WCHAR_T is 1.
+ * lib/printf-args.c (PRINTF_FETCHARGS): Likewise.
+ * lib/printf-parse.c (PRINTF_PARSE): Likewise.
+ * lib/vasnprintf.c: Likewise.
+ * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
+ gl_PREREQ_VASNXPRINTF): Don't require gt_TYPE_WCHAR_T.
+ * modules/c-vasnprintf (Files): Remove m4/wchar_t.m4.
+ * modules/vasnprintf (Files): Likewise.
+ * modules/vasnwprintf (Files): Likewise.
+ * modules/unistdio/u16-u16-vasnprintf (Files): Likewise.
+ * modules/unistdio/u16-vasnprintf (Files): Likewise.
+ * modules/unistdio/u32-u32-vasnprintf (Files): Likewise.
+ * modules/unistdio/u32-vasnprintf (Files): Likewise.
+ * modules/unistdio/u8-u8-vasnprintf (Files): Likewise.
+ * modules/unistdio/u8-vasnprintf (Files): Likewise.
+ * modules/unistdio/ulc-vasnprintf (Files): Likewise.
+ * tests/test-sprintf-posix.h (test_function): Assume HAVE_WCHAR_T is 1.
+ * tests/test-snprintf-posix.h (test_function): Likewise.
+ * tests/test-vasnprintf-posix.c (test_function): Likewise.
+ * tests/test-vasnwprintf-posix.c (test_function): Likewise.
+ * tests/test-vasprintf-posix.c (test_function): Likewise.
+ --
+ * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Don't require gt_TYPE_WCHAR_T.
+ * modules/wcwidth (Files): Remove m4/wchar_t.m4.
+ --
+ * tests/test-stdint.c: Assume HAVE_WCHAR_T is 1.
+ * modules/stdint-tests (Files): Remove m4/wchar_t.m4.
+ (configure.ac): Don't require gt_TYPE_WCHAR_T.
+ --
+ * m4/wchar_t.m4: Remove file.
+
2024-06-13 Yves Orton <demerphq@gmail.com>
gitlog-to-changelog: Ensure that use of keys() is deterministic.
@code{max_align_t} does not have the expected alignment on some platforms:
NetBSD 8.0/x86, AIX 7.2 with xlc in 64-bit mode.
-@item
-Some old platforms fail to provide @code{wchar_t}.
-
@item
Some platforms provide a @code{NULL} macro that cannot be used in arbitrary
expressions:
if (ap->a.a_string == NULL)
ap->a.a_string = "(NULL)";
break;
-#if HAVE_WCHAR_T
case TYPE_WIDE_STRING:
ap->a.a_wide_string = va_arg (args, const wchar_t *);
/* A null pointer is an invalid argument for "%ls", but in practice
ap->a.a_wide_string = wide_null_string;
}
break;
-#endif
case TYPE_POINTER:
ap->a.a_pointer = va_arg (args, void *);
break;
# define PRINTF_FETCHARGS printf_fetchargs
#endif
-/* Get size_t. */
+/* Get size_t, wchar_t. */
#include <stddef.h>
-/* Get wchar_t. */
-#if HAVE_WCHAR_T
-# include <stddef.h>
-#endif
-
/* Get wint_t. */
#if HAVE_WINT_T
# include <wchar.h>
TYPE_WIDE_CHAR,
#endif
TYPE_STRING,
-#if HAVE_WCHAR_T
TYPE_WIDE_STRING,
-#endif
TYPE_POINTER,
TYPE_COUNT_SCHAR_POINTER,
TYPE_COUNT_SHORT_POINTER,
wint_t a_wide_char;
#endif
const char* a_string;
-#if HAVE_WCHAR_T
const wchar_t* a_wide_string;
-#endif
void* a_pointer;
signed char * a_count_schar_pointer;
short * a_count_short_pointer;
if (signed_type == TYPE_LONGINT
/* For backward compatibility only. */
|| signed_type == TYPE_LONGLONGINT)
-#if HAVE_WCHAR_T
type = TYPE_WIDE_STRING;
-#else
- goto error;
-#endif
else
type = TYPE_STRING;
break;
-#if HAVE_WCHAR_T
case 'S':
type = TYPE_WIDE_STRING;
c = 's';
break;
-#endif
case 'p':
type = TYPE_POINTER;
break;
# endif
#endif
-/* Some platforms lack wchar_t. */
-#if !@HAVE_WCHAR_T@
-# define wchar_t int
-#endif
-
/* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is
a hack in case the configure-time test was done with g++ even though
we are currently compiling with gcc.
# endif
#endif
-#if (((!USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_WPRINTF_DIRECTIVE_LC) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T
+#if ((!USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_WPRINTF_DIRECTIVE_LC) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)
# if HAVE_WCSLEN
# define local_wcslen wcslen
# else
# endif
#endif
-#if (!USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && HAVE_WCHAR_T && WIDE_CHAR_VERSION
+#if (!USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && WIDE_CHAR_VERSION
# if HAVE_WCSNLEN && HAVE_DECL_WCSNLEN
# define local_wcsnlen wcsnlen
# else
# endif
#endif
-#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T) || ((NEED_PRINTF_DIRECTIVE_LC || ENABLE_WCHAR_FALLBACK) && HAVE_WINT_T)) && !WIDE_CHAR_VERSION
+#if ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS || ENABLE_WCHAR_FALLBACK) || ((NEED_PRINTF_DIRECTIVE_LC || ENABLE_WCHAR_FALLBACK) && HAVE_WINT_T)) && !WIDE_CHAR_VERSION
# if ENABLE_WCHAR_FALLBACK
static size_t
wctomb_fallback (char *s, wchar_t wc)
break;
case 's':
-# if HAVE_WCHAR_T
if (type == TYPE_WIDE_STRING)
{
-# if WIDE_CHAR_VERSION
+# if WIDE_CHAR_VERSION
/* ISO C says about %ls in fwprintf:
"If the precision is not specified or is greater than the size
of the array, the array shall contain a null wide character."
tmp_length = local_wcsnlen (arg, precision);
else
tmp_length = local_wcslen (arg);
-# else
+# else
/* ISO C says about %ls in fprintf:
"If a precision is specified, no more than that many bytes are
written (including shift sequences, if any), and the array
So if there is a precision, we must not use wcslen. */
/* This case has already been handled separately in VASNPRINTF. */
abort ();
-# endif
+# endif
}
else
-# endif
{
# if WIDE_CHAR_VERSION
/* ISO C says about %s in fwprintf:
}
}
#endif
-#if (!USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T
+#if !USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS || ENABLE_WCHAR_FALLBACK
else if (dp->conversion == 's'
# if WIDE_CHAR_VERSION
&& a.arg[dp->arg_index].type != TYPE_WIDE_STRING
#if HAVE_WINT_T
case TYPE_WIDE_CHAR:
#endif
- #if HAVE_WCHAR_T
case TYPE_WIDE_STRING:
- #endif
*fbp++ = 'l';
break;
case TYPE_LONGDOUBLE:
SNPRINTF_BUF (arg);
}
break;
-#if HAVE_WCHAR_T
case TYPE_WIDE_STRING:
{
const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string;
SNPRINTF_BUF (arg);
}
break;
-#endif
case TYPE_POINTER:
{
void *arg = a.arg[dp->arg_index].a.a_pointer;
errno = ENOMEM;
goto fail_with_errno;
-#if ENABLE_UNISTDIO || ((!USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T) || ((NEED_PRINTF_DIRECTIVE_LC || ENABLE_WCHAR_FALLBACK) && HAVE_WINT_T && !WIDE_CHAR_VERSION) || (NEED_WPRINTF_DIRECTIVE_C && WIDE_CHAR_VERSION)
+#if ENABLE_UNISTDIO || (!USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS || ENABLE_WCHAR_FALLBACK) || ((NEED_PRINTF_DIRECTIVE_LC || ENABLE_WCHAR_FALLBACK) && HAVE_WINT_T && !WIDE_CHAR_VERSION) || (NEED_WPRINTF_DIRECTIVE_C && WIDE_CHAR_VERSION)
fail_with_EILSEQ:
errno = EILSEQ;
goto fail_with_errno;
# stddef_h.m4
-# serial 16
+# serial 17
dnl Copyright (C) 2009-2024 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_DEFUN_ONCE([gl_STDDEF_H],
[
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
- AC_REQUIRE([gt_TYPE_WCHAR_T])
dnl Persuade OpenBSD <stddef.h> to declare max_align_t.
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
GL_GENERATE_STDDEF_H=true
fi
- if test $gt_cv_c_wchar_t = no; then
- HAVE_WCHAR_T=0
- GL_GENERATE_STDDEF_H=true
- fi
-
AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions],
[gl_cv_decl_null_works],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
STDDEF_NOT_IDEMPOTENT=0; AC_SUBST([STDDEF_NOT_IDEMPOTENT])
REPLACE_NULL=0; AC_SUBST([REPLACE_NULL])
HAVE_MAX_ALIGN_T=1; AC_SUBST([HAVE_MAX_ALIGN_T])
- HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T])
])
# vasnprintf.m4
-# serial 52
+# serial 53
dnl Copyright (C) 2002-2004, 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# Prerequisites of lib/printf-args.h, lib/printf-args.c.
AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
[
- AC_REQUIRE([gt_TYPE_WCHAR_T])
AC_REQUIRE([gt_TYPE_WINT_T])
])
AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
[
AC_REQUIRE([gl_FEATURES_H])
- AC_REQUIRE([gt_TYPE_WCHAR_T])
AC_REQUIRE([gt_TYPE_WINT_T])
AC_REQUIRE([AC_TYPE_SIZE_T])
AC_CHECK_TYPE([ptrdiff_t], ,
AC_DEFUN_ONCE([gl_PREREQ_VASNXPRINTF],
[
AC_REQUIRE([AC_FUNC_ALLOCA])
- AC_REQUIRE([gt_TYPE_WCHAR_T])
AC_REQUIRE([gt_TYPE_WINT_T])
AC_CHECK_FUNCS([wcslen])
dnl Knowing DBL_EXPBIT0_WORD and DBL_EXPBIT0_BIT enables an optimization
+++ /dev/null
-# wchar_t.m4
-# serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2024 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.
-
-dnl From Bruno Haible.
-dnl Test whether <stddef.h> has the 'wchar_t' type.
-dnl Prerequisite: AC_PROG_CC
-
-AC_DEFUN([gt_TYPE_WCHAR_T],
-[
- AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <stddef.h>
- wchar_t foo = (wchar_t)'\0';]],
- [[]])],
- [gt_cv_c_wchar_t=yes],
- [gt_cv_c_wchar_t=no])])
- if test $gt_cv_c_wchar_t = yes; then
- AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
- fi
-])
# wcwidth.m4
-# serial 37
+# serial 38
dnl Copyright (C) 2006-2024 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 Persuade glibc <wchar.h> to declare wcwidth().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
- AC_REQUIRE([gt_TYPE_WCHAR_T])
AC_REQUIRE([gt_TYPE_WINT_T])
AC_CHECK_HEADERS_ONCE([wchar.h])
lib/printf-parse.c
lib/vasnprintf.h
lib/vasnprintf.c
-m4/wchar_t.m4
m4/wint_t.m4
m4/intmax_t.m4
m4/stdint_h.m4
Files:
lib/stddef.in.h
m4/stddef_h.m4
-m4/wchar_t.m4
Depends-on:
gen-header
-e 's|@''STDDEF_NOT_IDEMPOTENT''@|$(STDDEF_NOT_IDEMPOTENT)|g' \
-e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
-e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \
- -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
$(srcdir)/stddef.in.h > $@-t
$(AM_V_at)mv $@-t $@
else
Files:
tests/test-stdint.c
-m4/wchar_t.m4
m4/wint_t.m4
Depends-on:
stdint-c++-tests
configure.ac:
-AC_REQUIRE([gt_TYPE_WCHAR_T])
AC_REQUIRE([gt_TYPE_WINT_T])
Makefile.am:
m4/vasnprintf.m4
m4/printf.m4
m4/math_h.m4
-m4/wchar_t.m4
m4/wint_t.m4
m4/intmax_t.m4
m4/stdint_h.m4
m4/vasnprintf.m4
m4/printf.m4
m4/math_h.m4
-m4/wchar_t.m4
m4/wint_t.m4
m4/intmax_t.m4
m4/stdint_h.m4
m4/vasnprintf.m4
m4/printf.m4
m4/math_h.m4
-m4/wchar_t.m4
m4/wint_t.m4
m4/intmax_t.m4
m4/stdint_h.m4
m4/vasnprintf.m4
m4/printf.m4
m4/math_h.m4
-m4/wchar_t.m4
m4/wint_t.m4
m4/intmax_t.m4
m4/stdint_h.m4
m4/vasnprintf.m4
m4/printf.m4
m4/math_h.m4
-m4/wchar_t.m4
m4/wint_t.m4
m4/intmax_t.m4
m4/stdint_h.m4
m4/vasnprintf.m4
m4/printf.m4
m4/math_h.m4
-m4/wchar_t.m4
m4/wint_t.m4
m4/intmax_t.m4
m4/stdint_h.m4
m4/vasnprintf.m4
m4/printf.m4
m4/math_h.m4
-m4/wchar_t.m4
m4/wint_t.m4
m4/intmax_t.m4
m4/stdint_h.m4
lib/vasnprintf.h
lib/vasnprintf.c
lib/asnprintf.c
-m4/wchar_t.m4
m4/wint_t.m4
m4/intmax_t.m4
m4/stdint_h.m4
lib/vasnwprintf.c
lib/vasnprintf.c
lib/asnwprintf.c
-m4/wchar_t.m4
m4/wint_t.m4
m4/intmax_t.m4
m4/stdint_h.m4
Files:
lib/wcwidth.c
m4/wcwidth.m4
-m4/wchar_t.m4
m4/wint_t.m4
Depends-on:
ASSERT (retval == strlen (result));
}
-#if HAVE_WCHAR_T
static wchar_t L_xyz[4] = { 'x', 'y', 'z', 0 };
{ /* Width. */
ASSERT (strcmp (result, "xyz 33") == 0);
ASSERT (retval == strlen (result));
}
-#endif
/* To verify that these tests succeed, it is necessary to run them under
a tool that checks against invalid memory accesses, such as ElectricFence
free (block);
}
}
-#if HAVE_WCHAR_T
{
size_t i;
free (block);
}
}
-#endif
/* Test the support of the %c format directive. */
ASSERT (retval == 6);
}
-#if HAVE_WCHAR_T
static wint_t L_x = (wchar_t) 'x';
{ /* Width. */
"%10lc %d", L_invalid, 33, 44, 55);
(void) retval;
}
-#endif
/* Test the support of the 'x' conversion specifier for hexadecimal output of
integers. */
ASSERT (retval == strlen (result));
}
-#if HAVE_WCHAR_T
static wchar_t L_xyz[4] = { 'x', 'y', 'z', 0 };
{ /* Width. */
ASSERT (strcmp (result, "xyz 33") == 0);
ASSERT (retval == strlen (result));
}
-#endif
/* To verify that these tests succeed, it is necessary to run them under
a tool that checks against invalid memory accesses, such as ElectricFence
free (block);
}
}
-#if HAVE_WCHAR_T
{
size_t i;
free (block);
}
}
-#endif
/* Test the support of the %c format directive. */
ASSERT (retval == 6);
}
-#if HAVE_WCHAR_T
static wint_t L_x = (wchar_t) 'x';
{ /* Width. */
my_sprintf (result, "%10lc %d", L_invalid, 33, 44, 55);
(void) retval;
}
-#endif
/* Test the support of the 'x' conversion specifier for hexadecimal output of
integers. */
err or;
#endif
-#if HAVE_WCHAR_T
verify (TYPE_MINIMUM (wchar_t) == WCHAR_MIN);
verify (TYPE_MAXIMUM (wchar_t) == WCHAR_MAX);
verify_same_types (WCHAR_MIN, (wchar_t) 0 + 0);
verify_same_types (WCHAR_MAX, (wchar_t) 0 + 0);
-# if WCHAR_MIN != 17 && WCHAR_MAX
+#if WCHAR_MIN != 17 && WCHAR_MAX
/* ok */
-# else
+#else
err or;
-# endif
#endif
#if HAVE_WINT_T
free (result);
}
-#if HAVE_WCHAR_T
static wchar_t L_xyz[4] = { 'x', 'y', 'z', 0 };
{ /* Width. */
ASSERT (length == strlen (result));
free (result);
}
-#endif
/* To verify that these tests succeed, it is necessary to run them under
a tool that checks against invalid memory accesses, such as ElectricFence
free (block);
}
}
-#if HAVE_WCHAR_T
{
size_t i;
free (block);
}
}
-#endif
-#if HAVE_WCHAR_T
/* Test that converting an invalid wchar_t[] to char[] fails with EILSEQ. */
{
static const wchar_t input[] = { (wchar_t) 1702057263, 114, 0 };
else
free (result);
}
-#endif
/* Test the support of the %c format directive. */
free (result);
}
-#if HAVE_WCHAR_T
static wint_t L_x = (wchar_t) 'x';
{ /* Width. */
my_asnprintf (NULL, &length, "%10lc %d", L_invalid, 33, 44, 55);
free (result);
}
-#endif
/* Test the support of the 'x' conversion specifier for hexadecimal output of
integers. */
}
#endif
-#if HAVE_WCHAR_T
static wchar_t L_xyz[4] = { 'x', 'y', 'z', 0 };
{ /* Width. */
ASSERT (length == wcslen (result));
free (result);
}
-#endif
/* To verify that these tests succeed, it is necessary to run them under
a tool that checks against invalid memory accesses, such as ElectricFence
free (block);
}
}
-#if HAVE_WCHAR_T
{
size_t i;
free (block);
}
}
-#endif
-#if HAVE_WCHAR_T
/* Test that converting an invalid wchar_t[] to char[] fails with EILSEQ. */
{
static const wchar_t input[] = { (wchar_t) 1702057263, 114, 0 };
else
free (result);
}
-#endif
/* Test the support of the %c format directive. */
}
#endif
-#if HAVE_WCHAR_T
static wint_t L_x = (wchar_t) 'x';
{ /* Width. */
ASSERT (length == 13);
free (result);
}
-#endif
/* Test the support of the 'x' conversion specifier for hexadecimal output of
integers. */
free (result);
}
-#if HAVE_WCHAR_T
static wchar_t L_xyz[4] = { 'x', 'y', 'z', 0 };
{ /* Width. */
ASSERT (retval == strlen (result));
free (result);
}
-#endif
/* To verify that these tests succeed, it is necessary to run them under
a tool that checks against invalid memory accesses, such as ElectricFence
free (block);
}
}
-#if HAVE_WCHAR_T
{
size_t i;
free (block);
}
}
-#endif
/* Test the support of the %c format directive. */
free (result);
}
-#if HAVE_WCHAR_T
static wint_t L_x = (wchar_t) 'x';
{ /* Width. */
if (retval >= 0)
free (result);
}
-#endif
/* Test the support of the 'x' conversion specifier for hexadecimal output of
integers. */