mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
Let gettext test run better.
There are 2 failed tests.
This commit is contained in:
@@ -76,6 +76,7 @@ BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
cmd:find
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:groff
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize
|
||||
cmd:make
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From cd1f59d393fd365e455aa463105ae95d9ac883b1 Mon Sep 17 00:00:00 2001
|
||||
From 11ca072fe823919abf4c5f5c8f26771cdcd705e2 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 9 Sep 2014 20:00:54 +0000
|
||||
Subject: haiku patch
|
||||
@@ -77,3 +77,45 @@ index 9fcc20d..b0720d4 100644
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 9f8db4ffc826eb8cf08acc743ca279ddc11cb454 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@gmail.com>
|
||||
Date: Thu, 16 Oct 2014 08:51:57 +0200
|
||||
Subject: Fix C99ism in tests.
|
||||
|
||||
|
||||
diff --git a/gettext-tools/gnulib-tests/test-quotearg-simple.c b/gettext-tools/gnulib-tests/test-quotearg-simple.c
|
||||
index 08aadc1..4657fbf 100644
|
||||
--- a/gettext-tools/gnulib-tests/test-quotearg-simple.c
|
||||
+++ b/gettext-tools/gnulib-tests/test-quotearg-simple.c
|
||||
@@ -309,14 +309,16 @@ main (int argc _GL_UNUSED, char *argv[])
|
||||
size_t q_len = 1024;
|
||||
char *q = malloc (q_len + 1);
|
||||
char buf[10];
|
||||
- memset (q, 'Q', q_len);
|
||||
- q[q_len] = 0;
|
||||
|
||||
/* Z points to the boundary between a readable/writable page
|
||||
and one that is neither readable nor writable. Position
|
||||
our string so its NUL is at the end of the writable one. */
|
||||
char const *str = "____";
|
||||
size_t s_len = strlen (str);
|
||||
+ size_t n;
|
||||
+
|
||||
+ memset (q, 'Q', q_len);
|
||||
+ q[q_len] = 0;
|
||||
z -= s_len + 1;
|
||||
memcpy (z, str, s_len + 1);
|
||||
|
||||
@@ -324,7 +326,7 @@ main (int argc _GL_UNUSED, char *argv[])
|
||||
/* Whether this actually triggers a SEGV depends on the
|
||||
implementation of memcmp: whether it compares only byte-at-
|
||||
a-time, and from left to right (no SEGV) or some other way. */
|
||||
- size_t n = quotearg_buffer (buf, sizeof buf, z, SIZE_MAX, NULL);
|
||||
+ n = quotearg_buffer (buf, sizeof buf, z, SIZE_MAX, NULL);
|
||||
ASSERT (n == s_len + 2 * q_len);
|
||||
ASSERT (memcmp (buf, q, sizeof buf) == 0);
|
||||
free (q);
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user