Skip to content

Commit 977e1a9

Browse files
committed
Use dirent_portable.h only in MSVC
1 parent 60ee5fc commit 977e1a9

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

tests/numberparsingcheck.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99
#define JSON_TEST_NUMBERS
1010
#endif
1111

12-
#include "dirent_portable.h"
12+
#ifndef _MSC_VER
13+
#include <dirent.h>
14+
#else
15+
// Microsoft can't be bothered to provide standard utils.
16+
#include <dirent_portable.h>
17+
#endif
1318
#include "simdjson.h"
1419

1520
// ulp distance

tests/stringparsingcheck.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@
1212
#define JSON_TEST_STRINGS
1313
#endif
1414

15-
#include "dirent_portable.h"
15+
#ifndef _MSC_VER
16+
#include <dirent.h>
17+
#else
18+
// Microsoft can't be bothered to provide standard utils.
19+
#include <dirent_portable.h>
20+
#endif
1621
#include "simdjson.h"
1722

1823
char *fullpath;

windows/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
add_library(simdjson-windows-headers INTERFACE)
22
if(MSVC)
33
target_include_directories(simdjson-windows-headers INTERFACE .)
4-
endif()
4+
endif()

0 commit comments

Comments
 (0)