]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 21 May 2011 00:37:33 +0000 (00:37 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 21 May 2011 00:37:33 +0000 (00:37 +0000)
magick/locale.c

index 74777cd4f9cc7d078b9bce72fba91c60f70ddc08..3283c2e25ff86344d37600c22f26dece259f8113 100644 (file)
@@ -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)
   {