1 /* types.h - Some type definitions
2 * Copyright (C) 2002, 2003, 2007, 2008, 2010 Free Software Foundation,
7 * This file is part of OpenCDK.
9 * The OpenCDK library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1 of
12 * the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
28 #ifndef HAVE_BYTE_TYPEDEF
30 typedef unsigned char byte;
31 #define HAVE_BYTE_TYPEDEF
34 #ifndef HAVE_U16_TYPEDEF
36 typedef unsigned short u16;
37 #define HAVE_U16_TYPEDEF
40 #ifndef HAVE_U32_TYPEDEF
42 typedef unsigned int u32;
43 #define HAVE_U32_TYPEDEF
47 #define DIM(v) (sizeof (v)/sizeof ((v)[0]))
48 #define DIMof(type, member) DIM(((type *)0)->member)
51 #endif /* CDK_TYPES_H */