]> granicus.if.org Git - imagemagick/commitdiff
tolower_l / toupper_l is conditionally compiled
authorCristy <mikayla-grace@urban-warrior.org>
Tue, 29 Jan 2019 01:29:58 +0000 (20:29 -0500)
committerCristy <mikayla-grace@urban-warrior.org>
Tue, 29 Jan 2019 01:29:58 +0000 (20:29 -0500)
MagickCore/locale.c
MagickCore/nt-base.h
configure

index 265e4c544ae3fa34d8505cc5d280673da6b290de..28207f67cadc2c1091065f6ecb045094c84dcf3a 100644 (file)
@@ -290,9 +290,6 @@ static void DestroyCLocale(void)
 #if defined(MAGICKCORE_HAVE_NEWLOCALE)
   if (c_locale != (locale_t) NULL)
     freelocale(c_locale);
-#elif defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(__MINGW32__)
-  if (c_locale != (locale_t) NULL)
-    _free_locale(c_locale);
 #endif
   c_locale=(locale_t) NULL;
 }
@@ -1526,9 +1523,11 @@ MagickExport void LocaleLower(char *string)
 */
 MagickExport int LocaleLowercase(const int c)
 {
-  if (c_locale == (locale_t) NULL)
-    return(tolower(c));
-  return(tolower_l(c,c_locale));
+#if defined(MAGICKCORE_LOCALE_SUPPORT)
+  if (c_locale != (locale_t) NULL)
+    return(tolower_l(c,c_locale));
+#endif
+  return(tolower(c));
 }
 \f
 /*
@@ -1662,9 +1661,11 @@ MagickExport void LocaleUpper(char *string)
 */
 MagickExport int LocaleUppercase(const int c)
 {
-  if (c_locale == (locale_t) NULL)
-    return(toupper(c));
-  return(toupper_l(c,c_locale));
+#if defined(MAGICKCORE_LOCALE_SUPPORT)
+  if (c_locale != (locale_t) NULL)
+    return(toupper_l(c,c_locale));
+#endif
+  return(toupper(c));
 }
 \f
 /*
index 917c0fe11fb9358d52887e3bce2c832543efb188..fc2314de0375359cf6c285b53fd6f00206b9df81 100644 (file)
@@ -105,6 +105,9 @@ extern "C" {
 #if !defined(fileno)
 #  define fileno  _fileno
 #endif
+#if !defined(freelocale)
+#  define freelocale  _free_locale
+#endif
 #if !defined(fseek) && !defined(__MINGW32__)
 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \
   !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
index 0ca04d0a43675122272ea257a851c920e6a4510c..4b60327b7935bac6385f4a1c42556ce0a7ef9029 100755 (executable)
--- a/configure
+++ b/configure
@@ -4570,7 +4570,7 @@ MAGICK_PATCHLEVEL_VERSION=26
 
 MAGICK_VERSION=7.0.8-26
 
-MAGICK_GIT_REVISION=15280:6e7c9e78a:20190128
+MAGICK_GIT_REVISION=15281:2f8969644:20190128
 
 
 # Substitute library versioning