Aaron Nyholm commented on a discussion on 
freebsd/sys/dev/pci/pci_host_generic.c: 
https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/merge_requests/146#note_152257

 >  /* Generic ECAM PCIe driver */
 >  
 >  #include <sys/cdefs.h>
 > -#include "opt_platform.h"
 > +#include <rtems/bsd/local/opt_platform.h>

This change is inline with the instructions in CONTRIBUTING, 
```
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.\
```
See other examples like: 
https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/blob/7-freebsd-14/freebsd/sys/dev/sdhci/sdhci.c?ref_type=heads#L66

Another item that is changed in the files without `ifdefs` are the `#include 
<machine/rtems-bsd-kernel-space.h>` at the top of files. I actually agree with 
you that it would be beneficial to be changed to use `#ifndef __rtems__` to 
make it so no changes to the original source are made. But as it stands this is 
the current contributing style and changing that is outside the scope of this 
MR.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/merge_requests/146#note_152257
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to