Add BSD guard for time_t
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This commit is contained in:
parent
f18eebf797
commit
5d0c2b87c8
|
@ -36,9 +36,10 @@
|
|||
|
||||
#include <sys/_types.h>
|
||||
|
||||
#ifndef __time_t_defined
|
||||
#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED)
|
||||
typedef _TIME_T_ time_t;
|
||||
#define __time_t_defined
|
||||
#define _TIME_T_DECLARED
|
||||
#endif
|
||||
|
||||
struct timespec {
|
||||
|
|
|
@ -36,9 +36,10 @@ typedef __suseconds_t suseconds_t;
|
|||
#define _SUSECONDS_T_DECLARED
|
||||
#endif
|
||||
|
||||
#ifndef __time_t_defined
|
||||
#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED)
|
||||
typedef _TIME_T_ time_t;
|
||||
#define __time_t_defined
|
||||
#define _TIME_T_DECLARED
|
||||
#endif
|
||||
|
||||
/* This define is also used outside of Newlib, e.g. in MinGW-w64 */
|
||||
|
|
|
@ -148,7 +148,9 @@ typedef void *_iconv_t;
|
|||
#define _CLOCK_T_ unsigned long /* clock() */
|
||||
typedef _CLOCK_T_ __clock_t;
|
||||
|
||||
#define _TIME_T_ long /* time() */
|
||||
#define _TIME_T_ long /* time() */
|
||||
typedef _TIME_T_ __time_t;
|
||||
|
||||
#define _CLOCKID_T_ unsigned long
|
||||
#define _TIMER_T_ unsigned long
|
||||
|
||||
|
|
|
@ -17,9 +17,10 @@ extern "C" {
|
|||
#include <_ansi.h>
|
||||
#include <sys/_types.h>
|
||||
|
||||
#ifndef __time_t_defined
|
||||
typedef _TIME_T_ time_t;
|
||||
#define __time_t_defined
|
||||
#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED)
|
||||
typedef _TIME_T_ time_t;
|
||||
#define __time_t_defined
|
||||
#define _TIME_T_DECLARED
|
||||
#endif
|
||||
|
||||
struct timeb
|
||||
|
|
|
@ -102,9 +102,10 @@ typedef _CLOCK_T_ clock_t;
|
|||
#define _CLOCK_T_DECLARED
|
||||
#endif
|
||||
|
||||
#ifndef __time_t_defined
|
||||
typedef _TIME_T_ time_t;
|
||||
#define __time_t_defined
|
||||
#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED)
|
||||
typedef _TIME_T_ time_t;
|
||||
#define __time_t_defined
|
||||
#define _TIME_T_DECLARED
|
||||
#endif
|
||||
|
||||
#ifndef __daddr_t_defined
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
|
||||
#include <sys/_types.h>
|
||||
|
||||
#ifndef __time_t_defined
|
||||
typedef _TIME_T_ time_t;
|
||||
#define __time_t_defined
|
||||
#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED)
|
||||
typedef _TIME_T_ time_t;
|
||||
#define __time_t_defined
|
||||
#define _TIME_T_DECLARED
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Reference in New Issue