Skip to content

Commit 5584f41

Browse files
committed
Cleanup.
1 parent 40092c8 commit 5584f41

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

src/file.cpp

+8-3
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,14 @@ namespace bx
361361

362362
bool stat(const FilePath& _filePath, FileInfo& _outFileInfo)
363363
{
364+
#if BX_CRT_NONE
365+
BX_UNUSED(_filePath, _outFileInfo);
366+
return false;
367+
#else
364368
_outFileInfo.m_size = 0;
365369
_outFileInfo.m_type = FileInfo::Count;
366370

367-
#if BX_COMPILER_MSVC
371+
# if BX_COMPILER_MSVC
368372
struct ::_stat64 st;
369373
int32_t result = ::_stat64(_filePath.get(), &st);
370374

@@ -381,7 +385,7 @@ namespace bx
381385
{
382386
_outFileInfo.m_type = FileInfo::Directory;
383387
}
384-
#else
388+
# else
385389
struct ::stat st;
386390
int32_t result = ::stat(_filePath.get(), &st);
387391
if (0 != result)
@@ -397,11 +401,12 @@ namespace bx
397401
{
398402
_outFileInfo.m_type = FileInfo::Directory;
399403
}
400-
#endif // BX_COMPILER_MSVC
404+
# endif // BX_COMPILER_MSVC
401405

402406
_outFileInfo.m_size = st.st_size;
403407

404408
return true;
409+
#endif // BX_CRT_NONE
405410
}
406411

407412
} // namespace bx

src/os.cpp

+12-6
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ namespace bx
7070
#if BX_PLATFORM_WINDOWS
7171
::Sleep(_ms);
7272
#elif BX_PLATFORM_XBOXONE \
73-
|| BX_PLATFORM_WINRT
73+
|| BX_PLATFORM_WINRT \
74+
|| BX_CRT_NONE
7475
BX_UNUSED(_ms);
7576
debugOutput("sleep is not implemented"); debugBreak();
7677
#else
@@ -85,7 +86,8 @@ namespace bx
8586
#if BX_PLATFORM_WINDOWS
8687
::SwitchToThread();
8788
#elif BX_PLATFORM_XBOXONE \
88-
|| BX_PLATFORM_WINRT
89+
|| BX_PLATFORM_WINRT \
90+
|| BX_CRT_NONE
8991
debugOutput("yield is not implemented"); debugBreak();
9092
#else
9193
::sched_yield();
@@ -224,7 +226,8 @@ namespace bx
224226
return result;
225227
#elif BX_PLATFORM_PS4 \
226228
|| BX_PLATFORM_XBOXONE \
227-
|| BX_PLATFORM_WINRT
229+
|| BX_PLATFORM_WINRT \
230+
|| BX_CRT_NONE
228231
BX_UNUSED(_name, _out, _inOutSize);
229232
return false;
230233
#else
@@ -253,7 +256,8 @@ namespace bx
253256
::SetEnvironmentVariableA(_name, _value);
254257
#elif BX_PLATFORM_PS4 \
255258
|| BX_PLATFORM_XBOXONE \
256-
|| BX_PLATFORM_WINRT
259+
|| BX_PLATFORM_WINRT \
260+
|| BX_CRT_NONE
257261
BX_UNUSED(_name, _value);
258262
#else
259263
::setenv(_name, _value, 1);
@@ -266,7 +270,8 @@ namespace bx
266270
::SetEnvironmentVariableA(_name, NULL);
267271
#elif BX_PLATFORM_PS4 \
268272
|| BX_PLATFORM_XBOXONE \
269-
|| BX_PLATFORM_WINRT
273+
|| BX_PLATFORM_WINRT \
274+
|| BX_CRT_NONE
270275
BX_UNUSED(_name);
271276
#else
272277
::unsetenv(_name);
@@ -277,7 +282,8 @@ namespace bx
277282
{
278283
#if BX_PLATFORM_PS4 \
279284
|| BX_PLATFORM_XBOXONE \
280-
|| BX_PLATFORM_WINRT
285+
|| BX_PLATFORM_WINRT \
286+
|| BX_CRT_NONE
281287
BX_UNUSED(_path);
282288
return -1;
283289
#elif BX_CRT_MSVC

0 commit comments

Comments
 (0)