Disable 'time_t' type size tests in findutils

Some type size tests in the findutils source code expect the 'time_t' type
to be of the same size as the 'long' type, whereas the Genode libc defines
it as '__int64_t' for ARM. This patch disables these tests.

Fixes #262.
This commit is contained in:
Christian Prochaska 2012-06-28 17:16:24 +02:00 committed by Norman Feske
parent 92ce7ca909
commit cdb1c6f203
2 changed files with 29 additions and 1 deletions

View File

@ -17,4 +17,4 @@ $(DOWNLOAD_DIR)/$(FINDUTILS_TGZ):
$(CONTRIB_DIR)/$(FINDUTILS): $(DOWNLOAD_DIR)/$(FINDUTILS_TGZ)
$(VERBOSE)tar xfz $< -C $(CONTRIB_DIR) && touch $@
$(VERBOSE)patch -d $(CONTRIB_DIR)/$(FINDUTILS) -N -p1 < src/noux-pkg/findutils/build.patch

View File

@ -0,0 +1,28 @@
diff --git a/gnulib/lib/getdate.y b/gnulib/lib/getdate.y
--- a/gnulib/lib/getdate.y
+++ b/gnulib/lib/getdate.y
@@ -114,7 +114,8 @@
wraps around, but there's no portable way to check for that at
compile-time. */
verify (TYPE_IS_INTEGER (time_t));
-verify (LONG_MIN <= TYPE_MINIMUM (time_t) && TYPE_MAXIMUM (time_t) <= LONG_MAX);
+/* the Genode libc defines 'time_t' as '__int64_t' on ARM, which makes this test fail */
+/* verify (LONG_MIN <= TYPE_MINIMUM (time_t) && TYPE_MAXIMUM (time_t) <= LONG_MAX); */
/* An integer value, and the number of digits in its textual
representation. */
diff --git a/gnulib/lib/mktime.c b/gnulib/lib/mktime.c
--- a/gnulib/lib/mktime.c
+++ b/gnulib/lib/mktime.c
@@ -165,8 +165,9 @@
int year0, int yday0, int hour0, int min0, int sec0)
{
verify (C99_integer_division, -1 / 2 == 0);
- verify (long_int_year_and_yday_are_wide_enough,
- INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX);
+ /* the Genode libc defines 'time_t' as '__int64_t' on ARM, which makes this test fail */
+ /* verify (long_int_year_and_yday_are_wide_enough,
+ INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX); */
/* Compute intervening leap days correctly even if year is negative.
Take care to avoid integer overflow here. */