Skip to content

Commit

Permalink
Merge pull request #599 from pinotree/glibc
Browse files Browse the repository at this point in the history
Use more Linux codepaths on any GNU libc-based system
  • Loading branch information
RemiArnaud authored Nov 13, 2018
2 parents 77fa74e + c606c5b commit 01514b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions COLLADABaseUtils/src/COLLADABUNativeString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace COLLADABU
WideCharToMultiByte( CP_ACP, 0, (LPCWSTR)wideString.c_str(), -1, dest, multibyteLength, 0, 0 );
this->assign( dest );
delete[] dest;
#elif defined (COLLADABU_OS_LINUX) || defined (COLLADABU_OS_MAC)
#elif defined (COLLADABU_OS_LINUX) || defined (COLLADABU_OS_MAC) || defined (__GLIBC__)
//# error check if this really works on linux
size_t maxStringLength = wcstombs( 0, wideString.c_str(), 0 ) + 1; // wideString.length()*MB_CUR_MAX + 1;
char* dest = new char[ maxStringLength ];
Expand All @@ -80,7 +80,7 @@ namespace COLLADABU
WideString returnValue( dest );
delete[] dest;
return returnValue;
#elif defined (COLLADABU_OS_LINUX) || defined (COLLADABU_OS_MAC)
#elif defined (COLLADABU_OS_LINUX) || defined (COLLADABU_OS_MAC) || defined (__GLIBC__)
//# error check if this really works on linux

size_t maxStringLength = length() + 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace GeneratedSaxParser
typedef unsigned int uint32;
typedef unsigned long long uint64;

#elif defined COLLADABU_OS_LINUX
#elif defined COLLADABU_OS_LINUX || defined __GLIBC__
typedef signed char sint8;
typedef signed short sint16;
typedef signed int sint32;
Expand Down

0 comments on commit 01514b7

Please sign in to comment.