summaryrefslogtreecommitdiff
path: root/lib/opencdk/types.h
diff options
context:
space:
mode:
authorNikos <nmav@crystal.(none)>2008-01-13 15:21:24 +0200
committerNikos <nmav@crystal.(none)>2008-01-13 15:21:24 +0200
commita0b2d269d69a25b2611380c85377197d03092283 (patch)
tree0ae919209178f08a82a5b1818b6c71e9ff07598d /lib/opencdk/types.h
parenta3e4759117cee5d756475215437a440dc12fcc6c (diff)
downloadgnutls-a0b2d269d69a25b2611380c85377197d03092283.tar.gz
merged the openpgp branch to head\!
Diffstat (limited to 'lib/opencdk/types.h')
-rw-r--r--lib/opencdk/types.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/opencdk/types.h b/lib/opencdk/types.h
new file mode 100644
index 0000000000..c53a0850ae
--- /dev/null
+++ b/lib/opencdk/types.h
@@ -0,0 +1,44 @@
+/* types.h - Some type definitions
+ * Copyright (C) 2002, 2003, 2007 Timo Schulz
+ *
+ * This file is part of OpenCDK.
+ *
+ * OpenCDK is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * OpenCDK is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+#ifndef CDK_TYPES_H
+#define CDK_TYPES_H
+
+#include <gcrypt.h>
+
+#ifndef HAVE_BYTE_TYPEDEF
+# undef byte
+ typedef unsigned char byte;
+# define HAVE_BYTE_TYPEDEF
+#endif
+
+#ifndef HAVE_U16_TYPEDEF
+# undef u16
+ typedef unsigned short u16;
+# define HAVE_U16_TYPEDEF
+#endif
+
+#ifndef HAVE_U32_TYPEDEF
+# undef u32
+ typedef unsigned int u32;
+# define HAVE_U32_TYPEDEF
+#endif
+
+#ifndef DIM
+# define DIM(v) (sizeof (v)/sizeof ((v)[0]))
+# define DIMof(type, member) DIM(((type *)0)->member)
+#endif
+
+#endif /* CDK_TYPES_H */