The following commit has been merged in the master branch:
commit 5d1099ae03048739add513ceb52c1773bb9e0e7e
Author: Guillem Jover <[email protected]>
Date:   Mon Feb 22 19:03:38 2010 +0100

    Header files should not include <config.h> and <compat.h>
    
    Those files are internal to the build, and should not be exposed, as
    this will cause problems once we ship a libdpkg-dev, it also helps
    having them explicitly in the .c and .cc files to avoid accidents like
    the one fixed by commit 0043d020cf7aafe3e253c6d5c9afb93521971e60.

diff --git a/lib/dpkg/ar.h b/lib/dpkg/ar.h
index 0aa64f4..367ac72 100644
--- a/lib/dpkg/ar.h
+++ b/lib/dpkg/ar.h
@@ -21,9 +21,6 @@
 #ifndef LIBDPKG_AR_H
 #define LIBDPKG_AR_H
 
-#include <config.h>
-#include <compat.h>
-
 #include <ar.h>
 
 #include <dpkg/macros.h>
diff --git a/lib/dpkg/pkg-array.h b/lib/dpkg/pkg-array.h
index 8f3caef..68724c3 100644
--- a/lib/dpkg/pkg-array.h
+++ b/lib/dpkg/pkg-array.h
@@ -21,9 +21,6 @@
 #ifndef LIBDPKG_PKG_ARRAY_H
 #define LIBDPKG_PKG_ARRAY_H
 
-#include <config.h>
-#include <compat.h>
-
 #include <dpkg/dpkg-db.h>
 #include <dpkg/pkg.h>
 
diff --git a/lib/dpkg/pkg-list.h b/lib/dpkg/pkg-list.h
index dbe85f7..bbf26f3 100644
--- a/lib/dpkg/pkg-list.h
+++ b/lib/dpkg/pkg-list.h
@@ -21,9 +21,6 @@
 #ifndef LIBDPKG_PKG_LIST_H
 #define LIBDPKG_PKG_LIST_H
 
-#include <config.h>
-#include <compat.h>
-
 #include <dpkg/dpkg-db.h>
 
 DPKG_BEGIN_DECLS
diff --git a/lib/dpkg/test.h b/lib/dpkg/test.h
index e703aea..5e8f1ad 100644
--- a/lib/dpkg/test.h
+++ b/lib/dpkg/test.h
@@ -21,9 +21,6 @@
 #ifndef LIBDPKG_TEST_H
 #define LIBDPKG_TEST_H
 
-#include <config.h>
-#include <compat.h>
-
 #include <assert.h>
 #include <string.h>
 
diff --git a/lib/dpkg/test/t-ar.c b/lib/dpkg/test/t-ar.c
index cd4a959..c7cfd88 100644
--- a/lib/dpkg/test/t-ar.c
+++ b/lib/dpkg/test/t-ar.c
@@ -18,6 +18,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
+#include <compat.h>
+
 #include <dpkg/test.h>
 #include <dpkg/ar.h>
 
diff --git a/lib/dpkg/test/t-buffer.c b/lib/dpkg/test/t-buffer.c
index 3687d3a..4df8ccc 100644
--- a/lib/dpkg/test/t-buffer.c
+++ b/lib/dpkg/test/t-buffer.c
@@ -18,6 +18,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
+#include <compat.h>
+
 #include <dpkg/test.h>
 #include <dpkg/buffer.h>
 
diff --git a/lib/dpkg/test/t-command.c b/lib/dpkg/test/t-command.c
index 584e2d6..5256913 100644
--- a/lib/dpkg/test/t-command.c
+++ b/lib/dpkg/test/t-command.c
@@ -18,6 +18,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
+#include <compat.h>
+
 #include <dpkg/test.h>
 #include <dpkg/command.h>
 
diff --git a/lib/dpkg/test/t-macros.c b/lib/dpkg/test/t-macros.c
index e9d860d..1616a9e 100644
--- a/lib/dpkg/test/t-macros.c
+++ b/lib/dpkg/test/t-macros.c
@@ -18,6 +18,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
+#include <compat.h>
+
 #include <dpkg/test.h>
 #include <dpkg/macros.h>
 
