aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2008-02-29 15:05:40 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2008-02-29 15:05:40 +0000
commitcb34d0e6c01c51d168be1d04868ab5737b30cd0f (patch)
tree63fb54f87bf1352ae06556b57193d9600314d52e
parentab4cd348fe4d18afeea04fb219fa24941773ddc4 (diff)
downloadrpmtools-cb34d0e6c01c51d168be1d04868ab5737b30cd0f.tar
rpmtools-cb34d0e6c01c51d168be1d04868ab5737b30cd0f.tar.gz
rpmtools-cb34d0e6c01c51d168be1d04868ab5737b30cd0f.tar.bz2
rpmtools-cb34d0e6c01c51d168be1d04868ab5737b30cd0f.tar.xz
rpmtools-cb34d0e6c01c51d168be1d04868ab5737b30cd0f.zip
sync with rpm5compat.h from perl-URPM (some better solution should be done)
-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) {