Skip to content

Commit

Permalink
Use more Linux codepaths on any GNU libc-based system
Browse files Browse the repository at this point in the history
These code paths apply / work fine on any system based on GNU libc, so
extend the checks to include also defined(__GLIBC__).
  • Loading branch information
pinotree committed Nov 11, 2018
1 parent 77fa74e commit c606c5b
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 c606c5b

Please sign in to comment.