Index: generic/nsfAPI.h =================================================================== diff -u -r7a3ce03f8d70724a621e75469908f0d3aa57ba3e -rb36642f41c9d2ff8035f9cce982789b16dd50385 --- generic/nsfAPI.h (.../nsfAPI.h) (revision 7a3ce03f8d70724a621e75469908f0d3aa57ba3e) +++ generic/nsfAPI.h (.../nsfAPI.h) (revision b36642f41c9d2ff8035f9cce982789b16dd50385) @@ -4,7 +4,21 @@ * part of the Next Scripting Framework. */ +#if !defined(likely) +# if defined(__GNUC__) && __GNUC__ > 2 +/* Use gcc branch prediction hint to minimize cost of e.g. DTrace + * ENABLED checks. + */ +# define unlikely(x) (__builtin_expect((x), 0)) +# define likely(x) (__builtin_expect((x), 1)) +# else +# define unlikely(x) (x) +# define likely(x) (x) +# endif +#endif + + enum InfomethodsubcmdIdx {InfomethodsubcmdNULL, InfomethodsubcmdArgsIdx, InfomethodsubcmdBodyIdx, InfomethodsubcmdDefinitionIdx, InfomethodsubcmdExistsIdx, InfomethodsubcmdRegistrationhandleIdx, InfomethodsubcmdDefinitionhandleIdx, InfomethodsubcmdHandleIdx, InfomethodsubcmdOriginIdx, InfomethodsubcmdParameterIdx, InfomethodsubcmdParametersyntaxIdx, InfomethodsubcmdTypeIdx, InfomethodsubcmdPreconditionIdx, InfomethodsubcmdPostconditionIdx, InfomethodsubcmdSubmethodsIdx, InfomethodsubcmdReturnsIdx}; static int ConvertToInfomethodsubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param CONST *pPtr,