# HG changeset patch # User Bruno Haible # Date 1258940603 -3600 # Node ID 9f98da6e2275e603a5b2ff46cf8a9fe3279757a0 # Parent ab469d89766a2762faf00e4d5a6480afb1c7ff1d vasnprintf: Tiny optimization. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-22 Bruno Haible + + vasnprintf: Tiny optimization. + * lib/vasnprintf.c (decimal_point_char): Choose the fast path also on + MacOS X. + 2009-11-22 Bruno Haible Tests for module 'duplocale'. diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c --- a/lib/vasnprintf.c +++ b/lib/vasnprintf.c @@ -261,10 +261,10 @@ { const char *point; /* Determine it in a multithread-safe way. We know nl_langinfo is - multithread-safe on glibc systems, but is not required to be multithread- - safe by POSIX. sprintf(), however, is multithread-safe. localeconv() - is rarely multithread-safe. */ -# if HAVE_NL_LANGINFO && __GLIBC__ + multithread-safe on glibc systems and MacOS X systems, but is not required + to be multithread-safe by POSIX. sprintf(), however, is multithread-safe. + localeconv() is rarely multithread-safe. */ +# if HAVE_NL_LANGINFO && (__GLIBC__ || (defined __APPLE__ && defined __MACH__)) point = nl_langinfo (RADIXCHAR); # elif 1 char pointbuf[5];