rsys

Basic data structures and low-level features
git clone git://git.meso-star.fr/rsys.git
Log | Files | Refs | README | LICENSE

commit a68343f8673a400f00ee2fde12bacf7fa864f627
parent b390bf3b6cf70c417ad2f5fa2df0fa8e0461c68b
Author: vaplv <vaplv@free.fr>
Date:   Sat, 14 Dec 2013 16:25:41 +0100

Fix clock time POSIX support

Diffstat:
Msrc/CMakeLists.txt | 1-
Msrc/clock_time.h | 14+-------------
Msrc/rsys.h | 2++
3 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt @@ -20,7 +20,6 @@ set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG") if(CMAKE_USE_PTHREADS_INIT) add_definitions(-DRSYS_USE_PTHREADS) endif() -add_definitions(-D_POSIX_C_SOURCE=200112L) ################################################################################ # Configure some generated files diff --git a/src/clock_time.h b/src/clock_time.h @@ -2,19 +2,7 @@ #define TIME_H #include "rsys.h" -#if !defined(PLATFORM_UNIX) \ - || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE < 200112L) - #error "Unsupported platform" -#endif - -#ifdef _POSIX_C_SOURCE - #include <time.h> -#else - #define _POSIX_C_SOURCE 200112L - #include <time.h> - #undef _POSIX_C_SOURCE -#endif - +#include <time.h> #include <stddef.h> typedef struct timespec time_T; diff --git a/src/rsys.h b/src/rsys.h @@ -9,6 +9,8 @@ #error "Unsupported compiler" #endif +#define _POSIX_C_SOURCE 200112L + #include "platform.h" #include <stdint.h> #include <stddef.h>