#if defined(MAGICKCORE_HAVE_NEWLOCALE)
if (c_locale == (locale_t) NULL)
c_locale=newlocale(LC_ALL_MASK,"C",(locale_t) 0);
-#elif defined(MAGICKCORE_WINDOWS_SUPPORT)
+#elif defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(__MINGW32__)
if (c_locale == (locale_t) NULL)
c_locale=_create_locale(LC_ALL,"C");
#endif
#if defined(MAGICKCORE_HAVE_NEWLOCALE)
if (c_locale != (locale_t) NULL)
freelocale(c_locale);
-#elif defined(MAGICKCORE_WINDOWS_SUPPORT)
+#elif defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(__MINGW32__)
if (c_locale != (locale_t) NULL)
_free_locale(c_locale);
#endif