mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
MSYS2 Mingw64 compilation. Compilation successful considering everything but the following:
- IFC4 (only IFC2x3 tried; should work) - VLD - IfcMax - shared libraries
This commit is contained in:
@@ -54,10 +54,12 @@ void init_locale() {
|
||||
locale = _create_locale(LC_NUMERIC, "C");
|
||||
}
|
||||
}
|
||||
#else
|
||||
//#else
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <xlocale.h>
|
||||
#endif
|
||||
//#endif
|
||||
static locale_t locale = (locale_t) 0;
|
||||
void init_locale() {
|
||||
if (locale == (locale_t) 0) {
|
||||
@@ -66,6 +68,28 @@ void init_locale() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __MINGW64__
|
||||
#include <locale>
|
||||
#include <sstream>
|
||||
|
||||
typedef void* locale_t;
|
||||
static locale_t locale = (locale_t) 0;
|
||||
|
||||
void init_locale() {}
|
||||
|
||||
double strtod_l(const char* start, char** end, locale_t loc) {
|
||||
double d;
|
||||
std::stringstream ss;
|
||||
ss.imbue(std::locale::classic());
|
||||
ss << start;
|
||||
ss >> d;
|
||||
size_t nread = ss.tellg();
|
||||
*end = const_cast<char*>(start) + nread;
|
||||
return d;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Opens the file, gets the filesize and reads a chunk in memory
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user