mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 15:56:23 +01:00
Fix bug 161288:
2006-12-18 Matthias Clasen <mclasen@redhat.com> Fix bug 161288: * configure.in: Check for wcslen. * glib/gnulib/vasnprintf.c: Handle wcslen missing.
This commit is contained in:
parent
52ef9438ca
commit
558383d62c
@ -1,3 +1,11 @@
|
|||||||
|
2006-12-18 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Fix bug 161288:
|
||||||
|
|
||||||
|
* configure.in: Check for wcslen.
|
||||||
|
|
||||||
|
* glib/gnulib/vasnprintf.c: Handle wcslen missing.
|
||||||
|
|
||||||
2006-12-18 Matthias Clasen <mclasen@redhat.com>
|
2006-12-18 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/gkeyfile.c: Accept '@' in locale names.
|
* glib/gkeyfile.c: Accept '@' in locale names.
|
||||||
|
@ -917,7 +917,7 @@ gt_TYPE_WINT_T
|
|||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
AC_CHECK_TYPES(ptrdiff_t)
|
AC_CHECK_TYPES(ptrdiff_t)
|
||||||
jm_AC_TYPE_INTMAX_T
|
jm_AC_TYPE_INTMAX_T
|
||||||
AC_CHECK_FUNCS(snprintf)
|
AC_CHECK_FUNCS([snprintf wcslen])
|
||||||
AC_FUNC_SNPRINTF_C99
|
AC_FUNC_SNPRINTF_C99
|
||||||
|
|
||||||
# Check if bcopy can be used for overlapping copies, if memmove isn't found.
|
# Check if bcopy can be used for overlapping copies, if memmove isn't found.
|
||||||
|
@ -41,6 +41,29 @@
|
|||||||
#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
|
#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
|
||||||
#include "printf-parse.h"
|
#include "printf-parse.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_WCHAR_T
|
||||||
|
# ifdef HAVE_WCSLEN
|
||||||
|
# define local_wcslen wcslen
|
||||||
|
# else
|
||||||
|
/* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid
|
||||||
|
a dependency towards this library, here is a local substitute.
|
||||||
|
Define this substitute only once, even if this file is included
|
||||||
|
twice in the same compilation unit. */
|
||||||
|
# ifndef local_wcslen_defined
|
||||||
|
# define local_wcslen_defined 1
|
||||||
|
static size_t
|
||||||
|
local_wcslen (const wchar_t *s)
|
||||||
|
{
|
||||||
|
const wchar_t *ptr;
|
||||||
|
|
||||||
|
for (ptr = s; *ptr != (wchar_t) 0; ptr++)
|
||||||
|
;
|
||||||
|
return ptr - s;
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* For those losing systems which don't have 'alloca' we have to add
|
/* For those losing systems which don't have 'alloca' we have to add
|
||||||
some additional code emulating it. */
|
some additional code emulating it. */
|
||||||
#ifdef HAVE_ALLOCA
|
#ifdef HAVE_ALLOCA
|
||||||
@ -549,7 +572,7 @@ vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
|
|||||||
# ifdef HAVE_WCHAR_T
|
# ifdef HAVE_WCHAR_T
|
||||||
if (type == TYPE_WIDE_STRING)
|
if (type == TYPE_WIDE_STRING)
|
||||||
tmp_length =
|
tmp_length =
|
||||||
wcslen (a.arg[dp->arg_index].a.a_wide_string)
|
local_wcslen (a.arg[dp->arg_index].a.a_wide_string)
|
||||||
* MB_CUR_MAX;
|
* MB_CUR_MAX;
|
||||||
else
|
else
|
||||||
# endif
|
# endif
|
||||||
|
Loading…
Reference in New Issue
Block a user