-
Notifications
You must be signed in to change notification settings - Fork 72
Headers
lundman edited this page Mar 1, 2013
·
2 revisions
When compiling, the headers are processed in the following order:
=== kernel ===
If you include say, sys/vnode.h
It reads the headers in the following order, the header generally has a #include_next to load the next header with the same name.
[1] zfs/include/sys/vnode.h
[2] spl/include/sys/vnode.h
[3] /System/Library/Frameworks/Kernel.framework/Headers/sys/vnode.h
=== userland ===
[1] zfs/include/sys/vnode.h
[2] zfs/lib/libspl/include/sys/vnode.h
[3] /usr/include/sys/vnode.h
So, in the case of "zfs_context.h"
[1] zfs/include/sys/zfs_context.h Used by both kernel and userland. Defines for both go here.
[K] spl/include/sys/zfs_context.h Used only by kernel
[U] zfs/lib/libspl/include/sys/zfs_context.h Used only by userland