Changeset 7c77211 in rtems-libbsd for libbsd.txt


Ignore:
Timestamp:
Aug 23, 2016, 1:37:01 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
c1e05b9ea378b2971e3d7704779112b4bc4296da, freebsd-9.3, 4a77611a223ea883fb548679b516d326a020d447
Children:
8e65e1b
Parents:
0c24e06
Message:

doc: Update rules to modify FreeBSD code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libbsd.txt

    r0c24e06 r7c77211  
    652652-------------------------------------------------------------------------------
    653653
    654 Do not disable option header includes via guards.  Instead, add an empty option
    655 header, e.g. `rtemsbsd/include/rtems/bsd/local/opt_xyz.h`.  In general, provide
    656 empty header files and do not guard includes.
     654The FreeBSD build and configuration system uses option header files, e.g.
     655`#include "opt_xyz.h"` in an unmodified FreeBSD file.  This include is
     656transformed by the import script into `#include <rtems/bsd/local/opt_xyz.h>`.  Do
     657not disable option header includes via guards.  Instead, add an empty option
     658header, e.g. `touch rtemsbsd/include/rtems/bsd/local/opt_xyz.h`.
     659-------------------------------------------------------------------------------
     660/* WRONG */
     661#ifndef __rtems__
     662#include <rtems/bsd/local/opt_xyz.h>
     663#endif /* __rtems__ */
     664-------------------------------------------------------------------------------
     665
     666In general, provide empty header files and do not guard includes.
    657667
    658668For new code use
    659669http://www.freebsd.org/cgi/man.cgi?query=style&apropos=0&sektion=9&manpath=FreeBSD+9.2-RELEASE&arch=default&format=html[STYLE(9)].
     670
    660671Do not format original FreeBSD code.
    661672
Note: See TracChangeset for help on using the changeset viewer.