[rtems-libbsd commit] libbsd.txt: Clarify rules to modify FreeBSD code

Sebastian Huber sebh at rtems.org
Wed Jul 15 07:58:23 UTC 2015


Module:    rtems-libbsd
Branch:    master
Commit:    a57dfa0dedc1f25c4dfd6e0c786a1dbf72f44a03
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=a57dfa0dedc1f25c4dfd6e0c786a1dbf72f44a03

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Jul 15 09:57:45 2015 +0200

libbsd.txt: Clarify rules to modify FreeBSD code

---

 libbsd.txt | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/libbsd.txt b/libbsd.txt
index ac44aab..06d833f 100644
--- a/libbsd.txt
+++ b/libbsd.txt
@@ -434,8 +434,9 @@ http://www.freebsd.org/cgi/man.cgi?query=kobj&sektion=9&apropos=0&manpath=FreeBS
 
 === Rules for Modifying FreeBSD Source
 
-Only add lines.  Subtract code by added `#ifndef __rtems__`.  This makes
-merging easier in the future.  For example:
+Only add lines.  If your patch contains lines starting with a '-', then this is
+wrong.  Subtract code by added `#ifndef __rtems__`.  This makes merging easier
+in the future.  For example:
 
 -------------------------------------------------------------------------------
 /* Global variables for the kernel. */
@@ -479,7 +480,16 @@ extern volatile int ticks;
 -------------------------------------------------------------------------------
 
 Add nothing (even blank lines) before or after the `__rtems__` guards.  Always
-include a `__rtems__` in the guards to make searches easy.
+include a `__rtems__` in the guards to make searches easy, so use
+
+* `#ifndef __rtems__`,
+* `#ifdef __rtems__`,
+* `#else /* __rtems__ */`, and
+* `#endif /* __rtems__ */`.
+
+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
 




More information about the vc mailing list