check for either iconv or libiconv.
[gnutls.git] / lib / opencdk / types.h
blobeeddae9564b13790aba992ca2243d11a7b4bd23d
1 /* types.h - Some type definitions
2 * Copyright (C) 2002-2012 Free Software Foundation, Inc.
4 * Author: Timo Schulz
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/>
23 #ifndef CDK_TYPES_H
24 #define CDK_TYPES_H
26 #ifndef HAVE_BYTE_TYPEDEF
27 #undef byte
28 typedef unsigned char byte;
29 #define HAVE_BYTE_TYPEDEF
30 #endif
32 #ifndef HAVE_U16_TYPEDEF
33 #undef u16
34 typedef unsigned short u16;
35 #define HAVE_U16_TYPEDEF
36 #endif
38 #ifndef HAVE_U32_TYPEDEF
39 #undef u32
40 typedef unsigned int u32;
41 #define HAVE_U32_TYPEDEF
42 #endif
44 #ifndef DIM
45 #define DIM(v) (sizeof (v)/sizeof ((v)[0]))
46 #define DIMof(type, member) DIM(((type *)0)->member)
47 #endif
49 #endif /* CDK_TYPES_H */