1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13:
14:
15: 16: 17: 18: 19:
20:
21: #ifndef _LONGLONG_
22: #define _LONGLONG_
23:
24: #ifdef __cplusplus
25: extern "C" {
26: #endif
27:
28: typedef long long longlong;
29:
30: #define ltoll(a) ( (longlong)(a) )
31: #define ultoll(a) ( (longlong)(a) )
32: #define uitoll(a) ( (longlong)(a) )
33: #define lltol(a) ( (D)(a) )
34: #define ll_add(a,b) ( (a) + (b) )
35: #define ll_sub(a,b) ( (a) - (b) )
36: #define ll_mul(a,b) ( (a) * (b) )
37: #define li_mul(a,b) ( (a) * (b) )
38: #define lui_mul(a,b) ( (a) * (b) )
39: #define ll_div(a,b) ( (a) / (b) )
40: #define li_div(a,b) ( (a) / (b) )
41: #define lui_div(a,b) ( (a) / (b) )
42: #define ll_mod(a,b) ( (a) % (b) )
43: #define li_mod(a,b) ( (a) % (b) )
44: #define lui_mod(a,b) ( (a) % (b) )
45: #define ll_cmp(a,b) ( (a) - (b) )
46: #define ll_sign(a) ( (a) )
47: #define ll_neg(a) ( -(a) )
48: #define ll_inc(a) ( (*(a))++ )
49: #define ll_dec(a) ( (*(a))-- )
50:
51: #define hilo_ll(ll, h, l) ( (ll) = ((longlong)(h) << 32) | (l) )
52: #define ll_hilo(h, l, ll) ( (h) = (long)((ll) >> 32), \
53: (l) = (unsigned long)(ll) )
54:
55: #ifdef __cplusplus
56: }
57: #endif
58: #endif