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:
Fredounet
2016-05-29 17:58:03 +01:00
parent ccb24948df
commit 3b169219af
4 changed files with 29 additions and 5 deletions
+26 -2
View File
@@ -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
//