summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bx/src/os.cpp
diff options
context:
space:
mode:
author Branimir Karadžić <branimirkaradzic@gmail.com>2017-03-29 17:09:40 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2017-03-29 17:09:40 +0200
commit49f7c99c7786ce257fae28dfeae2f8ee5810424c (patch)
tree1bbd30dd4dd48596186846c2fc77a8dc748215d2 /3rdparty/bx/src/os.cpp
parent79f22e060b2c012d628d5d1d83288c1bb6e6acef (diff)
Update BGFX and BX (nw)
Diffstat (limited to '3rdparty/bx/src/os.cpp')
-rw-r--r--3rdparty/bx/src/os.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/3rdparty/bx/src/os.cpp b/3rdparty/bx/src/os.cpp
index 5f1d45945b7..0c7e9dc9a8e 100644
--- a/3rdparty/bx/src/os.cpp
+++ b/3rdparty/bx/src/os.cpp
@@ -7,7 +7,10 @@
#include <bx/uint32_t.h>
#include <bx/string.h>
+#if !BX_PLATFORM_NONE
+
#include <stdio.h>
+#include <sys/stat.h>
#if BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT
# include <windows.h>
@@ -237,7 +240,7 @@ namespace bx
result = len != 0 && len < *_inOutSize;
if (len < *_inOutSize)
{
- strcpy(_out, ptr);
+ strlncpy(_out, len, ptr);
}
}
@@ -406,11 +409,11 @@ namespace bx
return (void*)uintptr_t(pid);
#elif BX_PLATFORM_WINDOWS
STARTUPINFO si;
- memset(&si, 0, sizeof(STARTUPINFO) );
+ memSet(&si, 0, sizeof(STARTUPINFO) );
si.cb = sizeof(STARTUPINFO);
PROCESS_INFORMATION pi;
- memset(&pi, 0, sizeof(PROCESS_INFORMATION) );
+ memSet(&pi, 0, sizeof(PROCESS_INFORMATION) );
int32_t total = 0;
for (uint32_t ii = 0; NULL != _argv[ii]; ++ii)
@@ -452,3 +455,5 @@ namespace bx
}
} // namespace bx
+
+#endif // !BX_PLATFORM_NONE