summaryrefslogtreecommitdiff
path: root/rpmdb
diff options
context:
space:
mode:
authorRalf Corsépius <corsepiu@fedoraproject.org>2007-10-24 18:38:18 +0200
committerRalf Corsépius <corsepiu@fedoraproject.org>2007-10-24 18:38:18 +0200
commit4b185fc48d9e1206624002618ff661bc1770356c (patch)
tree3819c19b8c576b194e6f2b0c25e6774bd898ff5f /rpmdb
parent7445f99b38d134ac5965ffab52ff55e611b2c28e (diff)
downloadrpm-4b185fc48d9e1206624002618ff661bc1770356c.tar.gz
rpm-4b185fc48d9e1206624002618ff661bc1770356c.tar.bz2
rpm-4b185fc48d9e1206624002618ff661bc1770356c.zip
Add rpmdb/rpmints.h.in.
Diffstat (limited to 'rpmdb')
-rw-r--r--rpmdb/header.h15
-rw-r--r--rpmdb/rpmints.h.in46
2 files changed, 47 insertions, 14 deletions
diff --git a/rpmdb/header.h b/rpmdb/header.h
index ad44494bc..bf49f1a34 100644
--- a/rpmdb/header.h
+++ b/rpmdb/header.h
@@ -80,25 +80,12 @@
/* RPM - Copyright (C) 1995-2001 Red Hat Software */
#include "rpmio.h"
+#include "rpmints.h"
#ifdef __cplusplus
extern "C" {
#endif
-#if 0 /* XXX hpux needs -Ae in CFLAGS to grok this */
-typedef long long int int_64;
-#endif
-typedef int int_32;
-typedef short int int_16;
-typedef char int_8;
-
-#if 0 /* XXX hpux needs -Ae in CFLAGS to grok this */
-typedef unsigned long long int uint_64;
-#endif
-typedef unsigned int uint_32;
-typedef unsigned short uint_16;
-typedef unsigned char uint_8;
-
/** \ingroup header
*/
typedef const char * errmsg_t;
diff --git a/rpmdb/rpmints.h.in b/rpmdb/rpmints.h.in
new file mode 100644
index 000000000..6a93b99bb
--- /dev/null
+++ b/rpmdb/rpmints.h.in
@@ -0,0 +1,46 @@
+#ifndef _RPM_RPMINTS_H
+#define _RPM_RPMINTS_H
+
+/* if rpm uses stdint.h */
+#undef __RPM_USES_STDINT_H__
+
+#ifdef __RPM_USES_STDINT_H__
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef int32_t int_32;
+typedef int16_t int_16;
+typedef int8_t int_8;
+
+typedef uint32_t uint_32;
+typedef uint16_t uint_16;
+typedef uint8_t uint_8;
+
+#ifdef __cplusplus
+}
+#endif
+
+#else
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef int int_32;
+typedef short int int_16;
+typedef char int_8;
+
+typedef unsigned int uint_32;
+typedef unsigned short uint_16;
+typedef unsigned char uint_8;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif