This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH 2/4] Use external header file for kernel space types
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: newlib at sourceware dot org
- Cc: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- Date: Thu, 27 Oct 2016 08:38:15 +0200
- Subject: [PATCH 2/4] Use external header file for kernel space types
- Authentication-results: sourceware.org; auth=none
- References: <1477550297-26514-1-git-send-email-sebastian.huber@embedded-brains.de>
The FreeBSD kernel types are not used in Newlib. Provide them via an
external header file to decouple Newlib and FreeBSD updates for RTEMS.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
---
newlib/libc/sys/rtems/include/machine/_types.h | 7 -------
newlib/libc/sys/rtems/include/machine/types.h | 5 +++++
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/newlib/libc/sys/rtems/include/machine/_types.h b/newlib/libc/sys/rtems/include/machine/_types.h
index eaf162a..e1b4c64 100644
--- a/newlib/libc/sys/rtems/include/machine/_types.h
+++ b/newlib/libc/sys/rtems/include/machine/_types.h
@@ -35,11 +35,4 @@ typedef __int64_t __rlim_t; /* resource limit - intentionally */
/* signed, because of legacy code */
/* that uses -1 for RLIM_INFINITY */
-#ifdef _KERNEL
-typedef int boolean_t;
-typedef struct device *device_t;
-typedef char vm_memattr_t; /* memory attribute codes */
-typedef struct vm_page *vm_page_t;
-#endif /* _KERNEL */
-
#endif /* _MACHINE__TYPES_H */
diff --git a/newlib/libc/sys/rtems/include/machine/types.h b/newlib/libc/sys/rtems/include/machine/types.h
index 7977027..b28f923 100644
--- a/newlib/libc/sys/rtems/include/machine/types.h
+++ b/newlib/libc/sys/rtems/include/machine/types.h
@@ -77,4 +77,9 @@ typedef __uintptr_t vm_size_t;
typedef __uintmax_t rman_res_t;
+#ifdef _KERNEL
+/* Header file provided outside of Newlib */
+#include <machine/_kernel_types.h>
+#endif
+
#endif /* __BSD_VISIBLE */
--
1.8.4.5