CLocalePtr()
#ifdef HAVE_XLOCALE_H
: myLocale (newlocale (LC_ALL_MASK, "C", NULL))
- #elif defined(_WIN32) && !defined(__MINGW32__)
+ #elif defined(_MSC_VER)
: myLocale (_create_locale (LC_ALL, "C"))
#else
: myLocale (NULL)
{
#ifdef HAVE_XLOCALE_H
freelocale (myLocale);
- #elif defined(_WIN32) && !defined(__MINGW32__)
+ #elif defined(_MSC_VER)
_free_locale (myLocale);
#endif
}
#endif
#endif // ifndef HAVE_LOCALE_H
-#ifdef HAVE_XLOCALE_H
+#if defined(HAVE_XLOCALE_H) && !(defined(__GLIBC__) && (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 24))
+ // xlocale.h is actually a non-standard header file; glibc 2.26 has removed it altogether (all definition comes from locale.h)
#include <xlocale.h>
#endif
#ifdef HAVE_XLOCALE_H
typedef locale_t clocale_t;
-#elif defined(_WIN32) && !defined(__MINGW32__)
+#elif defined(_MSC_VER)
typedef _locale_t clocale_t;
#else
typedef void* clocale_t;
private:
void* myPrevLocale; //!< previous locale, platform-dependent pointer!
-#ifdef _WIN32
+#ifdef _MSC_VER
int myPrevTLocaleState; //!< previous thread-locale state, MSVCRT-specific
#endif
#ifdef __APPLE__
// There are a lot of *_l functions availalbe on Mac OS X - we use them
#define SAVE_TL()
-#elif defined(_WIN32) && !defined(__MINGW32__)
+#elif defined(_MSC_VER)
// MSVCRT has equivalents with slightly different syntax
#define SAVE_TL()
#define strtod_l(thePtr, theNextPtr, theLocale) _strtod_l(thePtr, theNextPtr, theLocale)