Fix ppc64le test fails

This commit is contained in:
Vitezslav Crhonek 2014-04-10 14:43:43 +02:00
parent 6790bdbb9b
commit 17e2e0692e
4 changed files with 28 additions and 26 deletions

View File

@ -1,13 +0,0 @@
diff -up m4-1.4.16/lib/stdio.in.h.orig m4-1.4.16/lib/stdio.in.h
--- m4-1.4.16/lib/stdio.in.h.orig 2012-05-30 13:55:51.092600199 +0200
+++ m4-1.4.16/lib/stdio.in.h 2012-05-30 13:56:25.763794100 +0200
@@ -162,7 +162,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
#undef gets
+#if HAVE_RAW_DECL_GETS
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@

View File

@ -1,12 +0,0 @@
diff -up m4-1.4.16/tests/test-readlink.h.orig m4-1.4.16/tests/test-readlink.h
--- m4-1.4.16/tests/test-readlink.h.orig 2011-09-19 12:44:58.745546826 +0200
+++ m4-1.4.16/tests/test-readlink.h 2011-09-19 12:46:00.079548410 +0200
@@ -38,7 +38,7 @@ test_readlink (ssize_t (*func) (char con
ASSERT (errno == ENOENT);
errno = 0;
ASSERT (func ("", buf, sizeof buf) == -1);
- ASSERT (errno == ENOENT);
+ ASSERT (errno == ENOENT || errno == EINVAL);
errno = 0;
ASSERT (func (".", buf, sizeof buf) == -1);
ASSERT (errno == EINVAL);

View File

@ -0,0 +1,19 @@
--- m4-1.4.17/tests/test-isnanl.h.ori
+++ m4-1.4.17/tests/test-isnanl.h
@@ -51,6 +51,15 @@ main ()
/* A bit pattern that is different from a Quiet NaN. With a bit of luck,
it's a Signalling NaN. */
{
+#if defined __powerpc__ && LDBL_MANT_DIG == 106
+ /* This is PowerPC "double double", a pair of two doubles. Inf and Nan are
+ represented as the corresponding 64-bit IEEE values in the first double;
+ the second is ignored. Manipulate only the first double. */
+ #undef NWORDS
+ #define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+#endif
+
memory_long_double m;
m.value = NaNl ();
# if LDBL_EXPBIT0_BIT > 0

10
m4.spec
View File

@ -1,12 +1,15 @@
Summary: The GNU macro processor
Name: m4
Version: 1.4.17
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv3+
Group: Applications/Text
Source0: http://ftp.gnu.org/gnu/m4/m4-%{version}.tar.xz
Source1: http://ftp.gnu.org/gnu/m4/m4-%{version}.tar.xz.sig
URL: http://www.gnu.org/software/m4/
# Patch0: Fixes math tests for little-endian PowerPC, rhbz#1083434
# patch by Menanteau Guy and Ulrich Weigand
Patch0: m4-1.4.17-gnulib-ppc64le.patch
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
BuildRequires: autoconf automake
@ -29,6 +32,7 @@ Install m4 if you need a macro processor.
%prep
%setup -q
%patch0 -p1 -b .gnulib-ppc64le
chmod 644 COPYING
%build
@ -62,6 +66,10 @@ if [ "$1" = 0 ]; then
fi
%changelog
* Thu Apr 10 2014 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.4.17-4
- Fix ppc64le test fails
Resolves: #1083434
* Mon Dec 09 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.4.17-3
- Buildrequire texinfo for ppc architecture
Resolves: #1038230