From 405905f9a85da5d3b531e495986818fdd9f765cc Mon Sep 17 00:00:00 2001 From: cristy Date: Sat, 21 May 2011 00:37:33 +0000 Subject: [PATCH] --- magick/locale.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/magick/locale.c b/magick/locale.c index 74777cd4f..3283c2e25 100644 --- a/magick/locale.c +++ b/magick/locale.c @@ -243,7 +243,11 @@ MagickExport ssize_t FormatLocaleFileList(FILE *file, if (locale == (locale_t) NULL) n=vfprintf(file,format,operands); else +#if defined(__APPLE__) + n=vfprintf_l(file,locale,format,operands); +#else n=vfprintf_l(file,format,locale,operands); +#endif } #else #if defined(MAGICKCORE_HAVE_USELOCALE) @@ -322,7 +326,20 @@ MagickExport ssize_t FormatLocaleStringList(char *restrict string, n; #if defined(MAGICKCORE_HAVE_VSNPRINTF_L) - n=vsnprintf_l(string,length,format,(locale_t) NULL,operands); + { + locale_t + locale; + + locale=AcquireCLocale(); + if (locale == (locale_t) NULL) + n=vsnprintf(string,length,format,operands); + else +#if defined(__APPLE__) + n=vsnprintf_l(string,length,locale,format,operands); +#else + n=vsnprintf_l(string,length,format,locale,operands); +#endif + } #elif defined(MAGICKCORE_HAVE_VSNPRINTF) #if defined(MAGICKCORE_HAVE_USELOCALE) { -- 2.40.0