/* vsprintf with automatic memory allocation.
- Copyright (C) 1999, 2002-2009 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
{
/* Use only as many wide characters as needed to produce
at most PRECISION bytes, from the left. */
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
memset (&state, '\0', sizeof (mbstate_t));
# endif
if (*arg_end == 0)
/* Found the terminating null wide character. */
break;
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
count = wcrtomb (cbuf, *arg_end, &state);
# else
count = wctomb (cbuf, *arg_end);
{
/* Use the entire string, and count the number of
bytes. */
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
memset (&state, '\0', sizeof (mbstate_t));
# endif
if (*arg_end == 0)
/* Found the terminating null wide character. */
break;
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
count = wcrtomb (cbuf, *arg_end, &state);
# else
count = wctomb (cbuf, *arg_end);
{
TCHAR_T *tmpptr = tmpsrc;
size_t remaining;
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
memset (&state, '\0', sizeof (mbstate_t));
# endif
if (*arg == 0)
abort ();
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
count = wcrtomb (cbuf, *arg, &state);
# else
count = wctomb (cbuf, *arg);
{
/* We know the number of bytes in advance. */
size_t remaining;
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
memset (&state, '\0', sizeof (mbstate_t));
# endif
if (*arg == 0)
abort ();
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
count = wcrtomb (cbuf, *arg, &state);
# else
count = wctomb (cbuf, *arg);
}
else
{
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
memset (&state, '\0', sizeof (mbstate_t));
# endif
if (*arg == 0)
abort ();
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
count = wcrtomb (cbuf, *arg, &state);
# else
count = wctomb (cbuf, *arg);