From: Bruno Haible Date: Wed, 28 Nov 2007 13:05:56 +0000 (+0000) Subject: Avoid abort() on FreeBSD 6.1/x86. X-Git-Tag: v0.18~493 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eac645f61a4f6981d3a170b890bd2f2f3b5ed08b;p=thirdparty%2Fgettext.git Avoid abort() on FreeBSD 6.1/x86. --- diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index dd530011b..44973c1eb 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,10 @@ +2007-11-26 Bruno Haible + + * vasnprintf.c (decode_long_double): Don't abort if the 'long double' + type has excess precision. + Reported by Jim Meyering in + . + 2007-11-15 Bruno Haible Avoid crash by stack overflow when msgid is very long. diff --git a/gettext-runtime/intl/vasnprintf.c b/gettext-runtime/intl/vasnprintf.c index a5fddfade..c7b5b816d 100644 --- a/gettext-runtime/intl/vasnprintf.c +++ b/gettext-runtime/intl/vasnprintf.c @@ -872,8 +872,11 @@ decode_long_double (long double x, int *ep, mpn_t *mp) abort (); m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; } +#if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess + precision. */ if (!(y == 0.0L)) abort (); +#endif /* Normalise. */ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) m.nlimbs--; diff --git a/gettext-runtime/libasprintf/ChangeLog b/gettext-runtime/libasprintf/ChangeLog index 13be3f94e..ef26cc92c 100644 --- a/gettext-runtime/libasprintf/ChangeLog +++ b/gettext-runtime/libasprintf/ChangeLog @@ -1,3 +1,10 @@ +2007-11-26 Bruno Haible + + * vasnprintf.c (decode_long_double): Don't abort if the 'long double' + type has excess precision. + Reported by Jim Meyering in + . + 2007-11-10 Bruno Haible * configure.ac: Do _snprintf check like gnulib's vasnprintf.m4 does. diff --git a/gettext-runtime/libasprintf/vasnprintf.c b/gettext-runtime/libasprintf/vasnprintf.c index a5fddfade..c7b5b816d 100644 --- a/gettext-runtime/libasprintf/vasnprintf.c +++ b/gettext-runtime/libasprintf/vasnprintf.c @@ -872,8 +872,11 @@ decode_long_double (long double x, int *ep, mpn_t *mp) abort (); m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; } +#if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess + precision. */ if (!(y == 0.0L)) abort (); +#endif /* Normalise. */ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) m.nlimbs--;