public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Make _CLOCK_T_ system configurable
@ 2017-08-24 13:31 Sebastian Huber
  2017-08-24 14:33 ` [PATCH 2/2] RTEMS: Use __uint64_t for _CLOCK_T_ Sebastian Huber
  2017-08-25 12:14 ` [PATCH 1/2] Make _CLOCK_T_ system configurable Corinna Vinschen
  0 siblings, 2 replies; 3+ messages in thread
From: Sebastian Huber @ 2017-08-24 13:31 UTC (permalink / raw)
  To: newlib

Let systems optionally provide the _CLOCK_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(+)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 98b93ce71..d27979c9d 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -180,7 +180,10 @@ typedef _LOCK_RECURSIVE_T _flock_t;
 typedef void *_iconv_t;
 #endif
 
+#ifndef __machine_clock_t_defined
 #define	_CLOCK_T_	unsigned long	/* clock() */
+#endif
+
 typedef	_CLOCK_T_	__clock_t;
 
 #define	_TIME_T_	long		/* time() */
-- 
2.12.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] RTEMS: Use __uint64_t for _CLOCK_T_
  2017-08-24 13:31 [PATCH 1/2] Make _CLOCK_T_ system configurable Sebastian Huber
@ 2017-08-24 14:33 ` Sebastian Huber
  2017-08-25 12:14 ` [PATCH 1/2] Make _CLOCK_T_ system configurable Corinna Vinschen
  1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Huber @ 2017-08-24 14:33 UTC (permalink / raw)
  To: newlib

This addresses:

https://devel.rtems.org/ticket/2135

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
---
 newlib/libc/sys/rtems/include/machine/_types.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/newlib/libc/sys/rtems/include/machine/_types.h b/newlib/libc/sys/rtems/include/machine/_types.h
index e1b4c6466..a30d5a3c1 100644
--- a/newlib/libc/sys/rtems/include/machine/_types.h
+++ b/newlib/libc/sys/rtems/include/machine/_types.h
@@ -28,6 +28,9 @@ typedef	unsigned long	__ino_t;
 typedef	__uint32_t	__mode_t;
 #define	__machine_mode_t_defined
 
+typedef	__uint64_t	_CLOCK_T_;
+#define	__machine_clock_t_defined
+
 typedef	int		__accmode_t;	/* access permissions */
 typedef	__uint32_t	__fixpt_t;	/* fixed point number */
 typedef	int		__lwpid_t;	/* Thread ID (a.k.a. LWP) */
-- 
2.12.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] Make _CLOCK_T_ system configurable
  2017-08-24 13:31 [PATCH 1/2] Make _CLOCK_T_ system configurable Sebastian Huber
  2017-08-24 14:33 ` [PATCH 2/2] RTEMS: Use __uint64_t for _CLOCK_T_ Sebastian Huber
@ 2017-08-25 12:14 ` Corinna Vinschen
  1 sibling, 0 replies; 3+ messages in thread
From: Corinna Vinschen @ 2017-08-25 12:14 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 878 bytes --]

On Aug 24 15:30, Sebastian Huber wrote:
> Let systems optionally provide the _CLOCK_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(+)
> 
> diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
> index 98b93ce71..d27979c9d 100644
> --- a/newlib/libc/include/sys/_types.h
> +++ b/newlib/libc/include/sys/_types.h
> @@ -180,7 +180,10 @@ typedef _LOCK_RECURSIVE_T _flock_t;
>  typedef void *_iconv_t;
>  #endif
>  
> +#ifndef __machine_clock_t_defined
>  #define	_CLOCK_T_	unsigned long	/* clock() */
> +#endif
> +
>  typedef	_CLOCK_T_	__clock_t;
>  
>  #define	_TIME_T_	long		/* time() */
> -- 
> 2.12.3

ACK


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-25 12:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-24 13:31 [PATCH 1/2] Make _CLOCK_T_ system configurable Sebastian Huber
2017-08-24 14:33 ` [PATCH 2/2] RTEMS: Use __uint64_t for _CLOCK_T_ Sebastian Huber
2017-08-25 12:14 ` [PATCH 1/2] Make _CLOCK_T_ system configurable Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).