medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 892d10035c1d5d35d0e0d2f3cbd6a318fb387563
parent 5a1d26f1d3033e019442c1d66373e2f70788f8e1
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Wed Nov 23 19:11:36 +0200

Platform headers cleanup

Diffstat:
platform_library.h | 10+++++++---
platform_mutex.h | 4+++-
platform_semaphore.h | 13+++++++------
3 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/platform_library.h b/platform_library.h @@ -1,10 +1,14 @@ #ifndef _PLATFORM_LIBRARY_H_ #define _PLATFORM_LIBRARY_H_ -#if defined( __linux__ ) || defined( __APPLE__ ) || defined( __OpenBSD__ ) -#include "unix_library.h" -#elif defined( _WIN32 ) +#include "platform.h" + +#if PLATFORM_WINDOWS #include "win32_library.h" +#elif PLATFORM_UNIX +#include "unix_library.h" +#else +#error new library #endif #endif // _PLATFORM_LIBRARY_H_ diff --git a/platform_mutex.h b/platform_mutex.h @@ -1,7 +1,9 @@ #ifndef _PLATFORM_MUTEX_H_ #define _PLATFORM_MUTEX_H_ -#if defined( __linux__ ) +#include "platform.h" + +#if PLATFORM_UNIX #include "unix_mutex.h" #else #error new platform diff --git a/platform_semaphore.h b/platform_semaphore.h @@ -1,13 +1,14 @@ -// TODO: platform_concurrency.h? #ifndef _PLATFORM_SEMAPHORE_H_ #define _PLATFORM_SEMAPHORE_H_ -#if defined( __linux__ ) -#include "linux_semaphore.h" -#elif defined( __APPLE__ ) -#include "darwin_semaphore.h" -#elif defined( _WIN32 ) +#include "platform.h" + +#if PLATFORM_WINDOWS #include "win32_semaphore.h" +#elif PLATFORM_OSX +#include "darwin_semaphore.h" +#elif PLATFORM_UNIX +#include "linux_semaphore.h" #else #error new platform #endif