mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-18 04:53:06 +01:00
Fixed MinGW build.
This commit is contained in:
@@ -135,4 +135,13 @@
|
||||
# pragma warning(error:4505) // ENABLE warning C4505: '' : unreferenced local function has been removed
|
||||
#endif // BX_CONFIG_ENABLE_MSVC_LEVEL4_WARNINGS && BX_COMPILER_MSVC
|
||||
|
||||
#if BX_PLATFORM_WINDOWS
|
||||
// http://msdn.microsoft.com/en-us/library/6sehtctf.aspx
|
||||
# if !defined(WINVER) && !defined(_WIN32_WINNT)
|
||||
// Windows 2000 and above
|
||||
# define WINVER 0x0500
|
||||
# define _WIN32_WINNT 0x0500
|
||||
# endif // !defined(WINVER) && !defined(_WIN32_WINNT)
|
||||
#endif // BX_PLATFORM_WINDOWS
|
||||
|
||||
#endif // __BX_PLATFORM_H__
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
namespace bx
|
||||
{
|
||||
/// Case insensitive string compare.
|
||||
inline int32_t stricmp(const char* _a, const char* _b)
|
||||
{
|
||||
#if BX_COMPILER_MSVC
|
||||
@@ -23,6 +24,15 @@ namespace bx
|
||||
#endif // BX_COMPILER_
|
||||
}
|
||||
|
||||
///
|
||||
inline size_t strnlen(const char* _str, size_t _max)
|
||||
{
|
||||
const char* end = _str + _max;
|
||||
const char* ptr;
|
||||
for (ptr = _str; ptr < end && *ptr != '\0'; ++ptr);
|
||||
return ptr - _str;
|
||||
}
|
||||
|
||||
/// Find substring in string. Limit search to _size.
|
||||
inline const char* strnstr(const char* _str, const char* _find, size_t _size)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user