mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
0028971: Configuration - fix compatibility with glibc 2.26+ due to xlocale.h removal
This commit is contained in:
parent
b101eb1ff0
commit
e2c4ce4869
@ -32,7 +32,7 @@ namespace
|
||||
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)
|
||||
@ -43,7 +43,7 @@ namespace
|
||||
{
|
||||
#ifdef HAVE_XLOCALE_H
|
||||
freelocale (myLocale);
|
||||
#elif defined(_WIN32) && !defined(__MINGW32__)
|
||||
#elif defined(_MSC_VER)
|
||||
_free_locale (myLocale);
|
||||
#endif
|
||||
}
|
||||
|
@ -35,7 +35,8 @@
|
||||
#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
|
||||
|
||||
@ -65,7 +66,7 @@ public:
|
||||
|
||||
#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;
|
||||
@ -78,7 +79,7 @@ public:
|
||||
private:
|
||||
|
||||
void* myPrevLocale; //!< previous locale, platform-dependent pointer!
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
int myPrevTLocaleState; //!< previous thread-locale state, MSVCRT-specific
|
||||
#endif
|
||||
|
||||
|
@ -63,7 +63,7 @@ Standard_Integer HashCodes (const Standard_CString Value,
|
||||
#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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user