aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2008-01-16 22:23:29 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2008-01-16 22:23:29 +0000
commit922a2f8c1cd90f6cc430857afca75c076645fb9f (patch)
tree6b51b5c3cf89b750a6f89b5c099ca74ed460bcf1 /URPM.xs
parent60edb8acb0f88bf624122a70ba2030a4ac799cb1 (diff)
downloadperl-URPM-922a2f8c1cd90f6cc430857afca75c076645fb9f.tar
perl-URPM-922a2f8c1cd90f6cc430857afca75c076645fb9f.tar.gz
perl-URPM-922a2f8c1cd90f6cc430857afca75c076645fb9f.tar.bz2
perl-URPM-922a2f8c1cd90f6cc430857afca75c076645fb9f.tar.xz
perl-URPM-922a2f8c1cd90f6cc430857afca75c076645fb9f.zip
more rpm5 work..
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs15
1 files changed, 13 insertions, 2 deletions
diff --git a/URPM.xs b/URPM.xs
index 3f48775..8da8d36 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -37,7 +37,9 @@ static inline void *_free(const void * p) {
typedef struct rpmSpec_s * Spec;
#else
#ifndef RPM_450
-#define rpmtsImportPubkey rpmcliImportPubkey
+#define rpmtsImportPubkey rpmcliImportPubkey
+#endif
+#if !defined(RPM_450) || !defined(RPM_500)
#define rpmProblemGetType(p) p->type
#define rpmProblemGetPkgNEVR(p) p->pkgNEVR
#define rpmProblemGetAltNEVR(p) p->altNEVR
@@ -55,7 +57,16 @@ typedef struct rpmSpec_s * Spec;
#include <rpm/rpmlib.h>
#ifdef RPM_500
+# define _RPMTAG_INTERNAL
#include <rpm/rpmtag.h>
+/* (peroyvind): A bit ugly, work in progress.. */
+#define int_32 evrFlags
+#define uint_16 uint16_t
+#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
#else
#include <rpm/header.h>
#endif
@@ -139,7 +150,7 @@ static const void* unused_variable(const void *p) {
}
static int rpmError_callback_data;
-#ifdef RPM_ORG
+#if defined(RPM_ORG) || defined(RPM_500)
int rpmError_callback() {
write_nocheck(rpmError_callback_data, rpmlogMessage(), strlen(rpmlogMessage()));
return RPMLOG_DEFAULT;