[PATCH 1/3] Provide kernel space headers used by Newlib

Sebastian Huber sebastian.huber at embedded-brains.de
Mon May 22 12:16:00 UTC 2017


Update #2833.
---
 cpukit/libcsupport/Makefile.am                     |  2 ++
 .../libcsupport/include/machine/_kernel_cpuset.h   |  0
 cpukit/libcsupport/include/machine/_kernel_param.h | 29 ++++++++++++++++++++++
 cpukit/libcsupport/preinstall.am                   |  8 ++++++
 4 files changed, 39 insertions(+)
 create mode 100644 cpukit/libcsupport/include/machine/_kernel_cpuset.h
 create mode 100644 cpukit/libcsupport/include/machine/_kernel_param.h

diff --git a/cpukit/libcsupport/Makefile.am b/cpukit/libcsupport/Makefile.am
index 14b3b5a..6091f08 100644
--- a/cpukit/libcsupport/Makefile.am
+++ b/cpukit/libcsupport/Makefile.am
@@ -25,6 +25,8 @@ include_rtems_HEADERS += include/rtems/gxx_wrappers.h
 
 include_machinedir = $(includedir)/machine
 include_machine_HEADERS =
+include_machine_HEADERS += include/machine/_kernel_cpuset.h
+include_machine_HEADERS += include/machine/_kernel_param.h
 include_machine_HEADERS += include/machine/_kernel_time.h
 include_machine_HEADERS += include/machine/_kernel_types.h
 
diff --git a/cpukit/libcsupport/include/machine/_kernel_cpuset.h b/cpukit/libcsupport/include/machine/_kernel_cpuset.h
new file mode 100644
index 0000000..e69de29
diff --git a/cpukit/libcsupport/include/machine/_kernel_param.h b/cpukit/libcsupport/include/machine/_kernel_param.h
new file mode 100644
index 0000000..183bb89
--- /dev/null
+++ b/cpukit/libcsupport/include/machine/_kernel_param.h
@@ -0,0 +1,29 @@
+#include <sys/cdefs.h>
+#include <sys/errno.h>
+#include <sys/time.h>
+#include <sys/priority.h>
+
+#ifndef FALSE
+#define	FALSE	0
+#endif
+#ifndef TRUE
+#define	TRUE	1
+#endif
+
+#ifndef _BYTEORDER_PROTOTYPED
+#define	_BYTEORDER_PROTOTYPED
+__BEGIN_DECLS
+__uint32_t	 htonl(__uint32_t);
+__uint16_t	 htons(__uint16_t);
+__uint32_t	 ntohl(__uint32_t);
+__uint16_t	 ntohs(__uint16_t);
+__END_DECLS
+#endif
+
+#ifndef _BYTEORDER_FUNC_DEFINED
+#define	_BYTEORDER_FUNC_DEFINED
+#define	htonl(x)	__htonl(x)
+#define	htons(x)	__htons(x)
+#define	ntohl(x)	__ntohl(x)
+#define	ntohs(x)	__ntohs(x)
+#endif /* !_BYTEORDER_FUNC_DEFINED */
diff --git a/cpukit/libcsupport/preinstall.am b/cpukit/libcsupport/preinstall.am
index 82d7aba..074e6c1 100644
--- a/cpukit/libcsupport/preinstall.am
+++ b/cpukit/libcsupport/preinstall.am
@@ -79,6 +79,14 @@ $(PROJECT_INCLUDE)/machine/$(dirstamp):
 	@: > $(PROJECT_INCLUDE)/machine/$(dirstamp)
 PREINSTALL_DIRS += $(PROJECT_INCLUDE)/machine/$(dirstamp)
 
+$(PROJECT_INCLUDE)/machine/_kernel_cpuset.h: include/machine/_kernel_cpuset.h $(PROJECT_INCLUDE)/machine/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/machine/_kernel_cpuset.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/machine/_kernel_cpuset.h
+
+$(PROJECT_INCLUDE)/machine/_kernel_param.h: include/machine/_kernel_param.h $(PROJECT_INCLUDE)/machine/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/machine/_kernel_param.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/machine/_kernel_param.h
+
 $(PROJECT_INCLUDE)/machine/_kernel_time.h: include/machine/_kernel_time.h $(PROJECT_INCLUDE)/machine/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/machine/_kernel_time.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/machine/_kernel_time.h
-- 
1.8.4.5



More information about the devel mailing list