Commit dd61391c by Matt Clarkson

Only include the correct platform headers

parent 6880244e
...@@ -13,9 +13,12 @@ ...@@ -13,9 +13,12 @@
// limitations under the License. // limitations under the License.
#include "benchmark/benchmark.h" #include "benchmark/benchmark.h"
#include "internal_macros.h"
#include <sys/time.h> #include <sys/time.h>
#ifndef OS_WINDOWS
#include <sys/resource.h> #include <sys/resource.h>
#endif
#include <unistd.h> #include <unistd.h>
#include <cstdlib> #include <cstdlib>
......
...@@ -19,6 +19,10 @@ ...@@ -19,6 +19,10 @@
#include "commandlineflags.h" #include "commandlineflags.h"
#include "internal_macros.h" #include "internal_macros.h"
#ifdef OS_WINDOWS
#include <Windows.h>
#endif
DECLARE_bool(color_print); DECLARE_bool(color_print);
namespace benchmark { namespace benchmark {
......
...@@ -13,13 +13,19 @@ ...@@ -13,13 +13,19 @@
// limitations under the License. // limitations under the License.
#include "sysinfo.h" #include "sysinfo.h"
#include "internal_macros.h"
#ifdef OS_WINDOWS
#include <Shlwapi.h>
#include <Windows.h>
#else
#include <fcntl.h> #include <fcntl.h>
#include <sys/resource.h> #include <sys/resource.h>
#include <sys/types.h> // this header must be included before 'sys/sysctl.h' to avoid compilation error on FreeBSD #include <sys/types.h> // this header must be included before 'sys/sysctl.h' to avoid compilation error on FreeBSD
#include <sys/sysctl.h> #include <sys/sysctl.h>
#include <sys/time.h> #include <sys/time.h>
#include <unistd.h> #include <unistd.h>
#endif
#include <cerrno> #include <cerrno>
#include <cstdio> #include <cstdio>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment