From 2a36edfd86cc15829b113466845ccab759731793 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 20 Jun 2015 22:45:15 +0100 Subject: Common: Cleanup thread includes. --- src/common/thread.cpp | 17 +++++++++++++---- src/common/thread.h | 16 ++-------------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/common/thread.cpp b/src/common/thread.cpp index 8bf005857..7bbf080bc 100644 --- a/src/common/thread.cpp +++ b/src/common/thread.cpp @@ -5,11 +5,20 @@ #include "common/thread.h" #ifdef __APPLE__ -#include -#elif defined(BSD4_4) || defined(__OpenBSD__) -#include + #include #elif defined(_WIN32) -#include + #include +#else + #if defined(BSD4_4) || defined(__OpenBSD__) + #include + #else + #include + #endif + #include +#endif + +#ifndef _WIN32 + #include #endif namespace Common diff --git a/src/common/thread.h b/src/common/thread.h index 7bc419497..8255ee6d3 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -4,24 +4,12 @@ #pragma once -#include "common/common_types.h" -#include -#include +#include #include #include #include -// This may not be defined outside _WIN32 -#ifndef _WIN32 -#ifndef INFINITE -#define INFINITE 0xffffffff -#endif - -//for gettimeofday and struct time(spec|val) -#include -#include -#include -#endif +#include "common/common_types.h" // Support for C++11's thread_local keyword was surprisingly spotty in compilers until very // recently. Fortunately, thread local variables have been well supported for compilers for a while, -- cgit v1.2.3