Przeglądaj źródła

libdpkg: Include <dpkg/test.h> first on test cases

The <dpkg/test.h> header includes <config.h> which takes care of
properly defining the system properties including the correct off_t
type. As it was not being included first, there was type missmatches
between libdpkg and some of the unit tests.

Suggested-by: Pierre Habouzit <madcoder@debian.org>
Suggested-by: Julien Cristau <jcristau@debian.org>
Guillem Jover 16 lat temu
rodzic
commit
0043d020cf

+ 8 - 0
debian/changelog

@@ -1,3 +1,11 @@
+dpkg (1.15.5.1) UNRELEASED; urgency=low
+
+  * Fix build failures due to off_t type missmatch caused by not including
+    <config.h> first on the unit tests. Suggested by Pierre Habouzit and
+    Julien Cristau, thanks!
+
+ -- Guillem Jover <guillem@debian.org>  Tue, 17 Nov 2009 16:39:05 +0100
+
 dpkg (1.15.5) unstable; urgency=low
 
   [ Guillem Jover ]

+ 2 - 2
lib/dpkg/test/t-buffer.c

@@ -18,11 +18,11 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdio.h>
-
 #include <dpkg/test.h>
 #include <dpkg/buffer.h>
 
+#include <stdio.h>
+
 static void
 test_buffer_hash(void)
 {

+ 2 - 2
lib/dpkg/test/t-path.c

@@ -18,11 +18,11 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdlib.h>
-
 #include <dpkg/test.h>
 #include <dpkg/path.h>
 
+#include <stdlib.h>
+
 /* Use the test_trim_eq_ref macro to avoid leaking the string and to get
  * meaningful line numbers from assert. */
 #define test_trim_eq_ref(p, ref) \

+ 2 - 2
lib/dpkg/test/t-string.c

@@ -18,11 +18,11 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <string.h>
-
 #include <dpkg/test.h>
 #include <dpkg/string.h>
 
+#include <string.h>
+
 static void
 test_str_escape_fmt(void)
 {