#if defined(__NetBSD__)
#pragma weak pthread_create // Do not create libpthread dependency
#endif
+#if defined(_WIN32)
+#include <windows.h>
+#endif
_LIBCPP_BEGIN_NAMESPACE_STD
if (result < 0)
return 0;
return static_cast<unsigned>(result);
+#elif defined(_WIN32)
+ SYSTEM_INFO info;
+ GetSystemInfo(&info);
+ return info.dwNumberOfProcessors;
#else // defined(CTL_HW) && defined(HW_NCPU)
// TODO: grovel through /proc or check cpuid on x86 and similar
// instructions on other architectures.