This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 06/18] Add BSD guard for time_t


On Apr 14 13:54, Sebastian Huber wrote:
> Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
> ---
>  newlib/libc/include/sys/_timespec.h    | 3 ++-
>  newlib/libc/include/sys/_timeval.h     | 3 ++-
>  newlib/libc/include/sys/_types.h       | 4 +++-
>  newlib/libc/include/sys/timeb.h        | 7 ++++---
>  newlib/libc/include/sys/types.h        | 7 ++++---
>  newlib/libc/sys/sparc64/sys/_timeval.h | 7 ++++---
>  6 files changed, 19 insertions(+), 12 deletions(-)
> 
> diff --git a/newlib/libc/include/sys/_timespec.h b/newlib/libc/include/sys/_timespec.h
> index 4a7aabc..7609e4a 100644
> --- a/newlib/libc/include/sys/_timespec.h
> +++ b/newlib/libc/include/sys/_timespec.h
> @@ -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
> [...]

Would it make sense to outsource the definition of time_t to it's
own file, e.g. sys/_time.h and just include it everywhere it's
needed?


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]