Skip to content

Commit 1226243

Browse files
authored
Avoid to include windows.h in realtime_helpers.hpp
1 parent d54140d commit 1226243

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

include/realtime_tools/realtime_helpers.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@
3535
#include <vector>
3636

3737
#ifdef _WIN32
38-
#include <windows.h>
39-
using NATIVE_THREAD_HANDLE = HANDLE;
38+
// Here we directly use void* instead of including windows.h
39+
// and using HANDLE macro to avoid polluting all the downstream
40+
// compilation units that include the public header realtime_helpers.hpp
41+
// with problematic macros like MIN, MAX or ERROR
42+
using NATIVE_THREAD_HANDLE = void*;
4043
#else
4144
using NATIVE_THREAD_HANDLE = pthread_t;
4245
#endif

0 commit comments

Comments
 (0)