Mercurial > hg > octave-nkf > gnulib-hg
changeset 12344:9f98da6e2275
vasnprintf: Tiny optimization.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 23 Nov 2009 02:43:23 +0100 |
parents | ab469d89766a |
children | 97d443c1572f |
files | ChangeLog lib/vasnprintf.c |
diffstat | 2 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-22 Bruno Haible <bruno@clisp.org> + + vasnprintf: Tiny optimization. + * lib/vasnprintf.c (decimal_point_char): Choose the fast path also on + MacOS X. + 2009-11-22 Bruno Haible <bruno@clisp.org> Tests for module 'duplocale'.
--- 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];