We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfbea03 commit cceb155Copy full SHA for cceb155
include/boost/thread/pthread/thread_data.hpp
@@ -32,6 +32,10 @@
32
# endif
33
#endif
34
35
+#ifdef __MINGW32__
36
+#include <sysinfoapi.h>
37
+#endif
38
+
39
#include <pthread.h>
40
#include <unistd.h>
41
@@ -52,7 +56,11 @@ namespace boost
52
56
// stack
53
57
void set_stack_size(std::size_t size) BOOST_NOEXCEPT {
54
58
if (size==0) return;
55
-#ifdef BOOST_THREAD_USES_GETPAGESIZE
59
60
+ SYSTEM_INFO si;
61
+ GetSystemInfo(&si);
62
+ std::size_t page_size = si.dwPageSize;
63
+#elif defined(BOOST_THREAD_USES_GETPAGESIZE)
64
std::size_t page_size = getpagesize();
65
#else
66
std::size_t page_size = ::sysconf( _SC_PAGESIZE);
0 commit comments