Tizen 2.0 Release
[external/libgnutls26.git] / lib / opencdk / types.h
1 /* types.h - Some type definitions
2  * Copyright (C) 2002, 2003, 2007, 2008, 2010 Free Software Foundation,
3  * Inc.
4  *
5  * Author: Timo Schulz
6  *
7  * This file is part of OpenCDK.
8  *
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.
13  *
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.
18  *
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,
22  * USA
23  *
24  */
25 #ifndef CDK_TYPES_H
26 #define CDK_TYPES_H
27
28 #ifndef HAVE_BYTE_TYPEDEF
29 #undef byte
30 typedef unsigned char byte;
31 #define HAVE_BYTE_TYPEDEF
32 #endif
33
34 #ifndef HAVE_U16_TYPEDEF
35 #undef u16
36 typedef unsigned short u16;
37 #define HAVE_U16_TYPEDEF
38 #endif
39
40 #ifndef HAVE_U32_TYPEDEF
41 #undef u32
42 typedef unsigned int u32;
43 #define HAVE_U32_TYPEDEF
44 #endif
45
46 #ifndef DIM
47 #define DIM(v) (sizeof (v)/sizeof ((v)[0]))
48 #define DIMof(type, member)   DIM(((type *)0)->member)
49 #endif
50
51 #endif /* CDK_TYPES_H */