diff --git a/lib/dpkg/test/t-path.c b/lib/dpkg/test/t-path.c
index 318b378..4ff41fc 100644
--- a/lib/dpkg/test/t-path.c
+++ b/lib/dpkg/test/t-path.c
@@ -18,6 +18,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
+#include <compat.h>
+
 #include <dpkg/test.h>
 #include <dpkg/path.h>
 
diff --git a/lib/dpkg/test/t-pkg-list.c b/lib/dpkg/test/t-pkg-list.c
index b1815c1..e7fa22a 100644
--- a/lib/dpkg/test/t-pkg-list.c
+++ b/lib/dpkg/test/t-pkg-list.c
@@ -18,6 +18,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
+#include <compat.h>
+
 #include <dpkg/test.h>
 #include <dpkg/dpkg-db.h>
 #include <dpkg/pkg-list.h>
diff --git a/lib/dpkg/test/t-pkg-queue.c b/lib/dpkg/test/t-pkg-queue.c
index ece9a04..92528d9 100644
--- a/lib/dpkg/test/t-pkg-queue.c
+++ b/lib/dpkg/test/t-pkg-queue.c
@@ -18,6 +18,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
+#include <compat.h>
+
 #include <dpkg/test.h>
 #include <dpkg/dpkg-db.h>
 #include <dpkg/pkg-queue.h>
diff --git a/lib/dpkg/test/t-pkginfo.c b/lib/dpkg/test/t-pkginfo.c
index 2c9a0c6..e6e3abc 100644
--- a/lib/dpkg/test/t-pkginfo.c
+++ b/lib/dpkg/test/t-pkginfo.c
@@ -18,6 +18,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
+#include <compat.h>
+
 #include <dpkg/test.h>
 #include <dpkg/dpkg-db.h>
 
diff --git a/lib/dpkg/test/t-string.c b/lib/dpkg/test/t-string.c
index a1311ff..eb651f1 100644
--- a/lib/dpkg/test/t-string.c
+++ b/lib/dpkg/test/t-string.c
@@ -18,6 +18,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
+#include <compat.h>
+
 #include <dpkg/test.h>
 #include <dpkg/string.h>
 
diff --git a/lib/dpkg/test/t-test.c b/lib/dpkg/test/t-test.c
index 53659a1..5b87fcd 100644
--- a/lib/dpkg/test/t-test.c
+++ b/lib/dpkg/test/t-test.c
@@ -18,6 +18,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
+#include <compat.h>
+
 #include <dpkg/test.h>
 
 static void
diff --git a/lib/dpkg/test/t-varbuf.c b/lib/dpkg/test/t-varbuf.c
index 798a33a..cc1772d 100644
--- a/lib/dpkg/test/t-varbuf.c
+++ b/lib/dpkg/test/t-varbuf.c
@@ -18,6 +18,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
+#include <compat.h>
+
 #include <dpkg/test.h>
 #include <dpkg/varbuf.h>
 
diff --git a/lib/dpkg/test/t-version.c b/lib/dpkg/test/t-version.c
index 9998758..8355c6d 100644
--- a/lib/dpkg/test/t-version.c
+++ b/lib/dpkg/test/t-version.c
@@ -18,6 +18,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
+#include <compat.h>
+
 #include <dpkg/test.h>
 #include <dpkg/dpkg-db.h>
 
diff --git a/lib/dpkg/trigdeferred.l b/lib/dpkg/trigdeferred.l
index c1fdbdd..ef3ad3c 100644
--- a/lib/dpkg/trigdeferred.l
+++ b/lib/dpkg/trigdeferred.l
@@ -35,6 +35,7 @@
 %{
 
 #include <config.h>
+#include <compat.h>
 
 #include <sys/stat.h>
 #include <sys/fcntl.h>
diff --git a/utils/install-info.c b/utils/install-info.c
index 0b831a1..81e9d4f 100644
--- a/utils/install-info.c
+++ b/utils/install-info.c
@@ -18,6 +18,7 @@
  */
 
 #include <config.h>
+#include <compat.h>
 
 #include <errno.h>
 #include <string.h>
diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index 26b60db..7a7fda4 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -21,6 +21,7 @@
  */
 
 #include <config.h>
+#include <compat.h>
 
 #include <dpkg/macros.h>
 

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to