summaryrefslogtreecommitdiffstats
path: root/cpukit/include/machine/_kernel_param.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2023-03-13 13:33:13 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2023-03-14 08:00:11 +0100
commit2859e422b33f3169e919c247ded32049a09cbb6f (patch)
tree8d2a9184e5a21cb8b2fa9eedcae2fb657e64149c /cpukit/include/machine/_kernel_param.h
parentvalidation: Derive names from item UIDs (diff)
downloadrtems-2859e422b33f3169e919c247ded32049a09cbb6f.tar.bz2
Provide kernel space items only if needed
The kernel space parts of standard system header files were protected against misuse by a preprocessor error directive. This approach does not work well with tools such as Doxygen. Provide the kernel space items only if the required defines are present.
Diffstat (limited to 'cpukit/include/machine/_kernel_param.h')
-rw-r--r--cpukit/include/machine/_kernel_param.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/cpukit/include/machine/_kernel_param.h b/cpukit/include/machine/_kernel_param.h
index 5b381ccca5..1235d7b324 100644
--- a/cpukit/include/machine/_kernel_param.h
+++ b/cpukit/include/machine/_kernel_param.h
@@ -37,9 +37,7 @@
#include <sys/time.h>
#include <sys/priority.h>
-#if !defined(_SYS_PARAM_H_) || !defined(_KERNEL)
-#error "must be included via <sys/param.h> in kernel space"
-#endif
+#if defined(_SYS_PARAM_H_) && defined(_KERNEL)
#ifndef FALSE
#define FALSE 0
@@ -65,3 +63,7 @@ __END_DECLS
#define ntohl(x) __ntohl(x)
#define ntohs(x) __ntohs(x)
#endif /* !_BYTEORDER_FUNC_DEFINED */
+
+#else /* !_SYS_PARAM_H_ || !_KERNEL */
+#error "must be included via <sys/param.h> in kernel space"
+#endif /* _SYS_PARAM_H_ && _KERNEL */