summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-08-23 15:37:01 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-08-23 15:37:01 +0200
commit7c77211d0f624dc909af7f39fc122d5be5ab2a28 (patch)
treea7cc5252a2f57b919a632d7a077ee13e6d204670
parentmmc: Update to FreeBSD trunk 2016-08-23 (diff)
downloadrtems-libbsd-7c77211d0f624dc909af7f39fc122d5be5ab2a28.tar.bz2
doc: Update rules to modify FreeBSD code
-rw-r--r--libbsd.txt17
1 files changed, 14 insertions, 3 deletions
diff --git a/libbsd.txt b/libbsd.txt
index 8af302fe..ac72532d 100644
--- a/libbsd.txt
+++ b/libbsd.txt
@@ -651,12 +651,23 @@ missing_rtems_comments_in_the_guards(int j)
}
-------------------------------------------------------------------------------
-Do not disable option header includes via guards. Instead, add an empty option
-header, e.g. `rtemsbsd/include/rtems/bsd/local/opt_xyz.h`. In general, provide
-empty header files and do not guard includes.
+The FreeBSD build and configuration system uses option header files, e.g.
+`#include "opt_xyz.h"` in an unmodified FreeBSD file. This include is
+transformed by the import script into `#include <rtems/bsd/local/opt_xyz.h>`. Do
+not disable option header includes via guards. Instead, add an empty option
+header, e.g. `touch rtemsbsd/include/rtems/bsd/local/opt_xyz.h`.
+-------------------------------------------------------------------------------
+/* WRONG */
+#ifndef __rtems__
+#include <rtems/bsd/local/opt_xyz.h>
+#endif /* __rtems__ */
+-------------------------------------------------------------------------------
+
+In general, provide empty header files and do not guard includes.
For new code use
http://www.freebsd.org/cgi/man.cgi?query=style&apropos=0&sektion=9&manpath=FreeBSD+9.2-RELEASE&arch=default&format=html[STYLE(9)].
+
Do not format original FreeBSD code.
== BSD Library Source