X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.0%2Fdb%2Ftdb.h;h=f7472038611df9cd25fdaff062f82eebb1a3d645;hb=c58bbe01c3c09edf315f78508e61e8924bf44eb0;hp=452ea7e658d05181fac059a38963119c57a37cb2;hpb=2d99bb8ce591f05a31464b517d85dc2bc35b2abe;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.0/db/tdb.h b/cinelerra-5.0/db/tdb.h index 452ea7e6..f7472038 100644 --- a/cinelerra-5.0/db/tdb.h +++ b/cinelerra-5.0/db/tdb.h @@ -14,9 +14,13 @@ #define entityNmIndex indecies[entityNmIdx] #define noThrow std::nothrow +#ifndef likely #define likely(x) (__builtin_constant_p(x) ? !!(x) : __builtin_expect(!!(x), 1)) #define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __builtin_expect(!!(x), 0)) +#endif +#ifndef lengthof #define lengthof(x) ((int)(sizeof(x)/sizeof(x[0]))) +#endif #if 0 inline void *operator new(size_t n) { void *vp = malloc(n); bzero(vp,n); return vp; }