From abbd8902334e8c6409384593b4a2c81f939b47b4 Mon Sep 17 00:00:00 2001 From: Mike Barcroft Date: Wed, 21 Aug 2002 16:20:02 +0000 Subject: o Merge and into a new header called . o will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif Concept by: bde Reviewed by: jake, obrien --- include/time.h | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'include/time.h') diff --git a/include/time.h b/include/time.h index daf8e90c8c66..c317a98c2e16 100644 --- a/include/time.h +++ b/include/time.h @@ -46,6 +46,8 @@ #define _TIME_H_ #include +#include + #include #if __POSIX_VISIBLE > 0 && __POSIX_VISIBLE < 200112 || __BSD_VISIBLE @@ -63,33 +65,33 @@ #define NULL 0 #endif -#ifdef _BSD_CLOCK_T_ -typedef _BSD_CLOCK_T_ clock_t; -#undef _BSD_CLOCK_T_ +#ifndef _CLOCK_T_DECLARED +typedef __clock_t clock_t; +#define _CLOCK_T_DECLARED #endif -#ifdef _BSD_TIME_T_ -typedef _BSD_TIME_T_ time_t; -#undef _BSD_TIME_T_ +#ifndef _TIME_T_DECLARED +typedef __time_t time_t; +#define _TIME_T_DECLARED #endif -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED #endif #if __POSIX_VISIBLE >= 199309 /* * New in POSIX 1003.1b-1993. */ -#ifdef _BSD_CLOCKID_T_ -typedef _BSD_CLOCKID_T_ clockid_t; -#undef _BSD_CLOCKID_T_ +#ifndef _CLOCKID_T_DECLARED +typedef __clockid_t clockid_t; +#define _CLOCKID_T_DECLARED #endif -#ifdef _BSD_TIMER_T_ -typedef _BSD_TIMER_T_ timer_t; -#undef _BSD_TIMER_T_ +#ifndef _TIMER_T_DECLARED +typedef __timer_t timer_t; +#define _TIMER_T_DECLARED #endif #include -- cgit v1.2.3