]>
git.saurik.com Git - cydia.git/blob - UICaboodle/UCPlatform.h
1 #define __STDC_LIMIT_MACROS
12 extern struct timeval _ltv
;
15 #define _trace() do { \
16 struct timeval _ctv; \
17 gettimeofday(&_ctv, NULL); \
22 fprintf(stderr, "%lu.%.6u[%f]:_trace()@%s:%u[%s]\n", \
23 _ctv.tv_sec, _ctv.tv_usec, \
24 (_ctv.tv_sec - _ltv.tv_sec) + (_ctv.tv_usec - _ltv.tv_usec) / 1000000.0, \
25 __FILE__, __LINE__, __FUNCTION__\
30 #define _assert(test) do \
32 fprintf(stderr, "_assert(%d:%s)@%s:%u[%s]\n", errno, #test, __FILE__, __LINE__, __FUNCTION__); \
37 #define _not(type) ((type) ~ (type) 0)
41 #define _label__(x) _label ## x
42 #define _label_(y) _label__(y)
43 #define _label _label_(__LINE__)
46 __attribute__((__packed__))
48 inline __attribute__((__always_inline__))
58 #define _likely(expr) \
59 __builtin_expect(expr, 1)
61 #define _unlikely(expr) \
62 __builtin_expect(expr, 0)