Branimir Karadžić 8 years ago
parent
commit
98b3c11a57
2 changed files with 24 additions and 26 deletions
  1. 0 25
      src/crt.cpp
  2. 24 1
      src/crtnone.cpp

+ 0 - 25
src/crt.cpp

@@ -550,28 +550,3 @@ namespace bx
 	}
 
 } // namespace bx
-
-#if BX_CRT_NONE
-extern "C" void* memcpy(void* _dst, const void* _src, size_t _numBytes)
-{
-	bx::memCopy(_dst, _src, _numBytes);
-	return _dst;
-}
-
-extern "C" void* memmove(void* _dst, const void* _src, size_t _numBytes)
-{
-	bx::memMove(_dst, _src, _numBytes);
-	return _dst;
-}
-
-extern "C" void* memset(void* _dst, int _ch, size_t _numBytes)
-{
-	bx::memSet(_dst, uint8_t(_ch), _numBytes);
-	return _dst;
-}
-
-extern "C" int32_t memcmp(const void* _lhs, const void* _rhs, size_t _numBytes)
-{
-	return bx::memCmp(_lhs, _rhs, _numBytes);
-}
-#endif // BX_CRT_NONE

+ 24 - 1
src/crtnone.cpp

@@ -9,6 +9,29 @@
 
 #if BX_CRT_NONE
 
+extern "C" void* memcpy(void* _dst, const void* _src, size_t _numBytes)
+{
+	bx::memCopy(_dst, _src, _numBytes);
+	return _dst;
+}
+
+extern "C" void* memmove(void* _dst, const void* _src, size_t _numBytes)
+{
+	bx::memMove(_dst, _src, _numBytes);
+	return _dst;
+}
+
+extern "C" void* memset(void* _dst, int _ch, size_t _numBytes)
+{
+	bx::memSet(_dst, uint8_t(_ch), _numBytes);
+	return _dst;
+}
+
+extern "C" int32_t memcmp(const void* _lhs, const void* _rhs, size_t _numBytes)
+{
+	return bx::memCmp(_lhs, _rhs, _numBytes);
+}
+
 extern "C" size_t strlen(const char* _str)
 {
 	return bx::strnlen(_str);
@@ -363,7 +386,7 @@ extern "C" FILE* popen(const char* _command, const char* _type)
 {
 	BX_UNUSED(_command, _type);
 	return NULL;
-}void*   __dso_handle = (void*) &__dso_handle;
+}
 
 extern "C" int pclose(FILE* _stream)
 {