aboutsummaryrefslogtreecommitdiffstats
path: root/rpm5compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'rpm5compat.h')
-rw-r--r--rpm5compat.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/rpm5compat.h b/rpm5compat.h
index e951a2f..5c2da10 100644
--- a/rpm5compat.h
+++ b/rpm5compat.h
@@ -1,21 +1,33 @@
/*
- * Copyright (c) 2008 Per Øyvind Karlsen <peroyvind@mandriva.org>
- *
- * $Id: rpm5compat.h 237744 2008-02-28 17:15:00Z peroyvind $
+ * Copyright © 2008 Per Øyvind Karlsen <peroyvind@mandriva.org>
*
+ * $Id$
*/
+
#define RPM_NULL_TYPE 0
#define RPM_CHAR_TYPE RPM_UINT8_TYPE
#define RPM_INT8_TYPE RPM_UINT8_TYPE
#define RPM_INT16_TYPE RPM_UINT16_TYPE
#define RPM_INT32_TYPE RPM_UINT32_TYPE
+#ifndef H_RPMEVR
#include <rpm/rpmevr.h>
+#endif
+#ifndef H_RPMIO
#include <rpm/rpmio.h>
+#endif
+#ifndef _H_PKGIO
#include <rpm/pkgio.h>
+#endif
+#ifndef H_RPMCB
#include <rpm/rpmcb.h>
+#endif
+#ifndef H_RPMTS
#include <rpm/rpmts.h>
+#endif
+#ifndef _H_MACRO_
#include <rpm/rpmmacro.h>
+#endif
enum hMagic {
HEADER_MAGIC_NO = 0,
@@ -30,7 +42,8 @@ typedef uint32_t * hCNT_t;
typedef uint32_t int_32;
typedef uint16_t uint_16;
typedef uint8_t byte;
-typedef union hRET_s {
+
+typedef union hRET_s {
const void * ptr;
const char ** argv;
const char * str;
@@ -45,6 +58,7 @@ static inline int headerGetEntry(Header h, int_32 tag, hTYP_t type, void ** p, h
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
int rc;
+ if (tag == RPMTAG_EPOCH) *(void **)p = NULL;
he->tag = tag;
rc = headerGet(h, he, tag);
if (rc) {