mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Disable BX_CRT_NONE detection.
This commit is contained in:
@@ -29,12 +29,13 @@
|
||||
#define BX_CPU_X86 0
|
||||
|
||||
// C Runtime
|
||||
#define BX_CRT_MSVC 0
|
||||
#define BX_CRT_GLIBC 0
|
||||
#define BX_CRT_LIBCXX 0
|
||||
#define BX_CRT_NEWLIB 0
|
||||
#define BX_CRT_MINGW 0
|
||||
#define BX_CRT_MSVC 0
|
||||
#define BX_CRT_MUSL 0
|
||||
#define BX_CRT_NEWLIB 0
|
||||
#define BX_CRT_NONE 0
|
||||
|
||||
// Platform
|
||||
#define BX_PLATFORM_ANDROID 0
|
||||
@@ -254,15 +255,6 @@
|
||||
|| BX_PLATFORM_RPI \
|
||||
)
|
||||
|
||||
#define BX_CRT_NONE !(0 \
|
||||
|| BX_CRT_MSVC \
|
||||
|| BX_CRT_GLIBC \
|
||||
|| BX_CRT_LIBCXX \
|
||||
|| BX_CRT_NEWLIB \
|
||||
|| BX_CRT_MINGW \
|
||||
|| BX_CRT_MUSL \
|
||||
)
|
||||
|
||||
#ifndef BX_CONFIG_ENABLE_MSVC_LEVEL4_WARNINGS
|
||||
# define BX_CONFIG_ENABLE_MSVC_LEVEL4_WARNINGS 0
|
||||
#endif // BX_CONFIG_ENABLE_MSVC_LEVEL4_WARNINGS
|
||||
|
||||
11
src/crt.cpp
11
src/crt.cpp
@@ -121,7 +121,7 @@ namespace bx
|
||||
#endif // BX_CRT_NONE
|
||||
}
|
||||
|
||||
int32_t memCmp(const char* _lhs, const char* _rhs, size_t _numBytes)
|
||||
int32_t memCmpRef(const char* _lhs, const char* _rhs, size_t _numBytes)
|
||||
{
|
||||
for (
|
||||
; 0 < _numBytes && *_lhs == *_rhs
|
||||
@@ -133,6 +133,15 @@ namespace bx
|
||||
return 0 == _numBytes ? 0 : *_lhs - *_rhs;
|
||||
}
|
||||
|
||||
int32_t memCmp(const char* _lhs, const char* _rhs, size_t _numBytes)
|
||||
{
|
||||
#if BX_CRT_NONE
|
||||
return memCmpRef(_lhs, _rhs, _numBytes);
|
||||
#else
|
||||
return ::memcmp(_lhs, _rhs, _numBytes);
|
||||
#endif // BX_CRT_NONE
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
struct Param
|
||||
|
||||
Reference in New Issue
Block a user