29#include <rpm/rpmlib.h>
31#include <rpm/rpmmacro.h>
32#include <rpm/rpmlog.h>
33#include <rpm/header.h>
36#include "common/util.h"
42 pthread_mutex_t mutex;
45#ifndef HAVE_HEADERFORMAT
46# define HAVE_LIBRPM44 1
47# define headerFormat(_h, _fmt, _emsg) headerSprintf((_h),( _fmt), rpmTagTable, rpmHeaderFormats, (_emsg))
50#ifndef HAVE_RPMFREECRYPTO
51# define rpmFreeCrypto() while(0)
54#ifndef HAVE_RPMFREEFILESYSTEMS
55# define rpmFreeFilesystems() while(0)
58#define RPM_MUTEX_LOCK(mutex_ptr) \
60 int prev_cancel_state = -1; \
61 if (pthread_mutex_lock(mutex_ptr) != 0) { \
62 dE("Can't lock mutex"); \
65 pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &prev_cancel_state); \
68#define RPM_MUTEX_UNLOCK(mutex_ptr) \
70 int prev_cancel_state = -1; \
71 if (pthread_mutex_unlock(mutex_ptr) != 0) { \
72 dE("Can't unlock mutex. Aborting..."); \
75 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &prev_cancel_state); \
79int rpmErrorCb (rpmlogRec rec, rpmlogCallbackData data);
85#define DISABLE_PLUGINS(ts) rpmtsSetFlags(ts, RPMTRANS_FLAG_NOPLUGINS)
87#define DISABLE_PLUGINS(ts) rpmDefineMacro(NULL,"__plugindir \"\"", 0);
90#ifndef HAVE_RPMVERIFYFILE
91int rpmVerifyFile(
const rpmts ts,
const rpmfi fi,
92 rpmVerifyAttrs * res, rpmVerifyAttrs omitMask);
99void rpmLibsPreload(
void);
oscap debug helpers private header
Definition: rpm-helper.h:40