[PATCH v2 1/4] Move RTEMS and XMK specific type definitions

Sebastian Huber sebastian.huber@embedded-brains.de
Mon Feb 18 13:06:00 GMT 2019


Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
---
 newlib/libc/include/machine/types.h           |  6 ++++++
 newlib/libc/include/sys/types.h               | 16 ----------------
 newlib/libc/sys/rtems/include/machine/types.h |  6 ++++++
 3 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/newlib/libc/include/machine/types.h b/newlib/libc/include/machine/types.h
index a5a64e675..19d0e8560 100644
--- a/newlib/libc/include/machine/types.h
+++ b/newlib/libc/include/machine/types.h
@@ -5,3 +5,9 @@
 #ifndef _SYS_TYPES_H
 #error "must be included via <sys/types.h>"
 #endif /* !_SYS_TYPES_H */
+
+#if defined(__XMK__) && defined(___int64_t_defined)
+typedef	__uint64_t	u_quad_t;
+typedef	__int64_t	quad_t;
+typedef	quad_t *	qaddr_t;
+#endif
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 65ff520c8..2685df654 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -39,22 +39,6 @@ typedef __uint64_t	u_int64_t;
 typedef int register_t;
 #define __BIT_TYPES_DEFINED__ 1
 
-#if defined(__rtems__) || defined(__XMK__)
-/*
- *  The following section is RTEMS specific and is needed to more
- *  closely match the types defined in the BSD sys/types.h.
- *  This is needed to let the RTEMS/BSD TCP/IP stack compile.
- */
-
-/* deprecated */
-#if ___int64_t_defined
-typedef	__uint64_t	u_quad_t;
-typedef	__int64_t	quad_t;
-typedef	quad_t *	qaddr_t;
-#endif
-
-#endif /* __rtems__ || __XMK__ */
-
 #ifndef __need_inttypes
 
 #define _SYS_TYPES_H
diff --git a/newlib/libc/sys/rtems/include/machine/types.h b/newlib/libc/sys/rtems/include/machine/types.h
index ab52e47ed..c550873d3 100644
--- a/newlib/libc/sys/rtems/include/machine/types.h
+++ b/newlib/libc/sys/rtems/include/machine/types.h
@@ -62,6 +62,12 @@ typedef	__lwpid_t	lwpid_t;	/* Thread ID (a.k.a. LWP) */
 #define	_LWPID_T_DECLARED
 #endif
 
+#if ___int64_t_defined
+typedef	__uint64_t	u_quad_t;
+typedef	__int64_t	quad_t;
+typedef	quad_t *	qaddr_t;
+#endif
+
 #ifndef _RLIM_T_DECLARED
 typedef	__rlim_t	rlim_t;		/* resource limit */
 #define	_RLIM_T_DECLARED
-- 
2.16.4



More information about the Newlib mailing list