Only include the correct platform headers

This commit is contained in:
Matt Clarkson 2015-03-27 13:41:50 +00:00
parent 6880244eea
commit dd61391c5d
3 changed files with 13 additions and 0 deletions

View File

@ -13,9 +13,12 @@
// limitations under the License.
#include "benchmark/benchmark.h"
#include "internal_macros.h"
#include <sys/time.h>
#ifndef OS_WINDOWS
#include <sys/resource.h>
#endif
#include <unistd.h>
#include <cstdlib>

View File

@ -19,6 +19,10 @@
#include "commandlineflags.h"
#include "internal_macros.h"
#ifdef OS_WINDOWS
#include <Windows.h>
#endif
DECLARE_bool(color_print);
namespace benchmark {

View File

@ -13,13 +13,19 @@
// limitations under the License.
#include "sysinfo.h"
#include "internal_macros.h"
#ifdef OS_WINDOWS
#include <Shlwapi.h>
#include <Windows.h>
#else
#include <fcntl.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/sysctl.h>
#include <sys/time.h>
#include <unistd.h>
#endif
#include <cerrno>
#include <cstdio>