/*
Define declarations.
*/
+#if defined(MAGICKCORE_HAVE_NEWLOCALE) || defined(MAGICKCORE_WINDOWS_SUPPORT)
+# define MAGICKCORE_LOCALE_SUPPORT
+#endif
#define LocaleFilename "locale.xml"
#define MaxRecursionDepth 200
\f
static SplayTreeInfo
*locale_cache = (SplayTreeInfo *) NULL;
-#if !defined(MAGICKCORE_HAVE_LOCALE_T)
-typedef void *locale_t;
-#endif
-
+#if defined(MAGICKCORE_LOCALE_SUPPORT)
static volatile locale_t
c_locale = (locale_t) NULL;
+#endif
\f
/*
Forward declarations.
LoadLocaleCache(SplayTreeInfo *,const char *,const char *,const char *,
const size_t,ExceptionInfo *);
\f
-#if defined(MAGICKCORE_HAVE_LOCALE_H)
+#if defined(MAGICKCORE_LOCALE_SUPPORT)
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
return(locale_cache);
}
\f
-#if defined(MAGICKCORE_HAVE_LOCALE_H)
+#if defined(MAGICKCORE_LOCALE_SUPPORT)
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
ssize_t
n;
-#if defined(MAGICKCORE_HAVE_LOCALE_H) && defined(MAGICKCORE_HAVE_VFPRINTF_L)
+#if defined(MAGICKCORE_LOCALE_SUPPORT) && defined(MAGICKCORE_HAVE_VFPRINTF_L)
{
locale_t
locale;
#endif
}
#else
-#if defined(MAGICKCORE_HAVE_LOCALE_H) && defined(MAGICKCORE_HAVE_USELOCALE)
+#if defined(MAGICKCORE_LOCALE_SUPPORT) && defined(MAGICKCORE_HAVE_USELOCALE)
{
locale_t
locale,
ssize_t
n;
-#if defined(MAGICKCORE_HAVE_LOCALE_H) && defined(MAGICKCORE_HAVE_VSNPRINTF_L)
+#if defined(MAGICKCORE_LOCALE_SUPPORT) && defined(MAGICKCORE_HAVE_VSNPRINTF_L)
{
locale_t
locale;
#endif
}
#elif defined(MAGICKCORE_HAVE_VSNPRINTF)
-#if defined(MAGICKCORE_HAVE_LOCALE_H) && defined(MAGICKCORE_HAVE_USELOCALE)
+#if defined(MAGICKCORE_LOCALE_SUPPORT) && defined(MAGICKCORE_HAVE_USELOCALE)
{
locale_t
locale,
value=(double) strtoul(string,&q,16);
else
{
-#if defined(MAGICKCORE_HAVE_LOCALE_H) && defined(MAGICKCORE_HAVE_STRTOD_L)
+#if defined(MAGICKCORE_LOCALE_SUPPORT) && defined(MAGICKCORE_HAVE_STRTOD_L)
locale_t
locale;
LockSemaphoreInfo(locale_semaphore);
if (locale_cache != (SplayTreeInfo *) NULL)
locale_cache=DestroySplayTree(locale_cache);
-#if defined(MAGICKCORE_HAVE_LOCALE_H)
+#if defined(MAGICKCORE_LOCALE_SUPPORT)
DestroyCLocale();
#endif
UnlockSemaphoreInfo(locale_semaphore);