diff --git a/include/Config/sys/resource.h b/include/Config/sys/resource.h index 0b51941424a..1f4cc694b29 100644 --- a/include/Config/sys/resource.h +++ b/include/Config/sys/resource.h @@ -18,22 +18,16 @@ #include "Config/config.h" -#ifdef HAVE_SYS_RESOURCE_H +#if defined(HAVE_SYS_RESOURCE_H) && !defined(_MSC_VER) /* * In LLVM, we use sys/resource.h to use getrusage() and maybe some other * stuff. Some man pages say that you also need sys/time.h and unistd.h. * So, to be paranoid, we will try to include all three if possible. */ -#ifdef HAVE_SYS_TIME_H -#include -#endif - +#include "Config/sys/time.h" #include - -#ifdef HAVE_UNISTD_H -#include -#endif +#include "Config/unistd.h" #endif diff --git a/include/Config/sys/time.h b/include/Config/sys/time.h index 2764994717c..3e0ea1e8109 100644 --- a/include/Config/sys/time.h +++ b/include/Config/sys/time.h @@ -17,7 +17,7 @@ #include "Config/config.h" -#ifdef HAVE_SYS_TIME_H +#if defined(HAVE_SYS_TIME_H) && !defined(_MSC_VER) #include #endif diff --git a/include/llvm/Config/sys/resource.h b/include/llvm/Config/sys/resource.h index 0b51941424a..1f4cc694b29 100644 --- a/include/llvm/Config/sys/resource.h +++ b/include/llvm/Config/sys/resource.h @@ -18,22 +18,16 @@ #include "Config/config.h" -#ifdef HAVE_SYS_RESOURCE_H +#if defined(HAVE_SYS_RESOURCE_H) && !defined(_MSC_VER) /* * In LLVM, we use sys/resource.h to use getrusage() and maybe some other * stuff. Some man pages say that you also need sys/time.h and unistd.h. * So, to be paranoid, we will try to include all three if possible. */ -#ifdef HAVE_SYS_TIME_H -#include -#endif - +#include "Config/sys/time.h" #include - -#ifdef HAVE_UNISTD_H -#include -#endif +#include "Config/unistd.h" #endif diff --git a/include/llvm/Config/sys/time.h b/include/llvm/Config/sys/time.h index 2764994717c..3e0ea1e8109 100644 --- a/include/llvm/Config/sys/time.h +++ b/include/llvm/Config/sys/time.h @@ -17,7 +17,7 @@ #include "Config/config.h" -#ifdef HAVE_SYS_TIME_H +#if defined(HAVE_SYS_TIME_H) && !defined(_MSC_VER) #include #endif