diff options
author | Bruno Haible <bruno@clisp.org> | 2009-12-12 16:07:06 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-12-12 16:08:01 +0100 |
commit | 384ec52191e91bf1326b9a526f0b30e247443eed (patch) | |
tree | 94a0edc0620dc5f699c90339051ac293c4379e0e | |
parent | 7abd428fe7be9424ac61e7bfe8691f5e4f1caa9c (diff) | |
download | external_gettext-384ec52191e91bf1326b9a526f0b30e247443eed.zip external_gettext-384ec52191e91bf1326b9a526f0b30e247443eed.tar.gz external_gettext-384ec52191e91bf1326b9a526f0b30e247443eed.tar.bz2 |
vasnprintf: Tiny optimization.
-rw-r--r-- | gettext-runtime/intl/ChangeLog | 5 | ||||
-rw-r--r-- | gettext-runtime/intl/vasnprintf.c | 8 | ||||
-rw-r--r-- | gettext-runtime/libasprintf/ChangeLog | 5 | ||||
-rw-r--r-- | gettext-runtime/libasprintf/vasnprintf.c | 8 |
4 files changed, 18 insertions, 8 deletions
diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index 01c65c3..fe63bf8 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,8 @@ +2009-11-22 Bruno Haible <bruno@clisp.org> + + * vasnprintf.c (decimal_point_char): Choose the fast path also on + MacOS X. + 2009-11-17 Eric Blake <ebb9@byu.net> * vasnprintf.c (VASNPRINTF): Avoid shadowing our own local variables. diff --git a/gettext-runtime/intl/vasnprintf.c b/gettext-runtime/intl/vasnprintf.c index 791376b..d64cec2 100644 --- a/gettext-runtime/intl/vasnprintf.c +++ b/gettext-runtime/intl/vasnprintf.c @@ -262,10 +262,10 @@ decimal_point_char (void) { 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]; diff --git a/gettext-runtime/libasprintf/ChangeLog b/gettext-runtime/libasprintf/ChangeLog index 458c2c5..c81433f 100644 --- a/gettext-runtime/libasprintf/ChangeLog +++ b/gettext-runtime/libasprintf/ChangeLog @@ -1,3 +1,8 @@ +2009-11-22 Bruno Haible <bruno@clisp.org> + + * vasnprintf.c (decimal_point_char): Choose the fast path also on + MacOS X. + 2009-11-17 Eric Blake <ebb9@byu.net> * vasnprintf.c (VASNPRINTF): Avoid shadowing our own local variables. diff --git a/gettext-runtime/libasprintf/vasnprintf.c b/gettext-runtime/libasprintf/vasnprintf.c index 791376b..d64cec2 100644 --- a/gettext-runtime/libasprintf/vasnprintf.c +++ b/gettext-runtime/libasprintf/vasnprintf.c @@ -262,10 +262,10 @@ decimal_point_char (void) { 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]; |