summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-07-13 21:37:57 +0000
committerjbj <devnull@localhost>1999-07-13 21:37:57 +0000
commit8bd997f2e0d977ddde56ea4debad83197355a2c9 (patch)
treebff7739953a6a852bf857e08665c9d2d84aa3e7c
parent2f400a54b2194cc1caee95cb0a3da74f4bce1735 (diff)
downloadlibrpm-tizen-8bd997f2e0d977ddde56ea4debad83197355a2c9.tar.gz
librpm-tizen-8bd997f2e0d977ddde56ea4debad83197355a2c9.tar.bz2
librpm-tizen-8bd997f2e0d977ddde56ea4debad83197355a2c9.zip
Perl bindings need
#include <foo.h> not #include "foo.h" CVS patchset: 3143 CVS date: 1999/07/13 21:37:57
-rw-r--r--build/parseReqs.c18
-rw-r--r--lib/Makefile.am2
-rw-r--r--lib/cpio.h2
-rw-r--r--lib/dbindex.c2
-rw-r--r--lib/depends.c4
-rw-r--r--lib/depends.h13
-rw-r--r--lib/falloc.c2
-rw-r--r--lib/falloc.h8
-rw-r--r--lib/formats.c4
-rw-r--r--lib/fprint.c3
-rw-r--r--lib/fprint.h22
-rw-r--r--lib/fs.c4
-rw-r--r--lib/ftp.c6
-rw-r--r--lib/hash.c3
-rw-r--r--lib/hash.h8
-rw-r--r--lib/header.c4
-rw-r--r--lib/install.c4
-rw-r--r--lib/install.h11
-rw-r--r--lib/lookup.c2
-rw-r--r--lib/lookup.h10
-rw-r--r--lib/macro.c4
-rw-r--r--lib/md5.h16
-rw-r--r--lib/messages.c2
-rw-r--r--lib/misc.c4
-rw-r--r--lib/misc.h8
-rw-r--r--lib/oldheader.c2
-rw-r--r--lib/oldheader.h20
-rw-r--r--lib/oldrpmdb.h10
-rw-r--r--lib/package.c2
-rw-r--r--lib/problems.c4
-rw-r--r--lib/query.c2
-rw-r--r--lib/rebuilddb.c4
-rw-r--r--lib/rpmbzio.c5
-rw-r--r--lib/rpmdb.c4
-rw-r--r--lib/rpmdb.h11
-rw-r--r--lib/rpmerr.c2
-rw-r--r--lib/rpmlead.c2
-rw-r--r--lib/rpmlead.h10
-rw-r--r--lib/rpmlib.h8
-rw-r--r--lib/rpmrc.c4
-rw-r--r--lib/signature.c4
-rw-r--r--lib/signature.h10
-rw-r--r--lib/stringbuf.h8
-rw-r--r--lib/tagName.c3
-rw-r--r--lib/test.c2
-rw-r--r--lib/transaction.c4
-rw-r--r--lib/tread.c2
-rw-r--r--lib/tread.h14
-rw-r--r--lib/uninstall.c2
-rw-r--r--lib/url.c2
-rw-r--r--lib/verify.c4
-rw-r--r--po/rpm.pot38
-rw-r--r--rpmio/macro.c4
-rw-r--r--rpmio/messages.c2
-rw-r--r--rpmio/rpmerr.c2
-rw-r--r--rpmpopt4
56 files changed, 230 insertions, 131 deletions
diff --git a/build/parseReqs.c b/build/parseReqs.c
index 32fe6d860..f2a753ef8 100644
--- a/build/parseReqs.c
+++ b/build/parseReqs.c
@@ -7,21 +7,27 @@ static struct ReqComp {
int sense;
} ReqComparisons[] = {
{ "<=", RPMSENSE_LESS | RPMSENSE_EQUAL},
- { "<=S", RPMSENSE_LESS | RPMSENSE_EQUAL | RPMSENSE_SERIAL},
{ "=<", RPMSENSE_LESS | RPMSENSE_EQUAL},
- { "=<S", RPMSENSE_LESS | RPMSENSE_EQUAL | RPMSENSE_SERIAL},
{ "<", RPMSENSE_LESS},
- { "<S", RPMSENSE_LESS | RPMSENSE_SERIAL},
{ "=", RPMSENSE_EQUAL},
- { "=S", RPMSENSE_EQUAL | RPMSENSE_SERIAL},
{ ">=", RPMSENSE_GREATER | RPMSENSE_EQUAL},
- { ">=S", RPMSENSE_GREATER | RPMSENSE_EQUAL | RPMSENSE_SERIAL},
{ "=>", RPMSENSE_GREATER | RPMSENSE_EQUAL},
- { "=>S", RPMSENSE_GREATER | RPMSENSE_EQUAL | RPMSENSE_SERIAL},
{ ">", RPMSENSE_GREATER},
+
+#if defined(RPMSENSE_SERIAL)
+ { "<=S", RPMSENSE_LESS | RPMSENSE_EQUAL | RPMSENSE_SERIAL},
+ { "=<S", RPMSENSE_LESS | RPMSENSE_EQUAL | RPMSENSE_SERIAL},
+ { "<S", RPMSENSE_LESS | RPMSENSE_SERIAL},
+
+ { "=S", RPMSENSE_EQUAL | RPMSENSE_SERIAL},
+
+ { ">=S", RPMSENSE_GREATER | RPMSENSE_EQUAL | RPMSENSE_SERIAL},
+ { "=>S", RPMSENSE_GREATER | RPMSENSE_EQUAL | RPMSENSE_SERIAL},
{ ">S", RPMSENSE_GREATER | RPMSENSE_SERIAL},
+#endif /* RPMSENSE_SERIAL */
+
{ NULL, 0 },
};
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 5d236498b..35f97133a 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -14,7 +14,7 @@ pkginc_HEADERS = \
noinst_HEADERS = \
cpio.h depends.h falloc.h fprint.h hash.h install.h \
lookup.h md5.h oldheader.h oldrpmdb.h rpm_malloc.h \
- rpmdb.h rpmlead.h signature.h tread.h
+ rpmdb.h rpmlead.h signature.h
lib_LTLIBRARIES = librpm.la
librpm_la_SOURCES = \
diff --git a/lib/cpio.h b/lib/cpio.h
index 4386cc562..8099634e0 100644
--- a/lib/cpio.h
+++ b/lib/cpio.h
@@ -4,7 +4,7 @@
#include <zlib.h>
#include <sys/types.h>
-#include "rpmio.h"
+#include <rpmio.h>
/* Note the CPIO_CHECK_ERRNO bit is set only if errno is valid. These have to
be positive numbers or this setting the high bit stuff is a bad idea. */
diff --git a/lib/dbindex.c b/lib/dbindex.c
index 0f590b6bb..f1c7aceae 100644
--- a/lib/dbindex.c
+++ b/lib/dbindex.c
@@ -1,6 +1,6 @@
#include "system.h"
-#include "rpmlib.h"
+#include <rpmlib.h>
int dbiIndexSetCount(dbiIndexSet set) {
return set.count;
diff --git a/lib/depends.c b/lib/depends.c
index 2a1d0caf1..98f8015ab 100644
--- a/lib/depends.c
+++ b/lib/depends.c
@@ -1,6 +1,6 @@
#include "system.h"
-#include "rpmlib.h"
+#include <rpmlib.h>
#include "depends.h"
#include "misc.h"
@@ -805,9 +805,11 @@ int headerMatchesDepFlags(Header h, const char * reqInfo, int reqFlags) {
/* Get package information from header */
headerGetEntry(h, RPMTAG_EPOCH, &type, (void **) &epochval, &count);
if (epochval == NULL) {
+#if defined(RPMSENSE_SERIAL)
/* XXX old behavior looks fishy */
if (reqFlags & RPMSENSE_SERIAL)
return 0;
+#endif /* RPMSENSE_SERIAL */
epoch = "0";
} else {
sprintf(buf, "%d", *epochval);
diff --git a/lib/depends.h b/lib/depends.h
index 1831cca56..3543fd794 100644
--- a/lib/depends.h
+++ b/lib/depends.h
@@ -1,9 +1,7 @@
#ifndef H_DEPENDS
#define H_DEPENDS
-#include "header.h"
-
-int headerMatchesDepFlags(Header h, const char * reqInfo, int reqFlags);
+#include <header.h>
struct availablePackage {
Header h;
@@ -63,5 +61,14 @@ struct problemsSet {
int alloced;
};
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int headerMatchesDepFlags(Header h, const char * reqInfo, int reqFlags);
+
+#ifdef __cplusplus
+}
+#endif
#endif /* H_DEPENDS */
diff --git a/lib/falloc.c b/lib/falloc.c
index 38b00fea1..56b16897f 100644
--- a/lib/falloc.c
+++ b/lib/falloc.c
@@ -1,6 +1,6 @@
#include "system.h"
-#include "rpmio.h"
+#include <rpmio.h>
#include "falloc.h"
#define FA_MAGIC 0x02050920
diff --git a/lib/falloc.h b/lib/falloc.h
index 99c8d176b..46155ca12 100644
--- a/lib/falloc.h
+++ b/lib/falloc.h
@@ -17,6 +17,10 @@ struct FaPlace_s;
typedef struct FaPlace * faPlace;
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* flags here is the same as for open(2) - NULL returned on error */
faFile faOpen(char * path, int flags, int perms);
unsigned int faAlloc(faFile fa, unsigned int size); /* returns 0 on failure */
@@ -30,4 +34,8 @@ int faFcntl(faFile fa, int op, void *lip);
int faFirstOffset(faFile fa);
int faNextOffset(faFile fa, unsigned int lastOffset); /* 0 at end */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* H_FALLOC */
diff --git a/lib/formats.c b/lib/formats.c
index 70789d2b7..fbf6b06c2 100644
--- a/lib/formats.c
+++ b/lib/formats.c
@@ -1,6 +1,6 @@
#include "system.h"
-#include "rpmlib.h"
+#include <rpmlib.h>
static char * permsFormat(int_32 type, const void * data,
char * formatPrefix, int padding, int element);
@@ -173,8 +173,10 @@ static char * depflagsFormat(int_32 type, const void * data,
strcat(buf, ">");
if (anint & RPMSENSE_EQUAL)
strcat(buf, "=");
+#if defined(RPMSENSE_SERIAL)
if (anint & RPMSENSE_SERIAL)
strcat(buf, "S");
+#endif /* RPMSENSE_SERIAL */
val = malloc(5 + padding);
strcat(formatPrefix, "s");
diff --git a/lib/fprint.c b/lib/fprint.c
index feda47e70..4bf9e2bba 100644
--- a/lib/fprint.c
+++ b/lib/fprint.c
@@ -1,7 +1,6 @@
#include "system.h"
-#include "rpmlib.h"
-
+#include <rpmlib.h>
#include "fprint.h"
struct lookupCache {
diff --git a/lib/fprint.h b/lib/fprint.h
index d79a9ce8a..d1ba65ff2 100644
--- a/lib/fprint.h
+++ b/lib/fprint.h
@@ -7,6 +7,18 @@ typedef struct fingerprint_s {
const char * basename;
} fingerPrint;
+/* only if !scarceMemory */
+#define fpFree(a) free((void *)(a).basename)
+
+#define FP_EQUAL(a, b) ((&(a) == &(b)) || \
+ (((a).dev == (b).dev) && \
+ ((a).ino == (b).ino) && \
+ !strcmp((a).basename, (b).basename)))
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Be carefull with the memory... assert(*fullName == '/' || !scareMemory) */
fingerPrint fpLookup(const char * fullName, int scareMemory);
unsigned int fpHashFunction(const void * string);
@@ -15,12 +27,8 @@ int fpEqual(const void * key1, const void * key2);
void fpLookupList(const char ** fullNames, fingerPrint * fpList, int numItems,
int alreadySorted);
-/* only if !scarceMemory */
-#define fpFree(a) free((void *)(a).basename)
-
-#define FP_EQUAL(a, b) ((&(a) == &(b)) || \
- (((a).dev == (b).dev) && \
- ((a).ino == (b).ino) && \
- !strcmp((a).basename, (b).basename)))
+#ifdef __cplusplus
+}
+#endif
#endif
diff --git a/lib/fs.c b/lib/fs.c
index 9555735ce..9e5c55bdc 100644
--- a/lib/fs.c
+++ b/lib/fs.c
@@ -1,7 +1,7 @@
#include "system.h"
-#include "rpmlib.h"
-#include "rpmmacro.h"
+#include <rpmlib.h>
+#include <rpmmacro.h>
struct fsinfo {
char * mntPoint;
diff --git a/lib/ftp.c b/lib/ftp.c
index 6ddcb1b59..e86c5e55f 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -29,8 +29,8 @@ extern int h_errno;
#include <arpa/inet.h>
#include <arpa/telnet.h>
-#include "rpmlib.h"
-#include "rpmio.h"
+#include <rpmlib.h>
+#include <rpmio.h>
#if !defined(HAVE_INET_ATON)
int inet_aton(const char *cp, struct in_addr *inp);
@@ -43,7 +43,7 @@ int inet_aton(const char *cp, struct in_addr *inp);
#include "dns.h"
#endif
-#include "rpmurl.h"
+#include <rpmurl.h>
#ifdef __MINT__
# ifndef EAGAIN
diff --git a/lib/hash.c b/lib/hash.c
index 26b2d8306..34b61a8fc 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -1,7 +1,6 @@
#include "system.h"
-#include "rpmlib.h"
-
+#include <rpmlib.h>
#include "hash.h"
struct hashBucket {
diff --git a/lib/hash.h b/lib/hash.h
index 05e68fcbf..90166e21a 100644
--- a/lib/hash.h
+++ b/lib/hash.h
@@ -3,6 +3,10 @@
typedef struct hashTable_s * hashTable;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef unsigned int (*hashFunctionType)(const void * string);
typedef int (*hashEqualityType)(const void * key1, const void * key2);
@@ -21,4 +25,8 @@ int htGetEntry(hashTable ht, const void * key, void *** data, int * dataCount,
/* returns 1 if the item is present, 0 otherwise */
int htHasEntry(hashTable ht, const void * key);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/lib/header.c b/lib/header.c
index 2d06cafe0..88d04405b 100644
--- a/lib/header.c
+++ b/lib/header.c
@@ -11,8 +11,8 @@
#include <netinet/in.h>
-#include "rpmio.h"
-#include "header.h"
+#include <rpmio.h>
+#include <header.h>
#define INDEX_MALLOC_SIZE 8
diff --git a/lib/install.c b/lib/install.c
index a8e5fa055..0f1883a48 100644
--- a/lib/install.c
+++ b/lib/install.c
@@ -1,12 +1,12 @@
#include "system.h"
-#include "rpmlib.h"
+#include <rpmlib.h>
#include "cpio.h"
#include "install.h"
#include "misc.h"
#include "rpmdb.h"
-#include "rpmmacro.h"
+#include <rpmmacro.h>
struct callbackInfo {
unsigned long archiveSize;
diff --git a/lib/install.h b/lib/install.h
index b7c7606ab..564785ab6 100644
--- a/lib/install.h
+++ b/lib/install.h
@@ -1,8 +1,7 @@
#ifndef H_INSTALL
#define H_INSTALL
-#include "header.h"
-#include "rpmlib.h"
+#include <rpmlib.h>
struct sharedFile {
int mainFileNumber;
@@ -21,6 +20,10 @@ enum fileActions { FA_UNKNOWN = 0, FA_CREATE, FA_BACKUP, FA_SAVE, FA_SKIP,
FA_ALTNAME, FA_REMOVE, FA_SKIPNSTATE };
enum fileTypes { XDIR, BDEV, CDEV, SOCK, PIPE, REG, LINK } ;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int removeBinaryPackage(char * root, rpmdb db, unsigned int offset, int flags,
enum fileActions * actions, FD_t scriptFd);
int runInstScript(const char * prefix, Header h, int scriptTag, int progTag,
@@ -39,4 +42,8 @@ int installBinaryPackage(const char * rootdir, rpmdb db, FD_t fd, Header h,
struct sharedFileInfo * sharedList, FD_t scriptFd);
const char * fileActionString(enum fileActions a);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* H_INSTALL */
diff --git a/lib/lookup.c b/lib/lookup.c
index 4d7bada84..cab17bb13 100644
--- a/lib/lookup.c
+++ b/lib/lookup.c
@@ -1,7 +1,7 @@
#include "system.h"
+#include <rpmlib.h>
#include "lookup.h"
-#include "rpmlib.h"
/* 0 found matches */
/* 1 no matches */
diff --git a/lib/lookup.h b/lib/lookup.h
index 7d4a74989..010ad61c2 100644
--- a/lib/lookup.h
+++ b/lib/lookup.h
@@ -1,9 +1,17 @@
#ifndef H_LOOKUP
#define H_LOOKUP
-#include "rpmlib.h"
+#include <rpmlib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
int findMatches(rpmdb db, const char * name, const char * version,
const char * release, dbiIndexSet * matches);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/lib/macro.c b/lib/macro.c
index 3776450b0..06944ac7b 100644
--- a/lib/macro.c
+++ b/lib/macro.c
@@ -26,10 +26,10 @@ typedef int FD_t;
#define fdRead read
#define fdClose close
#else
-#include "rpmlib.h"
+#include <rpmlib.h>
#endif
-#include "rpmmacro.h"
+#include <rpmmacro.h>
struct MacroContext globalMacroContext;
diff --git a/lib/md5.h b/lib/md5.h
index cebc07360..b41be4660 100644
--- a/lib/md5.h
+++ b/lib/md5.h
@@ -14,6 +14,15 @@ struct MD5Context {
int doByteReverse;
};
+/*
+ * This is needed to make RSAREF happy on some MS-DOS compilers.
+ */
+typedef /*@abstract@*/ struct MD5Context MD5_CTX;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void rpmMD5Init(struct MD5Context *context, int brokenEndian);
void rpmMD5Update(struct MD5Context *context, unsigned char const *buf,
unsigned len);
@@ -28,9 +37,8 @@ int mdbinfile(const char *fn, unsigned char *bindigest);
int mdfileBroken(const char *fn, unsigned char *digest);
int mdbinfileBroken(const char *fn, unsigned char *bindigest);
-/*
- * This is needed to make RSAREF happy on some MS-DOS compilers.
- */
-typedef /*@abstract@*/ struct MD5Context MD5_CTX;
+#ifdef __cplusplus
+}
+#endif
#endif /* MD5_H */
diff --git a/lib/messages.c b/lib/messages.c
index c07853e0c..342ea2bce 100644
--- a/lib/messages.c
+++ b/lib/messages.c
@@ -2,7 +2,7 @@
#include <stdarg.h>
-#include "rpmlib.h"
+#include <rpmlib.h>
static int minLevel = RPMMESS_NORMAL;
diff --git a/lib/misc.c b/lib/misc.c
index f0d019a4c..20a23e4dc 100644
--- a/lib/misc.c
+++ b/lib/misc.c
@@ -1,7 +1,7 @@
#include "system.h"
-#include "rpmlib.h"
-#include "rpmmacro.h" /* XXX for rpmGetPath */
+#include <rpmlib.h>
+#include <rpmmacro.h> /* XXX for rpmGetPath */
#include "misc.h"
diff --git a/lib/misc.h b/lib/misc.h
index d26a94623..69e6d3b0a 100644
--- a/lib/misc.h
+++ b/lib/misc.h
@@ -4,6 +4,10 @@
#include <unistd.h>
#include <sys/types.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
char ** splitString(const char * str, int length, char sep);
void freeSplitString(char ** list);
void stripTrailingSlashes(char * str);
@@ -29,4 +33,8 @@ char * gidToGname(gid_t gid);
int makeTempFile(const char * prefix, /*@out@*/const char ** fnptr, /*@out@*/FD_t * fdptr);
char * currentDirectory(void); /* result needs to be freed */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* H_MISC */
diff --git a/lib/oldheader.c b/lib/oldheader.c
index cbd4d2d19..39162468a 100644
--- a/lib/oldheader.c
+++ b/lib/oldheader.c
@@ -2,7 +2,7 @@
#include <netinet/in.h>
-#include "rpmlib.h"
+#include <rpmlib.h>
#include "misc.h"
#include "oldheader.h"
diff --git a/lib/oldheader.h b/lib/oldheader.h
index e9484be30..64c0bed4c 100644
--- a/lib/oldheader.h
+++ b/lib/oldheader.h
@@ -18,12 +18,6 @@ struct oldrpmFileInfo {
int isdoc;
} ;
-void oldrpmfileFromSpecLine(char * str, struct oldrpmFileInfo * fi);
-void oldrpmfileFromInfoLine(char * path, char * state, char * str,
- struct oldrpmFileInfo * fi);
-void oldrpmfileFree(struct oldrpmFileInfo * fi);
-char * oldrpmfileToInfoStr(struct oldrpmFileInfo * fi);
-
struct oldrpmHeader {
unsigned short type, cpu;
unsigned int size;
@@ -51,10 +45,24 @@ struct oldrpmHeaderSpec {
struct oldrpmFileInfo * files;
} ;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void oldrpmfileFromSpecLine(char * str, struct oldrpmFileInfo * fi);
+void oldrpmfileFromInfoLine(char * path, char * state, char * str,
+ struct oldrpmFileInfo * fi);
+void oldrpmfileFree(struct oldrpmFileInfo * fi);
+char * oldrpmfileToInfoStr(struct oldrpmFileInfo * fi);
+
char * oldhdrReadFromStream(FD_t fd, struct oldrpmHeader * header);
char * oldhdrReadFromFile(char * filename, struct oldrpmHeader * header);
char * oldhdrParseSpec(struct oldrpmHeader * header, struct oldrpmHeaderSpec * spec);
void oldhdrFree(struct oldrpmHeader * header);
void oldhdrSpecFree(struct oldrpmHeaderSpec * spec);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* H_OLDHEADER */
diff --git a/lib/oldrpmdb.h b/lib/oldrpmdb.h
index d0884d2bc..ea08209af 100644
--- a/lib/oldrpmdb.h
+++ b/lib/oldrpmdb.h
@@ -3,7 +3,7 @@
#include <gdbm.h>
-#include "oldheader.h"
+#include <oldheader.h>
typedef enum
{
@@ -54,6 +54,10 @@ struct oldrpmdbPackageInfo
#define RPMDB_READER 1
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int oldrpmdbOpen (struct oldrpmdb *oldrpmdb);
void oldrpmdbClose (struct oldrpmdb *oldrpmdb);
struct oldrpmdbLabel *oldrpmdbGetAllLabels (struct oldrpmdb *oldrpmdb);
@@ -85,4 +89,8 @@ int oldrpmdbLabelCmp (struct oldrpmdbLabel *one, struct oldrpmdbLabel *two);
void oldrpmdbSetPrefix (char *new);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _H_OLDRPMDB */
diff --git a/lib/package.c b/lib/package.c
index 811bec927..3c94289ec 100644
--- a/lib/package.c
+++ b/lib/package.c
@@ -2,7 +2,7 @@
#include <netinet/in.h>
-#include "rpmlib.h"
+#include <rpmlib.h>
#include "misc.h"
#include "oldheader.h"
diff --git a/lib/problems.c b/lib/problems.c
index 53482b65c..38559a3e2 100644
--- a/lib/problems.c
+++ b/lib/problems.c
@@ -1,6 +1,6 @@
#include "system.h"
-#include "rpmlib.h"
+#include <rpmlib.h>
#include "depends.h"
#include "misc.h"
@@ -16,8 +16,10 @@ void printDepFlags(FILE * fp, const char * version, int flags) {
fprintf(fp, ">");
if (flags & RPMSENSE_EQUAL)
fprintf(fp, "=");
+#if defined(RPMSENSE_SERIAL)
if (flags & RPMSENSE_SERIAL)
fprintf(fp, "S");
+#endif /* RPMSENSE_SERIAL */
if (flags)
fprintf(fp, " %s", version);
diff --git a/lib/query.c b/lib/query.c
index 8e4ecfdc6..17fe75521 100644
--- a/lib/query.c
+++ b/lib/query.c
@@ -6,7 +6,7 @@
#include "build/rpmbuild.h"
#include "popt/popt.h"
-#include "rpmurl.h"
+#include <rpmurl.h>
static void printFileInfo(char * name, unsigned int size, unsigned short mode,
unsigned int mtime, unsigned short rdev,
diff --git a/lib/rebuilddb.c b/lib/rebuilddb.c
index 15b5e89d4..84a0cdb28 100644
--- a/lib/rebuilddb.c
+++ b/lib/rebuilddb.c
@@ -1,7 +1,7 @@
#include "system.h"
-#include "rpmlib.h"
-#include "rpmmacro.h" /* XXX for rpmGetPath */
+#include <rpmlib.h>
+#include <rpmmacro.h> /* XXX for rpmGetPath */
#include "rpmdb.h"
diff --git a/lib/rpmbzio.c b/lib/rpmbzio.c
index 60c4d04ba..c66f38be9 100644
--- a/lib/rpmbzio.c
+++ b/lib/rpmbzio.c
@@ -1,8 +1,7 @@
#include "system.h"
-#include "rpmlib.h"
-
-#include "rpmio.h"
+#include <rpmlib.h>
+#include <rpmio.h>
/* =============================================================== */
/* Support for BZIP2 library.
diff --git a/lib/rpmdb.c b/lib/rpmdb.c
index d8eeed7d3..1556b4021 100644
--- a/lib/rpmdb.c
+++ b/lib/rpmdb.c
@@ -4,12 +4,12 @@
#include <signal.h>
#include <sys/signal.h>
-#include "rpmlib.h"
+#include <rpmlib.h>
+#include <rpmmacro.h> /* XXX for rpmGetPath */
#include "falloc.h"
#include "fprint.h"
#include "misc.h"
-#include "rpmmacro.h" /* XXX for rpmGetPath */
#include "rpmdb.h"
/* XXX the signal handling in here is not thread safe */
diff --git a/lib/rpmdb.h b/lib/rpmdb.h
index 1090f3c0b..e4fbf7d76 100644
--- a/lib/rpmdb.h
+++ b/lib/rpmdb.h
@@ -1,12 +1,7 @@
#ifndef H_RPMDB
#define H_RPMDB
-#include "rpmlib.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
+#include <rpmlib.h>
#include "fprint.h"
/* for RPM's internal use only */
@@ -14,6 +9,10 @@ extern "C" {
#define RPMDB_FLAG_JUSTCHECK (1 << 0)
#define RPMDB_FLAG_MINIMAL (1 << 1)
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int openDatabase(const char * prefix, const char * dbpath, rpmdb *rpmdbp, int mode,
int perms, int flags);
int rpmdbRemove(rpmdb db, unsigned int offset, int tolerant);
diff --git a/lib/rpmerr.c b/lib/rpmerr.c
index 10b4ba223..fc05e7e87 100644
--- a/lib/rpmerr.c
+++ b/lib/rpmerr.c
@@ -2,7 +2,7 @@
#include <stdarg.h>
-#include "rpmlib.h"
+#include <rpmlib.h>
static struct err {
int code;
diff --git a/lib/rpmlead.c b/lib/rpmlead.c
index a858ebfca..dd0587f75 100644
--- a/lib/rpmlead.c
+++ b/lib/rpmlead.c
@@ -6,7 +6,7 @@
#include <netinet/in.h>
-#include "rpmlib.h"
+#include <rpmlib.h>
#include "rpmlead.h"
diff --git a/lib/rpmlead.h b/lib/rpmlead.h
index 8368c11d3..2de5941d3 100644
--- a/lib/rpmlead.h
+++ b/lib/rpmlead.h
@@ -1,11 +1,19 @@
#ifndef _H_RPMLEAD
#define _H_RPMLEAD
-#include "rpmlib.h"
+#include <rpmlib.h>
/* Other definitions went to rpmlib.h */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int writeLead(FD_t fd, struct rpmlead *lead);
int readLead(FD_t fd, struct rpmlead *lead);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _H_RPMLEAD */
diff --git a/lib/rpmlib.h b/lib/rpmlib.h
index a5d1c2982..a4ac39dc7 100644
--- a/lib/rpmlib.h
+++ b/lib/rpmlib.h
@@ -5,10 +5,10 @@
/* and it shouldn't need these :-( */
-#include "rpmio.h"
-#include "dbindex.h"
-#include "header.h"
-#include "popt.h" /* XXX you now need to install the popt package */
+#include <rpmio.h>
+#include <dbindex.h>
+#include <header.h>
+#include <popt.h>
#ifdef __cplusplus
extern "C" {
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index 0635458bc..105a58e44 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -8,8 +8,8 @@
#define __power_pc() 0
#endif
-#include "rpmlib.h"
-#include "rpmmacro.h"
+#include <rpmlib.h>
+#include <rpmmacro.h>
#include "misc.h"
diff --git a/lib/signature.c b/lib/signature.c
index 1ea914ec8..eb2748ad9 100644
--- a/lib/signature.c
+++ b/lib/signature.c
@@ -13,8 +13,8 @@
#include <asm/byteorder.h>
#endif
-#include "rpmlib.h"
-#include "rpmmacro.h" /* XXX for rpmGetPath */
+#include <rpmlib.h>
+#include <rpmmacro.h> /* XXX for rpmGetPath */
#include "md5.h"
#include "misc.h"
diff --git a/lib/signature.h b/lib/signature.h
index 9c87fb8bf..69a5f17b9 100644
--- a/lib/signature.h
+++ b/lib/signature.h
@@ -3,7 +3,11 @@
/* signature.h - generate and verify signatures */
-#include "header.h"
+#include <header.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
/**************************************************/
/* */
@@ -57,4 +61,8 @@ char *rpmGetPassPhrase(const char *prompt, const int sigTag);
/* Return path to pgp executable of given type, or NULL when not found */
const char *rpmDetectPGPVersion(int sigType);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* H_SIGNATURE */
diff --git a/lib/stringbuf.h b/lib/stringbuf.h
index 2be454951..958049509 100644
--- a/lib/stringbuf.h
+++ b/lib/stringbuf.h
@@ -3,6 +3,10 @@
typedef /*@abstract@*/ struct StringBufRec *StringBuf;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*@only@*/ StringBuf newStringBuf(void);
void freeStringBuf(/*@only@*/ StringBuf sb);
void truncStringBuf(StringBuf sb);
@@ -14,4 +18,8 @@ void stripTrailingBlanksStringBuf(StringBuf sb);
void appendStringBufAux(StringBuf sb, const char *s, int nl);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _STRINGBUF_H_ */
diff --git a/lib/tagName.c b/lib/tagName.c
index f5424acd6..b5f5a7cfd 100644
--- a/lib/tagName.c
+++ b/lib/tagName.c
@@ -1,5 +1,6 @@
#include "system.h"
-#include "rpmlib.h"
+
+#include <rpmlib.h>
const char *tagName(int tag)
{
diff --git a/lib/test.c b/lib/test.c
index e1e8fe26d..1824d3c0f 100644
--- a/lib/test.c
+++ b/lib/test.c
@@ -1,6 +1,6 @@
#include "system.h"
-#include "rpmlib.h"
+#include <rpmlib.h>
void main(int argc, char **argv)
{
diff --git a/lib/transaction.c b/lib/transaction.c
index 1dcb5c798..bee30a172 100644
--- a/lib/transaction.c
+++ b/lib/transaction.c
@@ -1,7 +1,7 @@
#include "system.h"
-#include "rpmlib.h"
-#include "rpmmacro.h" /* XXX for rpmGetPath */
+#include <rpmlib.h>
+#include <rpmmacro.h> /* XXX for rpmGetPath */
#include "depends.h"
#include "fprint.h"
diff --git a/lib/tread.c b/lib/tread.c
index 81c76dfd0..648b34a08 100644
--- a/lib/tread.c
+++ b/lib/tread.c
@@ -1,6 +1,6 @@
#include "system.h"
-#include "rpmio.h"
+#include <rpmio.h>
int timedRead(FD_t fd, void * bufptr, int length) {
int bytesRead;
diff --git a/lib/tread.h b/lib/tread.h
deleted file mode 100644
index 2ed531f9c..000000000
--- a/lib/tread.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef H_TREAD
-#define H_TREAD
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int timedRead(FD_t fd, void * bufptr, int length);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* H_TREAD */
diff --git a/lib/uninstall.c b/lib/uninstall.c
index 5f376c8a9..8b5a17069 100644
--- a/lib/uninstall.c
+++ b/lib/uninstall.c
@@ -1,6 +1,6 @@
#include "system.h"
-#include "rpmlib.h"
+#include <rpmlib.h>
#include "depends.h"
#include "install.h"
diff --git a/lib/url.c b/lib/url.c
index 67b829e4a..ca9da707e 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -4,7 +4,7 @@
#include "build/rpmbuild.h"
-#include "rpmurl.h"
+#include <rpmurl.h>
static struct urlstring {
const char *leadin;
diff --git a/lib/verify.c b/lib/verify.c
index e46d932a9..dde85b156 100644
--- a/lib/verify.c
+++ b/lib/verify.c
@@ -1,13 +1,13 @@
#include "system.h"
-#include "rpmlib.h"
+#include <rpmlib.h>
#include "md5.h"
#include "misc.h"
#include "install.h"
#include "build/rpmbuild.h"
-#include "rpmurl.h"
+#include <rpmurl.h>
static int _ie = 0x44332211;
static union _endian { int i; char b[4]; } *_endian = (union _endian *)&_ie;
diff --git a/po/rpm.pot b/po/rpm.pot
index 7fa631e8b..078d180fc 100644
--- a/po/rpm.pot
+++ b/po/rpm.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1999-07-10 16:50-0400\n"
+"POT-Creation-Date: 1999-07-13 17:29-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1992,28 +1992,28 @@ msgstr ""
msgid "line %d: second %%prep"
msgstr ""
-#: ../build/parseReqs.c:96
+#: ../build/parseReqs.c:102
#, c-format
msgid ""
"line %d: Dependency tokens must begin with alpha-numeric, '_' or '/': %s"
msgstr ""
-#: ../build/parseReqs.c:107
+#: ../build/parseReqs.c:113
#, c-format
msgid "line %d: File name not permitted: %s"
msgstr ""
-#: ../build/parseReqs.c:139
+#: ../build/parseReqs.c:145
#, c-format
msgid "line %d: Versioned file name not permitted: %s"
msgstr ""
-#: ../build/parseReqs.c:150
+#: ../build/parseReqs.c:156
#, c-format
msgid "line %d: Version not permitted: %s"
msgstr ""
-#: ../build/parseReqs.c:170
+#: ../build/parseReqs.c:176
#, c-format
msgid "line %d: Version required: %s"
msgstr ""
@@ -2187,11 +2187,11 @@ msgstr ""
msgid "package %s conflicts: %s\n"
msgstr ""
-#: ../lib/depends.c:869
+#: ../lib/depends.c:871
msgid "dbrecMatchesDepFlags() failed to read header"
msgstr ""
-#: ../lib/depends.c:921
+#: ../lib/depends.c:923
#, c-format
msgid "loop in prerequisite chain: %s"
msgstr ""
@@ -2593,58 +2593,58 @@ msgid ""
"only packages with major numbers <= 3 are supported by this version of RPM"
msgstr ""
-#: ../lib/problems.c:39
+#: ../lib/problems.c:41
#, c-format
msgid " is needed by %s-%s-%s\n"
msgstr ""
-#: ../lib/problems.c:42
+#: ../lib/problems.c:44
#, c-format
msgid " conflicts with %s-%s-%s\n"
msgstr ""
-#: ../lib/problems.c:68
+#: ../lib/problems.c:70
#, c-format
msgid "package %s-%s-%s is for a different architecture"
msgstr ""
-#: ../lib/problems.c:73
+#: ../lib/problems.c:75
#, c-format
msgid "package %s-%s-%s is for a different operating system"
msgstr ""
-#: ../lib/problems.c:78
+#: ../lib/problems.c:80
#, c-format
msgid "package %s-%s-%s is already installed"
msgstr ""
-#: ../lib/problems.c:83
+#: ../lib/problems.c:85
#, c-format
msgid "path %s is not relocateable for package %s-%s-%s"
msgstr ""
-#: ../lib/problems.c:88
+#: ../lib/problems.c:90
#, c-format
msgid "file %s conflicts between attemped installs of %s-%s-%s and %s-%s-%s"
msgstr ""
-#: ../lib/problems.c:94
+#: ../lib/problems.c:96
#, c-format
msgid ""
"file %s from install of %s-%s-%s conflicts with file from package %s-%s-%s"
msgstr ""
-#: ../lib/problems.c:100
+#: ../lib/problems.c:102
#, c-format
msgid "package %s-%s-%s (which is newer then %s-%s-%s) is already installed"
msgstr ""
-#: ../lib/problems.c:106
+#: ../lib/problems.c:108
#, c-format
msgid "installing package %s-%s-%s needs %ld%c on the %s filesystem"
msgstr ""
-#: ../lib/problems.c:118
+#: ../lib/problems.c:120
#, c-format
msgid "unknown error %d encountered while manipulating package %s-%s-%s"
msgstr ""
diff --git a/rpmio/macro.c b/rpmio/macro.c
index 3776450b0..06944ac7b 100644
--- a/rpmio/macro.c
+++ b/rpmio/macro.c
@@ -26,10 +26,10 @@ typedef int FD_t;
#define fdRead read
#define fdClose close
#else
-#include "rpmlib.h"
+#include <rpmlib.h>
#endif
-#include "rpmmacro.h"
+#include <rpmmacro.h>
struct MacroContext globalMacroContext;
diff --git a/rpmio/messages.c b/rpmio/messages.c
index c07853e0c..342ea2bce 100644
--- a/rpmio/messages.c
+++ b/rpmio/messages.c
@@ -2,7 +2,7 @@
#include <stdarg.h>
-#include "rpmlib.h"
+#include <rpmlib.h>
static int minLevel = RPMMESS_NORMAL;
diff --git a/rpmio/rpmerr.c b/rpmio/rpmerr.c
index 10b4ba223..fc05e7e87 100644
--- a/rpmio/rpmerr.c
+++ b/rpmio/rpmerr.c
@@ -2,7 +2,7 @@
#include <stdarg.h>
-#include "rpmlib.h"
+#include <rpmlib.h>
static struct err {
int code;
diff --git a/rpmpopt b/rpmpopt
index b7afd107c..a96be4efb 100644
--- a/rpmpopt
+++ b/rpmpopt
@@ -35,9 +35,11 @@ rpm alias --conflicts --qf \
"[%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n]"
rpm alias --obsoletes --qf '[%{OBSOLETES}\n]'
-rpm alias --prereq --qf '[%{PREREQ}\n]'
rpm alias --provides --qf '[%{PROVIDES}\n]'
+# XXX prereq output is part of requires for query
+#rpm alias --prereq --qf '[%{PREREQ}\n]'
+
rpm alias --requires --qf \
"[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]"
rpm alias -R --requires