Merge branch 'akpm'
[linux-2.6/next.git] / arch / powerpc / boot / types.h
blob31393d17a9c1f968288557e0d96d52264d8bfb53
1 #ifndef _TYPES_H_
2 #define _TYPES_H_
4 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
6 typedef unsigned char u8;
7 typedef unsigned short u16;
8 typedef unsigned int u32;
9 typedef unsigned long long u64;
10 typedef signed char s8;
11 typedef short s16;
12 typedef int s32;
13 typedef long long s64;
15 #define min(x,y) ({ \
16 typeof(x) _x = (x); \
17 typeof(y) _y = (y); \
18 (void) (&_x == &_y); \
19 _x < _y ? _x : _y; })
21 #define max(x,y) ({ \
22 typeof(x) _x = (x); \
23 typeof(y) _y = (y); \
24 (void) (&_x == &_y); \
25 _x > _y ? _x : _y; })
27 #endif /* _TYPES_H_ */