1 /* types.h - Some type definitions
2 * Copyright (C) 2002-2012 Free Software Foundation, Inc.
6 * This file is part of OpenCDK.
8 * The OpenCDK library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 3 of
11 * the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>
26 #ifndef HAVE_BYTE_TYPEDEF
28 typedef unsigned char byte
;
29 #define HAVE_BYTE_TYPEDEF
32 #ifndef HAVE_U16_TYPEDEF
34 typedef unsigned short u16
;
35 #define HAVE_U16_TYPEDEF
38 #ifndef HAVE_U32_TYPEDEF
40 typedef unsigned int u32
;
41 #define HAVE_U32_TYPEDEF
45 #define DIM(v) (sizeof (v)/sizeof ((v)[0]))
46 #define DIMof(type, member) DIM(((type *)0)->member)
49 #endif /* CDK_TYPES_H */