]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- fix missing type definitions in public header files
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 9 Sep 2012 14:00:40 +0000 (16:00 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 9 Sep 2012 14:00:40 +0000 (16:00 +0200)
Some of rpm's headers use types defined outside of them, yet do not
include required files with appriopriate typedefs. Add missing includes
to avoid guesswork when using rpm headers in external applications.

rpm-fix-missing-types-in-headers.patch [new file with mode: 0644]
rpm.spec

diff --git a/rpm-fix-missing-types-in-headers.patch b/rpm-fix-missing-types-in-headers.patch
new file mode 100644 (file)
index 0000000..a84bd99
--- /dev/null
@@ -0,0 +1,341 @@
+diff -ur rpm-5.4.10.orig/rpmio/argv.h rpm-5.4.10/rpmio/argv.h
+--- rpm-5.4.10.orig/rpmio/argv.h       2012-09-09 13:54:22.000000000 +0200
++++ rpm-5.4.10/rpmio/argv.h    2012-09-09 14:43:55.765933246 +0200
+@@ -1,6 +1,8 @@
+ #ifndef _H_ARGV_
+ #define       _H_ARGV_
++#include <stdio.h>    /* XXX FILE * typedef */
++
+ /** \ingroup rpmio
+  * \file rpmio/argv.h
+  */
+diff -ur rpm-5.4.10.orig/rpmdb/pkgio.h rpm-5.4.10/rpmdb/pkgio.h
+--- rpm-5.4.10.orig/rpmdb/pkgio.h      2012-09-09 13:54:22.000000000 +0200
++++ rpm-5.4.10/rpmdb/pkgio.h   2012-09-09 14:49:38.112587836 +0200
+@@ -6,6 +6,8 @@
+  * Methods to handle package elements.
+  */
++#include <stdint.h>   /* XXX unint32_t typedef */
++#include <rpmtypes.h>
+ #include <rpmio.h>    /* XXX FD_t typedef */
+ #include <rpmpgp.h>   /* XXX pgpDig typedef */
+ #include <rpmtag.h>   /* XXX Header typedef */
+diff -ur rpm-5.4.10.orig/lib/rpm46compat.h rpm-5.4.10/lib/rpm46compat.h
+--- rpm-5.4.10.orig/lib/rpm46compat.h  2012-09-09 13:54:23.000000000 +0200
++++ rpm-5.4.10/lib/rpm46compat.h       2012-09-09 14:25:02.645973220 +0200
+@@ -7,6 +7,7 @@
+ #ifndef       H_RPM46COMPAT
+ #define       H_RPM46COMPAT           1
++#include <stdint.h>   /* XXX unint32_t typedef */
+ #include <rpm/rpm4compat.h>
+ #include <rpmbuild.h>
+diff -ur rpm-5.4.10.orig/lib/rpm4compat.h rpm-5.4.10/lib/rpm4compat.h
+--- rpm-5.4.10.orig/lib/rpm4compat.h   2012-09-09 13:54:23.000000000 +0200
++++ rpm-5.4.10/lib/rpm4compat.h        2012-09-09 14:25:12.069306220 +0200
+@@ -42,6 +42,7 @@
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <errno.h>
++#include <stdint.h>   /* XXX unint32_t typedef */
+ #define WITH_DB
+ #define       _RPMDB_INTERNAL
+diff -ur rpm-5.4.10.orig/rpmio/rpmbf.h rpm-5.4.10/rpmio/rpmbf.h
+--- rpm-5.4.10.orig/rpmio/rpmbf.h      2012-09-09 13:54:22.000000000 +0200
++++ rpm-5.4.10/rpmio/rpmbf.h   2012-09-09 14:27:36.982634442 +0200
+@@ -1,6 +1,8 @@
+ #ifndef       H_RPMBF
+ #define       H_RPMBF
++#include <sys/types.h>        /* XXX size_t typedef */
++
+ /** \ingroup rpmio
+  * \file rpmio/rpmbf.h
+  */
+diff -ur rpm-5.4.10.orig/build/rpmbuild.h rpm-5.4.10/build/rpmbuild.h
+--- rpm-5.4.10.orig/build/rpmbuild.h   2012-09-09 13:54:23.000000000 +0200
++++ rpm-5.4.10/build/rpmbuild.h        2012-09-09 14:38:45.262610867 +0200
+@@ -7,6 +7,7 @@
+  */
+ #include <rpmiotypes.h>
++#include <rpmio.h>    /* XXX FD_t typedef */
+ #include <rpmmacro.h>
+ #include <rpmtypes.h>
+ #include <rpmtag.h>
+diff -ur rpm-5.4.10.orig/lib/rpmcli.h rpm-5.4.10/lib/rpmcli.h
+--- rpm-5.4.10.orig/lib/rpmcli.h       2012-09-09 13:54:23.000000000 +0200
++++ rpm-5.4.10/lib/rpmcli.h    2012-09-09 14:25:48.149304946 +0200
+@@ -5,6 +5,7 @@
+  * \file lib/rpmcli.h
+  */
++#include <stdint.h>   /* XXX unint32_t typedef */
+ #include <popt.h>
+ #include <rpmmacro.h>
+ #include <rpmtypes.h>
+diff -ur rpm-5.4.10.orig/rpmconstant/rpmconstant.h rpm-5.4.10/rpmconstant/rpmconstant.h
+--- rpm-5.4.10.orig/rpmconstant/rpmconstant.h  2012-09-09 13:54:24.000000000 +0200
++++ rpm-5.4.10/rpmconstant/rpmconstant.h       2012-09-09 14:25:56.589304650 +0200
+@@ -18,6 +18,8 @@
+  *
+  */
++#include <stdint.h>   /* XXX unint32_t typedef */
++
+ #include <rpmio.h>
+ #include <rpmiotypes.h>               /* XXX fnpyKey */
+ #include <rpmpgp.h>
+diff -ur rpm-5.4.10.orig/rpmdb/rpmdb.h rpm-5.4.10/rpmdb/rpmdb.h
+--- rpm-5.4.10.orig/rpmdb/rpmdb.h      2012-09-09 13:54:22.000000000 +0200
++++ rpm-5.4.10/rpmdb/rpmdb.h   2012-09-09 14:26:05.802637657 +0200
+@@ -7,6 +7,7 @@
+  * Access RPM indices using Berkeley DB interface(s).
+  */
++#include <stdint.h>   /* XXX unint32_t typedef */
+ #include <assert.h>
+ #include <mire.h>
+diff -ur rpm-5.4.10.orig/lib/rpmds.h rpm-5.4.10/lib/rpmds.h
+--- rpm-5.4.10.orig/lib/rpmds.h        2012-09-09 13:54:23.000000000 +0200
++++ rpm-5.4.10/lib/rpmds.h     2012-09-09 15:30:02.718364975 +0200
+@@ -6,7 +6,12 @@
+  * Structure(s) used for dependency tag sets.
+  */
++#include <stdio.h>    /* XXX FILE * typedef */
++#include <sys/types.h>        /* XXX size_t typedef */
++#include <rpmtypes.h>
++#include <rpmiotypes.h>
+ #include <rpmevr.h>
++#include <rpmtag.h>
+ #define       _RPMNS_INTERNAL
+ #include <rpmns.h>
+ #include <rpmps.h>
+diff -ur rpm-5.4.10.orig/rpmdb/rpmevr.h rpm-5.4.10/rpmdb/rpmevr.h
+--- rpm-5.4.10.orig/rpmdb/rpmevr.h     2012-09-09 13:54:22.000000000 +0200
++++ rpm-5.4.10/rpmdb/rpmevr.h  2012-09-09 14:39:25.295942787 +0200
+@@ -1,6 +1,8 @@
+ #ifndef H_RPMEVR
+ #define H_RPMEVR
++#include <stdint.h>   /* XXX unint32_t typedef */
++
+ /** \ingroup rpmds
+  * \file lib/rpmevr.h
+  * Structure(s) and routine(s) used for EVR parsing and comparison.
+diff -ur rpm-5.4.10.orig/lib/rpmfi.h rpm-5.4.10/lib/rpmfi.h
+--- rpm-5.4.10.orig/lib/rpmfi.h        2012-09-09 13:54:23.000000000 +0200
++++ rpm-5.4.10/lib/rpmfi.h     2012-09-09 15:32:47.761692486 +0200
+@@ -1,6 +1,11 @@
+ #ifndef H_RPMFI
+ #define H_RPMFI
++#include <sys/types.h>        /* XXX size_t typedef */
++#include <rpmtypes.h>
++#include <rpmiotypes.h>
++#include <rpmtag.h>
++
+ /** \ingroup rpmfi
+  * \file lib/rpmfi.h
+  * Structure(s) used for file info tag sets.
+diff -ur rpm-5.4.10.orig/lib/rpmgi.h rpm-5.4.10/lib/rpmgi.h
+--- rpm-5.4.10.orig/lib/rpmgi.h        2012-09-09 13:54:23.000000000 +0200
++++ rpm-5.4.10/lib/rpmgi.h     2012-09-09 15:31:45.738361341 +0200
+@@ -8,9 +8,12 @@
+ #include <fts.h>
+ #include <argv.h>
+ #include <rpmtypes.h>
++#include <rpmiotypes.h>
+ #include <rpmds.h>
+ #include <rpmte.h>
+ #include <rpmts.h>
++#include <rpmtag.h>
++#include <rpmio.h>    /* XXX FD_t typedef */
+ /**
+  */
+diff -ur rpm-5.4.10.orig/rpmio/rpmiotypes.h rpm-5.4.10/rpmio/rpmiotypes.h
+--- rpm-5.4.10.orig/rpmio/rpmiotypes.h 2012-09-09 13:54:22.000000000 +0200
++++ rpm-5.4.10/rpmio/rpmiotypes.h      2012-09-09 14:27:26.585968142 +0200
+@@ -1,6 +1,9 @@
+ #ifndef _H_RPMIOTYPES_
+ #define       _H_RPMIOTYPES_
++#include <stdlib.h>   /* XXX NULL typedef */
++#include <sys/types.h>        /* XXX size_t typedef */
++
+ /** \ingroup rpmio
+  * \file rpmio/rpmiotypes.h
+  */
+diff -ur rpm-5.4.10.orig/rpmio/rpmmacro.h rpm-5.4.10/rpmio/rpmmacro.h
+--- rpm-5.4.10.orig/rpmio/rpmmacro.h   2012-09-09 13:54:22.000000000 +0200
++++ rpm-5.4.10/rpmio/rpmmacro.h        2012-09-09 14:29:08.622631207 +0200
+@@ -1,6 +1,9 @@
+ #ifndef _H_MACRO_
+ #define       _H_MACRO_
++#include <stdio.h>    /* XXX FILE * typedef */
++#include <sys/types.h>        /* XXX size_t typedef */
++
+ /** \ingroup rpmio
+  * \file rpmio/rpmmacro.h
+  */
+diff -ur rpm-5.4.10.orig/rpmdb/rpmns.h rpm-5.4.10/rpmdb/rpmns.h
+--- rpm-5.4.10.orig/rpmdb/rpmns.h      2012-09-09 13:54:22.000000000 +0200
++++ rpm-5.4.10/rpmdb/rpmns.h   2012-09-09 15:33:08.021691772 +0200
+@@ -1,6 +1,9 @@
+ #ifndef H_RPMNS
+ #define H_RPMNS
++#include <sys/types.h>        /* XXX size_t typedef */
++#include <rpmiotypes.h>
++
+ /** \ingroup rpmds
+  * \file lib/rpmns.h
+  * Structure(s) and routine(s) used for classifying and parsing names.
+diff -ur rpm-5.4.10.orig/lib/rpmps.h rpm-5.4.10/lib/rpmps.h
+--- rpm-5.4.10.orig/lib/rpmps.h        2012-09-09 13:54:23.000000000 +0200
++++ rpm-5.4.10/lib/rpmps.h     2012-09-09 14:47:02.782593316 +0200
+@@ -1,6 +1,9 @@
+ #ifndef H_RPMPS
+ #define H_RPMPS
++#include <stdio.h>    /* XXX FILE * typedef */
++#include <rpmiotypes.h>
++
+ /** \ingroup rpmps
+  * \file lib/rpmps.h
+  * Structures and prototypes used for an "rpmps" problem set.
+diff -ur rpm-5.4.10.orig/lib/rpmrc.h rpm-5.4.10/lib/rpmrc.h
+--- rpm-5.4.10.orig/lib/rpmrc.h        2012-09-09 13:54:23.000000000 +0200
++++ rpm-5.4.10/lib/rpmrc.h     2012-09-09 14:28:54.559298370 +0200
+@@ -1,6 +1,8 @@
+ #ifndef H_RPMRC
+ #define       H_RPMRC
++#include <stdio.h>    /* XXX FILE * typedef */
++
+ /**
+  * \file lib/rpmrc.h
+  */
+diff -ur rpm-5.4.10.orig/build/rpmspec.h rpm-5.4.10/build/rpmspec.h
+--- rpm-5.4.10.orig/build/rpmspec.h    2012-09-09 13:54:23.000000000 +0200
++++ rpm-5.4.10/build/rpmspec.h 2012-09-09 15:33:14.861691530 +0200
+@@ -6,9 +6,14 @@
+  *  The Spec and Package data structures used during build.
+  */
++#include <sys/types.h>        /* XXX size_t typedef */
++#include <rpmtypes.h>
++#include <rpmiotypes.h>
+ #include <rpmevr.h>
+ #include <rpmfi.h>    /* XXX rpmfi typedef */
+ #include <rpmcli.h>   /* XXX QVA_t typedef */
++#include <rpmtag.h>
++#include <rpmio.h>    /* XXX FD_t typedef */
+ /** \ingroup rpmbuild
+  */
+diff -ur rpm-5.4.10.orig/rpmio/rpmsw.h rpm-5.4.10/rpmio/rpmsw.h
+--- rpm-5.4.10.orig/rpmio/rpmsw.h      2012-09-09 13:54:22.000000000 +0200
++++ rpm-5.4.10/rpmio/rpmsw.h   2012-09-09 15:35:35.208353246 +0200
+@@ -1,6 +1,9 @@
+ #ifndef       H_RPMSW
+ #define       H_RPMSW
++#include <stdio.h>    /* XXX FILE * typedef */
++#include <sys/time.h> /* XXX struct timeval typedef */
++
+ /** \ingroup rpmio
+  * \file rpmio/rpmsw.h
+  */
+diff -ur rpm-5.4.10.orig/rpmdb/rpmtag.h rpm-5.4.10/rpmdb/rpmtag.h
+--- rpm-5.4.10.orig/rpmdb/rpmtag.h     2012-09-09 13:54:22.000000000 +0200
++++ rpm-5.4.10/rpmdb/rpmtag.h  2012-09-09 14:26:15.429303984 +0200
+@@ -5,6 +5,7 @@
+  * \file rpmdb/rpmtag.h
+  */
++#include <stdint.h>   /* XXX unint32_t typedef */
+ #include <rpmiotypes.h>
+ #include <rpmsw.h>
+diff -ur rpm-5.4.10.orig/lib/rpmte.h rpm-5.4.10/lib/rpmte.h
+--- rpm-5.4.10.orig/lib/rpmte.h        2012-09-09 13:54:23.000000000 +0200
++++ rpm-5.4.10/lib/rpmte.h     2012-09-09 15:32:00.408360824 +0200
+@@ -5,7 +5,13 @@
+  * \file lib/rpmte.h
+  * Structures used for an "rpmte" transaction element.
+  */
++#include <stdint.h>   /* XXX unint32_t typedef */
++#include <sys/types.h>        /* XXX size_t typedef */
++#include <rpmtypes.h>
++#include <rpmiotypes.h>
+ #include <rpmfi.h>
++#include <rpmtag.h>
++#include <rpmio.h>    /* XXX FD_t typedef */
+ /**
+  */
+diff -ur rpm-5.4.10.orig/lib/rpmts.h rpm-5.4.10/lib/rpmts.h
+--- rpm-5.4.10.orig/lib/rpmts.h        2012-09-09 13:54:23.000000000 +0200
++++ rpm-5.4.10/lib/rpmts.h     2012-09-09 15:30:53.381696521 +0200
+@@ -6,9 +6,14 @@
+  * Structures and prototypes used for an "rpmts" transaction set.
+  */
+-#include "rpmps.h"
+-#include "rpmsw.h"
++#include <stdio.h>    /* XXX FILE * typedef */
++#include <stdint.h>   /* XXX unint32_t typedef */
++#include <rpmtypes.h>
++#include <rpmiotypes.h>
++#include <rpmps.h>
++#include <rpmsw.h>
+ #include <rpmpgp.h>           /* XXX pgpVSFlags */
++#include <rpmtag.h>
+ #if defined(_RPMTS_INTERNAL)
+ #include <rpmbag.h>
+ #endif
+diff -ur rpm-5.4.10.orig/lib/rpmversion.h rpm-5.4.10/lib/rpmversion.h
+--- rpm-5.4.10.orig/lib/rpmversion.h   2012-09-09 13:54:23.000000000 +0200
++++ rpm-5.4.10/lib/rpmversion.h        2012-09-09 14:29:18.352630865 +0200
+@@ -1,6 +1,8 @@
+ #ifndef __RPMVERSION_H__
+ #define __RPMVERSION_H__
++#include <stdint.h>   /* XXX unint32_t typedef */
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+diff -ur rpm-5.4.10.orig/rpmio/rpmzlog.h rpm-5.4.10/rpmio/rpmzlog.h
+--- rpm-5.4.10.orig/rpmio/rpmzlog.h    2012-09-09 13:54:22.000000000 +0200
++++ rpm-5.4.10/rpmio/rpmzlog.h 2012-09-09 14:29:32.625963694 +0200
+@@ -4,6 +4,7 @@
+ /** \ingroup rpmio
+  * \file rpmio/rpmzlog.h
+  */
++#include <stdio.h>    /* XXX FILE * typedef */
+ #include <sys/time.h>
+ /** trace log pointer */
+diff -ur rpm-5.4.10.orig/rpmio/yarn.h rpm-5.4.10/rpmio/yarn.h
+--- rpm-5.4.10.orig/rpmio/yarn.h       2012-09-09 13:54:22.000000000 +0200
++++ rpm-5.4.10/rpmio/yarn.h    2012-09-09 15:37:09.928349906 +0200
+@@ -111,6 +111,9 @@
+         handler will exit (set to NULL by default for no action)
+  */
++#include <sys/types.h>        /* XXX size_t typedef */
++#include <rpmiotypes.h>       /* XXX yarnLock typedef */
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
index a1136d237323dd14fbce6a69c64ba6b05ed821fb..c99f7b695565f315fab7d094938c84b354f9091c 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -140,6 +140,7 @@ Patch83:    %{name}-namespace-probe.patch
 Patch84:       %{name}-popt-coreutils.patch
 Patch85:       %{name}-postun-nofail.patch
 Patch86:       %{name}-silence-RPM_CHAR_TYPE.patch
+Patch87:       %{name}-fix-missing-types-in-headers.patch
 
 # Patches imported from Mandriva
 
@@ -804,6 +805,7 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch84 -p1
 %patch85 -p1
 %patch86 -p1
+%patch87 -p1
 
 %patch1000 -p1
 %patch1001 -p1
This page took 0.054854 seconds and 4 git commands to generate.