[patch] provide declaration for likely() and unlikely() in libcli/util/ntstatus.h (partial fix)
bradh at frogmouth.net
Tue Nov 17 22:10:30 MST 2009
libcli/util/ntstatus.h uses likely() and unlikely() for a few macros, such as
NT_STATUS_IS_OK() and NT_STATUS_IS_ERR(). My understanding of the relevant
samba code is that likely() and unlikely() are provided by
However for an external user of ntstatus.h (such as openchange), those
definitions from libreplace are not available.
The easiest solution (for me) is to just add the definitions from libreplace
into ntstatus.h. See attached patch. That is enough of a fix for openchange
needs, and I appreciate the desire to get a samba4 alpha out.
However maybe this would be better as a separate header file, since there is
another public user (ndr.h). I wasn't sure where to place such a header file in
the samba tree, or where to install it.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 970 bytes
Desc: not available
More information about the samba-technical