Parcourir la source

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.
Guillem Jover il y a 16 ans
Parent
commit
5d1099ae03

+ 0 - 3
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>

+ 0 - 3
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>
 

+ 0 - 3
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

+ 0 - 3
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>
 

+ 3 - 0
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>
 

+ 3 - 0
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>
 

+ 3 - 0
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>
 

+ 3 - 0
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>
 

+ 3 - 0
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>
 

+ 3 - 0
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>

+ 3 - 0
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>

+ 3 - 0
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>
 

+ 3 - 0
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>
 

+ 3 - 0
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

+ 3 - 0
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>
 

+ 3 - 0
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>
 

+ 1 - 0
lib/dpkg/trigdeferred.l

@@ -35,6 +35,7 @@
 %{
 
 #include <config.h>
+#include <compat.h>
 
 #include <sys/stat.h>
 #include <sys/fcntl.h>

+ 1 - 0
utils/install-info.c

@@ -18,6 +18,7 @@
  */
 
 #include <config.h>
+#include <compat.h>
 
 #include <errno.h>
 #include <string.h>

+ 1 - 0
utils/start-stop-daemon.c

@@ -21,6 +21,7 @@
  */
 
 #include <config.h>
+#include <compat.h>
 
 #include <dpkg/macros.h>