From c75e0e8147abc23d3beff66bbf437a891774d204489289565a4553bbe9dde207 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 14 Mar 2016 14:25:00 +0000 Subject: [PATCH 1/6] . OBS-URL: https://build.opensuse.org/package/show/Base:System/findutils?expand=0&rev=66 --- LDBL_MAX-gcc4.4.patch | 36 ++++++++++++++++++++++++++++++++++++ findutils.changes | 6 ++++++ findutils.spec | 2 ++ 3 files changed, 44 insertions(+) create mode 100644 LDBL_MAX-gcc4.4.patch diff --git a/LDBL_MAX-gcc4.4.patch b/LDBL_MAX-gcc4.4.patch new file mode 100644 index 0000000..d4761dc --- /dev/null +++ b/LDBL_MAX-gcc4.4.patch @@ -0,0 +1,36 @@ +| From: Werner Fink +| Date: Mon, 14 Mar 2016 14:20:51 +0000 +| +| Is this wrong value of LDBL_MAX still valid got gcc > 4 +| Compare with +| https://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00011.html +| +--- + gl/lib/float.in.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- gl/lib/float.in.h ++++ gl/lib/float.in.h 2016-03-14 14:15:45.616871084 +0000 +@@ -112,21 +112,21 @@ extern const union gl_long_double_union + wrong. + On Linux/PowerPC with gcc 4.4, the value of LDBL_MAX is wrong. */ + #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ + # undef LDBL_MIN_EXP + # define LDBL_MIN_EXP DBL_MIN_EXP + # undef LDBL_MIN_10_EXP + # define LDBL_MIN_10_EXP DBL_MIN_10_EXP + # undef LDBL_MIN + # define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */ + #endif +-#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__ ++#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && (defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ == 4)) + # undef LDBL_MAX + /* LDBL_MAX is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xFFFFFFFF }. + It is not easy to define: + #define LDBL_MAX 1.79769313486231580793728971405302307166e308L + is too small, whereas + #define LDBL_MAX 1.79769313486231580793728971405302307167e308L + is too large. Apparently a bug in GCC decimal-to-binary conversion. + Also, I can't get values larger than + #define LDBL63 ((long double) (1ULL << 63)) + #define LDBL882 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63) diff --git a/findutils.changes b/findutils.changes index adbe1d0..5c229db 100644 --- a/findutils.changes +++ b/findutils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 14 14:23:10 UTC 2016 - werner@suse.de + +- Add patch LDBL_MAX-gcc4.4.patch to fix build on all ppc platforms + Note that this patch might be a temporary patch. + ------------------------------------------------------------------- Mon Jan 11 22:25:09 UTC 2016 - mail@bernhard-voelker.de diff --git a/findutils.spec b/findutils.spec index fc74fa5..60588d5 100644 --- a/findutils.spec +++ b/findutils.spec @@ -33,6 +33,7 @@ Source0: http://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz # adds a new option -xautofs to find to not descend into directories on autofs file systems Patch0: findutils-4.4.2-xautofs.patch +Patch1: LDBL_MAX-gcc4.4.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # BuildRequire dejagnu for 'runtest' to execute all tests. @@ -63,6 +64,7 @@ useful for finding things on your system. %prep %setup -q %patch0 +%patch1 %build %if 0%{?qemu_user_space_build} From ab0d685931acabaae1061f9473444e59250cdddfbcfe6a0e8778bb3dcdd35170 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 14 Mar 2016 14:30:00 +0000 Subject: [PATCH 2/6] . OBS-URL: https://build.opensuse.org/package/show/Base:System/findutils?expand=0&rev=67 --- LDBL_MAX-gcc4.4.patch | 28 +++++++++++++++++++++++++++- findutils.spec | 2 +- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/LDBL_MAX-gcc4.4.patch b/LDBL_MAX-gcc4.4.patch index d4761dc..8507ede 100644 --- a/LDBL_MAX-gcc4.4.patch +++ b/LDBL_MAX-gcc4.4.patch @@ -6,9 +6,35 @@ | https://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00011.html | --- + gl/lib/float.c | 2 +- gl/lib/float.in.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + 2 files changed, 2 insertions(+), 2 deletions(-) +--- gl/lib/float.c ++++ gl/lib/float.c 2016-03-14 14:29:38.001448470 +0000 +@@ -13,21 +13,21 @@ + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + + #include + + /* Specification. */ + #include + +-#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__ ++#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && (defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ == 4)) + const union gl_long_double_union gl_LDBL_MAX = + { { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL } }; + #elif defined __i386__ + const union gl_long_double_union gl_LDBL_MAX = + { { 0xFFFFFFFF, 0xFFFFFFFF, 32766 } }; + #else + /* This declaration is solely to ensure that after preprocessing + this file is never empty. */ + typedef int dummy; + #endif --- gl/lib/float.in.h +++ gl/lib/float.in.h 2016-03-14 14:15:45.616871084 +0000 @@ -112,21 +112,21 @@ extern const union gl_long_double_union diff --git a/findutils.spec b/findutils.spec index 60588d5..aa2ed07 100644 --- a/findutils.spec +++ b/findutils.spec @@ -64,7 +64,7 @@ useful for finding things on your system. %prep %setup -q %patch0 -%patch1 +#%patch1 %build %if 0%{?qemu_user_space_build} From cec93334f9249c8f0df4a010e09e09cbb2d3a1800d745b4e44ff15784636ea63 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 14 Mar 2016 14:35:47 +0000 Subject: [PATCH 3/6] . OBS-URL: https://build.opensuse.org/package/show/Base:System/findutils?expand=0&rev=68 --- findutils.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/findutils.spec b/findutils.spec index aa2ed07..60588d5 100644 --- a/findutils.spec +++ b/findutils.spec @@ -64,7 +64,7 @@ useful for finding things on your system. %prep %setup -q %patch0 -#%patch1 +%patch1 %build %if 0%{?qemu_user_space_build} From 93f389494de53680033ca9a93b34cb0018bd4fefd02f9a67d2fcdc261656aaa8 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 14 Mar 2016 14:50:10 +0000 Subject: [PATCH 4/6] . OBS-URL: https://build.opensuse.org/package/show/Base:System/findutils?expand=0&rev=69 --- findutils.changes | 6 ------ findutils.spec | 2 -- 2 files changed, 8 deletions(-) diff --git a/findutils.changes b/findutils.changes index 5c229db..adbe1d0 100644 --- a/findutils.changes +++ b/findutils.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Mon Mar 14 14:23:10 UTC 2016 - werner@suse.de - -- Add patch LDBL_MAX-gcc4.4.patch to fix build on all ppc platforms - Note that this patch might be a temporary patch. - ------------------------------------------------------------------- Mon Jan 11 22:25:09 UTC 2016 - mail@bernhard-voelker.de diff --git a/findutils.spec b/findutils.spec index 60588d5..fc74fa5 100644 --- a/findutils.spec +++ b/findutils.spec @@ -33,7 +33,6 @@ Source0: http://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz # adds a new option -xautofs to find to not descend into directories on autofs file systems Patch0: findutils-4.4.2-xautofs.patch -Patch1: LDBL_MAX-gcc4.4.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # BuildRequire dejagnu for 'runtest' to execute all tests. @@ -64,7 +63,6 @@ useful for finding things on your system. %prep %setup -q %patch0 -%patch1 %build %if 0%{?qemu_user_space_build} From 7e03d26c9d2a2e3ad4fb0b548a34fedae6eb8f475f4fbfb5a8a96dbf26fc020a Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Tue, 31 May 2016 20:28:15 +0000 Subject: [PATCH 5/6] Accepting request 399284 from home:berny:branches:Base:System - sv-bug-48030-find-exec-plus-does-not-pass-all-arguments.patch: Add upstream patch to fix https://savannah.gnu.org/bugs/?48030 OBS-URL: https://build.opensuse.org/request/show/399284 OBS-URL: https://build.opensuse.org/package/show/Base:System/findutils?expand=0&rev=70 --- findutils.changes | 6 + findutils.spec | 11 + ...xec-plus-does-not-pass-all-arguments.patch | 252 ++++++++++++++++++ 3 files changed, 269 insertions(+) create mode 100644 sv-bug-48030-find-exec-plus-does-not-pass-all-arguments.patch diff --git a/findutils.changes b/findutils.changes index adbe1d0..eda11c9 100644 --- a/findutils.changes +++ b/findutils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue May 31 00:01:05 UTC 2016 - mail@bernhard-voelker.de + +- sv-bug-48030-find-exec-plus-does-not-pass-all-arguments.patch: + Add upstream patch to fix https://savannah.gnu.org/bugs/?48030 + ------------------------------------------------------------------- Mon Jan 11 22:25:09 UTC 2016 - mail@bernhard-voelker.de diff --git a/findutils.spec b/findutils.spec index fc74fa5..db969b5 100644 --- a/findutils.spec +++ b/findutils.spec @@ -34,6 +34,9 @@ Source0: http://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz # adds a new option -xautofs to find to not descend into directories on autofs file systems Patch0: findutils-4.4.2-xautofs.patch +# Upstream patch, to be removed with version 4.7.0. +Patch100: sv-bug-48030-find-exec-plus-does-not-pass-all-arguments.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-build # BuildRequire dejagnu for 'runtest' to execute all tests. BuildRequires: dejagnu @@ -63,6 +66,7 @@ useful for finding things on your system. %prep %setup -q %patch0 +%patch100 %build %if 0%{?qemu_user_space_build} @@ -76,6 +80,13 @@ export DEFAULT_ARG_SIZE="(31u * 1024u)" make %{?_smp_mflags} %check +if [ "%{version}" != '4.6.0' ]; then + echo "ERROR: remove this if-else-fi block from the spec file with findutils version >4.6.0." >&2 + exit 1 +else + # Make the test script added with 'sv-48030*.patch' executable. + chmod +x find/testsuite/sv-48030-exec-plus-bug.sh +fi make check \ || { cat tests/test-suite.log; exit 1; } diff --git a/sv-bug-48030-find-exec-plus-does-not-pass-all-arguments.patch b/sv-bug-48030-find-exec-plus-does-not-pass-all-arguments.patch new file mode 100644 index 0000000..a0418dd --- /dev/null +++ b/sv-bug-48030-find-exec-plus-does-not-pass-all-arguments.patch @@ -0,0 +1,252 @@ +Upstream patch, to be removed with findutils-4.7.0 + +http://git.sv.gnu.org/cgit/findutils.git/commit/?id=8cdc9767e3 + +Differences to upstream patch: +- Fix conflict in NEWS +- Reference new test script in Makefile.in rather than in Makefile.am + to avoid automake machinery. + +---------------------------------------------------------------------- +From d15e640fc76f8b931549f79f2edc86d5e552e8bf Mon Sep 17 00:00:00 2001 +From: Bernhard Voelker +Date: Tue, 31 May 2016 00:31:50 +0200 +Subject: [PATCH] Fix bug #48030: find: -exec + does not pass all arguments in + certain cases + +When the -exec arguments buffer (usually 128k) is full and the given +command has been executed with all that arguments, find(1) missed to +execute the command yet another time if only 1 another file would have +to be processed. +Both find(1), i.e., nowadays FTS-version, and oldfind are affected. +This bug was present since the implementation of '-exec +' in 2005, +see commit FINDUTILS_4_2_11-1-25-gf0a6ac6. + +* lib/buildcmd.c (bc_push_arg): Move the assignment to set 'state->todo' +to 1 down after the immediate execution which resets that flag. +* find/testsuite/sv-48030-exec-plus-bug.sh: Add a test. +* find/testsuite/Makefile.in (test_shell_progs): Reference the test. +* NEWS (Bug Fixes): Mention the fix. + +Reported by Joe Philip Ninan in +https://savannah.gnu.org/bugs/?48030 +--- + NEWS | 12 ++ + find/testsuite/Makefile.am | 3 + find/testsuite/sv-48030-exec-plus-bug.sh | 143 +++++++++++++++++++++++++++++++ + lib/buildcmd.c | 10 +- + 4 files changed, 162 insertions(+), 6 deletions(-) + create mode 100755 find/testsuite/sv-48030-exec-plus-bug.sh + +Index: NEWS +=================================================================== +--- NEWS.orig ++++ NEWS +@@ -1,5 +1,17 @@ + GNU findutils NEWS - User visible changes. -*- outline -*- (allout) + ++* openSUSE downstream changes ++ ++** Bug Fixes ++ ++Savannah bug ++#48030: find -exec + does not pass all arguments for certain specific filename ++ lengths. After the internal (usually 128k) buffer is full and find(1) ++ executed the given command with these arguments, it would miss to run ++ the command yet another time if only one other file argument has to be ++ processed. Bug introduced in FINDUTILS-4.2.12. ++ ++ + * Major changes in release 4.6.0, 2015-12-28 + + ** Stable Release +Index: find/testsuite/sv-48030-exec-plus-bug.sh +=================================================================== +--- /dev/null ++++ find/testsuite/sv-48030-exec-plus-bug.sh +@@ -0,0 +1,143 @@ ++#! /bin/sh ++# Copyright (C) 2016 Free Software Foundation, Inc. ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++# ++ ++# This test verifies that find invokes the given command for the ++# multiple-argument sytax '-exec CMD {} +'. Between FINDUTILS-4.2.12 ++# and v4.6.0, find(1) would have failed to execute CMD another time ++# if there was only one last single file argument. ++ ++testname="$(basename $0)" ++ ++. "${srcdir}"/binary_locations.sh ++ ++die() { ++ echo "$@" >&2 ++ exit 1 ++} ++ ++# This is used to simplify checking of the return value ++# which is useful when ensuring a command fails as desired. ++# I.e., just doing `command ... &&fail=1` will not catch ++# a segfault in command for example. With this helper you ++# instead check an explicit exit code like ++# returns_ 1 command ... || fail ++returns_ () { ++ # Disable tracing so it doesn't interfere with stderr of the wrapped command ++ { set +x; } 2>/dev/null ++ ++ local exp_exit="$1" ++ shift ++ "$@" ++ test $? -eq $exp_exit && ret_=0 || ret_=1 ++ ++ set -x ++ { return $ret_; } 2>/dev/null ++} ++ ++# Define the nicest compare available (borrowed from gnulib). ++if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null` \ ++ && diff -u Makefile "$0" 2>/dev/null | grep '^[+]#!' >/dev/null; then ++ # diff accepts the -u option and does not (like AIX 7 'diff') produce an ++ # extra space on column 1 of every content line. ++ if test -z "$diff_out_"; then ++ compare () { diff -u "$@"; } ++ else ++ compare () ++ { ++ if diff -u "$@" > diff.out; then ++ # No differences were found, but Solaris 'diff' produces output ++ # "No differences encountered". Hide this output. ++ rm -f diff.out ++ true ++ else ++ cat diff.out ++ rm -f diff.out ++ false ++ fi ++ } ++ fi ++elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then ++ if test -z "$diff_out_"; then ++ compare () { diff -c "$@"; } ++ else ++ compare () ++ { ++ if diff -c "$@" > diff.out; then ++ # No differences were found, but AIX and HP-UX 'diff' produce output ++ # "No differences encountered" or "There are no differences between the ++ # files.". Hide this output. ++ rm -f diff.out ++ true ++ else ++ cat diff.out ++ rm -f diff.out ++ false ++ fi ++ } ++ fi ++elif cmp -s /dev/null /dev/null 2>/dev/null; then ++ compare () { cmp -s "$@"; } ++else ++ compare () { cmp "$@"; } ++fi ++ ++DIR='RashuBug' ++# Name of the CMD to execute: the file name must be 6 characters long ++# (to trigger the bug in combination with the test files). ++CMD='tstcmd' ++ ++# Create test files. ++make_test_data() { ++ # Create the CMD script and check that it works. ++ mkdir "$DIR" 'bin' \ ++ && echo 'printf "%s\n" "$@"' > "bin/$CMD" \ ++ && chmod +x "bin/$CMD" \ ++ && PATH="$PWD/bin:$PATH" \ ++ && [ $( "${ftsfind}" bin -maxdepth 0 -exec "$CMD" '{}' + ) = 'bin' ] \ ++ || return 1 ++ ++ # Create expected output file - also used for creating the test data. ++ { seq -f "${DIR}/abcdefghijklmnopqrstuv%04g" 901 && ++ seq -f "${DIR}/abcdefghijklmnopqrstu%04g" 902 3719 ++ } > exp2 \ ++ && LC_ALL=C sort exp2 > exp \ ++ && rm exp2 \ ++ || return 1 ++ ++ # Create test files, and check if test data has been created correctly. ++ xargs touch < exp \ ++ && [ -f "${DIR}/abcdefghijklmnopqrstu3719" ] \ ++ && [ 3719 = $( "${ftsfind}" "$DIR" -type f | wc -l ) ] \ ++ || return 1 ++} ++ ++set -x ++tmpdir="$(mktemp -d)" \ ++ && cd "$tmpdir" \ ++ && make_test_data "${tmpdir}" \ ++ || die "FAIL: failed to set up the test in ${tmpdir}" ++ ++fail=0 ++for exe in "${ftsfind}" "${oldfind}"; do ++ "$exe" "$DIR" -type f -exec "$CMD" '{}' + > out || fail=1 ++ LC_ALL=C sort out > out2 || fail=1 ++ compare exp out2 || fail=1 ++done ++ ++cd .. ++rm -rf "${tmpdir}" || exit 1 ++exit $fail +Index: lib/buildcmd.c +=================================================================== +--- lib/buildcmd.c.orig ++++ lib/buildcmd.c +@@ -356,11 +356,6 @@ bc_push_arg (struct buildcmd_control *ct + + assert (arg != NULL); + +- if (!initial_args) +- { +- state->todo = 1; +- } +- + if (!terminate) + { + if (state->cmd_argv_chars + len + pfxlen > ctl->arg_max) +@@ -380,6 +375,11 @@ bc_push_arg (struct buildcmd_control *ct + bc_do_exec (ctl, state); + } + ++ if (!initial_args) ++ { ++ state->todo = 1; ++ } ++ + if (state->cmd_argc >= state->cmd_argv_alloc) + { + /* XXX: we could use extendbuf() here. */ +Index: find/testsuite/Makefile.in +=================================================================== +--- find/testsuite/Makefile.in.orig ++++ find/testsuite/Makefile.in +@@ -2004,7 +2004,8 @@ test_escapechars.sh \ + test_escape_c.sh \ + test_inode.sh \ + sv-34079.sh \ +-sv-34976-execdir-fd-leak.sh ++sv-34976-execdir-fd-leak.sh \ ++sv-48030-exec-plus-bug.sh + + EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) $(EXTRA_DIST_GOLDEN) \ + $(test_shell_progs) binary_locations.sh checklists.py From e74308e2da7dc56121f69a1390579252bdadc5d446672c6af393ed7fc6b3f2dc Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Wed, 1 Jun 2016 09:10:37 +0000 Subject: [PATCH 6/6] OBS-URL: https://build.opensuse.org/package/show/Base:System/findutils?expand=0&rev=71 --- LDBL_MAX-gcc4.4.patch | 62 ------------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 LDBL_MAX-gcc4.4.patch diff --git a/LDBL_MAX-gcc4.4.patch b/LDBL_MAX-gcc4.4.patch deleted file mode 100644 index 8507ede..0000000 --- a/LDBL_MAX-gcc4.4.patch +++ /dev/null @@ -1,62 +0,0 @@ -| From: Werner Fink -| Date: Mon, 14 Mar 2016 14:20:51 +0000 -| -| Is this wrong value of LDBL_MAX still valid got gcc > 4 -| Compare with -| https://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00011.html -| ---- - gl/lib/float.c | 2 +- - gl/lib/float.in.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- gl/lib/float.c -+++ gl/lib/float.c 2016-03-14 14:29:38.001448470 +0000 -@@ -13,21 +13,21 @@ - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - - #include - - /* Specification. */ - #include - --#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__ -+#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && (defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ == 4)) - const union gl_long_double_union gl_LDBL_MAX = - { { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL } }; - #elif defined __i386__ - const union gl_long_double_union gl_LDBL_MAX = - { { 0xFFFFFFFF, 0xFFFFFFFF, 32766 } }; - #else - /* This declaration is solely to ensure that after preprocessing - this file is never empty. */ - typedef int dummy; - #endif ---- gl/lib/float.in.h -+++ gl/lib/float.in.h 2016-03-14 14:15:45.616871084 +0000 -@@ -112,21 +112,21 @@ extern const union gl_long_double_union - wrong. - On Linux/PowerPC with gcc 4.4, the value of LDBL_MAX is wrong. */ - #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ - # undef LDBL_MIN_EXP - # define LDBL_MIN_EXP DBL_MIN_EXP - # undef LDBL_MIN_10_EXP - # define LDBL_MIN_10_EXP DBL_MIN_10_EXP - # undef LDBL_MIN - # define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */ - #endif --#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__ -+#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && (defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ == 4)) - # undef LDBL_MAX - /* LDBL_MAX is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xFFFFFFFF }. - It is not easy to define: - #define LDBL_MAX 1.79769313486231580793728971405302307166e308L - is too small, whereas - #define LDBL_MAX 1.79769313486231580793728971405302307167e308L - is too large. Apparently a bug in GCC decimal-to-binary conversion. - Also, I can't get values larger than - #define LDBL63 ((long double) (1ULL << 63)) - #define LDBL882 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63)