Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ IF(UNICODE_SUPPORT)
MESSAGE(STATUS "ICU libraries found")
# NOTE icudata appears to be icudt on Windows/MSVC and icudata on others
# dl is included to resolve dlopen and friends symbols
IF(MSVC)
IF(MSVC OR MINGW)
SET(ICU_LIBRARIES icuuc icudt)
ADD_DEBUG_VARIANTS(ICU_LIBRARIES "${ICU_LIBRARIES}" "d")
ADD_DEFINITIONS(-DU_STATIC_IMPLEMENTATION) # required for static ICU
Expand Down
2 changes: 1 addition & 1 deletion src/ifcconvert/ColladaSerializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void ColladaSerializer::ColladaExporter::ColladaScene::write() {
closeVisualScene();
closeLibrary();

COLLADASW::Scene scene (mSW, COLLADASW::URI ("#" + scene_id));
COLLADASW::Scene scene (mSW, COLLADASW::URI ("#" + scene_id), COLLADASW::URI ("#" + scene_id));
scene.add();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/ifcgeomserver/IfcGeomServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <iostream>
#include <boost/cstdint.hpp>

#if defined(_WIN32) && !defined(__CYGWIN__)
#if defined(_WIN32) && defined(__CYGWIN__)
#define SET_BINARY_STREAMS
#endif
#ifdef SET_BINARY_STREAMS
Expand Down
28 changes: 26 additions & 2 deletions src/ifcparse/IfcParse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
//
Expand Down