Changeset a971614 in rtems-libbsd


Ignore:
Timestamp:
Aug 19, 2016, 9:18:52 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5283630d2c9d40deb0183696d278e02644fe4326, freebsd-9.3, bc2ba9a9cdc7381c2a4f2ae6ee303be636f31368
Children:
0c24e06
Parents:
69355c3
Message:

doc: Update rules to modify FreeBSD code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libbsd.txt

    r69355c3 ra971614  
    625625* `#else /* __rtems__ */`, and
    626626* `#endif /* __rtems__ */`.
     627
     628The guards must start at the begin of the line.  Examples for wrong guards:
     629
     630-------------------------------------------------------------------------------
     631static void
     632guards_must_start_at_the_begin_of_the_line(int j)
     633{
     634
     635        #ifdef __rtems__
     636        return (j + 1);
     637        #else /* __rtems__ */
     638        return (j + 2);
     639        #endif /* __rtems__ */
     640}
     641
     642static void
     643missing_rtems_comments_in_the_guards(int j)
     644{
     645
     646#ifdef __rtems__
     647        return (j + 3);
     648#else
     649        return (j + 4);
     650#endif
     651}
     652-------------------------------------------------------------------------------
     653
     654Do not disable option header includes via guards.  Instead, add an empty option
     655header, e.g. `rtemsbsd/include/rtems/bsd/local/opt_xyz.h`.  In general, provide
     656empty header files and do not guard includes.
    627657
    628658For new code use
Note: See TracChangeset for help on using the changeset viewer.