diff options
author | Daiki Ueno <ueno@gnu.org> | 2013-06-25 11:56:09 +0900 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2013-06-25 12:00:59 +0900 |
commit | b4697109158782e8b543f2d69aadc4b8f6b0efda (patch) | |
tree | 16623fa5bff27ce422cf395230cbef134b27b167 /gnulib-local | |
parent | 5c2f29823e8c007a5c42ec526d1ec6eda36af33a (diff) | |
download | external_gettext-b4697109158782e8b543f2d69aadc4b8f6b0efda.zip external_gettext-b4697109158782e8b543f2d69aadc4b8f6b0efda.tar.gz external_gettext-b4697109158782e8b543f2d69aadc4b8f6b0efda.tar.bz2 |
Work around localcharset issue under OS X multi-threaded scenario.
* lib/localcharset.c.diff: New patch originally posted to Gnulib
<https://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00091.html>.
Diffstat (limited to 'gnulib-local')
-rw-r--r-- | gnulib-local/ChangeLog | 6 | ||||
-rw-r--r-- | gnulib-local/lib/localcharset.c.diff | 25 |
2 files changed, 31 insertions, 0 deletions
diff --git a/gnulib-local/ChangeLog b/gnulib-local/ChangeLog index eb99087..726f300 100644 --- a/gnulib-local/ChangeLog +++ b/gnulib-local/ChangeLog @@ -1,3 +1,9 @@ +2013-06-25 Daiki Ueno <ueno@gnu.org> + + Work around localcharset issue under OS X multi-threaded scenario. + * lib/localcharset.c.diff: New patch originally posted to Gnulib + <https://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00091.html>. + 2013-06-16 Andreas Schwab <schwab@linux-m68k.org> (tiny change) * m4/libxml.m4 (gl_LIBXML): Remove extra quotes. diff --git a/gnulib-local/lib/localcharset.c.diff b/gnulib-local/lib/localcharset.c.diff new file mode 100644 index 0000000..088c37c --- /dev/null +++ b/gnulib-local/lib/localcharset.c.diff @@ -0,0 +1,25 @@ +diff --git a/localcharset.c b/localcharset.c +index 6b0153e..bfd9a03 100644 +--- a/localcharset.c ++++ b/localcharset.c +@@ -65,6 +65,11 @@ + # include <os2.h> + #endif + ++/* For MB_CUR_MAX_L */ ++#if defined DARWIN7 ++# include <xlocale.h> ++#endif ++ + #if ENABLE_RELOCATABLE + # include "relocatable.h" + #else +@@ -545,7 +550,7 @@ locale_charset (void) + #ifdef DARWIN7 + /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8" + (the default codeset) does not work when MB_CUR_MAX is 1. */ +- if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX <= 1) ++ if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX_L (uselocale (NULL)) <= 1) + codeset = "ASCII"; + #endif + |