[1/2] Make _CLOCKID_T_ system configurable

Message ID 20180209110524.12263-1-sebastian.huber@embedded-brains.de
State Accepted
Commit a9c8434527cc1115bd410a9d4c3b6aab56282a61
Headers show
Series
  • [1/2] Make _CLOCKID_T_ system configurable
Related show

Commit Message

Sebastian Huber Feb. 9, 2018, 11:05 a.m.
Let systems optionally provide the _CLOCKID_T_ type via
<machine/_types.h>.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>

---
 newlib/libc/include/sys/_types.h | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.12.3

Comments

Corinna Vinschen Feb. 9, 2018, 6:31 p.m. | #1
On Feb  9 12:05, Sebastian Huber wrote:
> Let systems optionally provide the _CLOCKID_T_ type via

> <machine/_types.h>.


ACK to the series.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Patch

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 72e1dc17a..d8e8c0b52 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -193,7 +193,10 @@  typedef	_CLOCK_T_	__clock_t;
 #endif
 typedef	_TIME_T_	__time_t;
 
+#ifndef __machine_clockid_t_defined
 #define	_CLOCKID_T_ 	unsigned long
+#endif
+
 typedef	_CLOCKID_T_	__clockid_t;
 
 #define	_TIMER_T_	unsigned long