+2009-01-12 Eric Blake <ebb9@byu.net>
+
+ tests: IRIX 6.2 cc can't compile -0.0 into .data
+ * tests/test-ceill.c (minus_zero): Compute -0.0L at runtime,
+ rather than at compile-time.
+ * tests/test-floorl.c (minus_zero): Likewise.
+ * tests/test-frexpl.c (minus_zero): Likewise.
+ * tests/test-isnan.c (minus_zerol): Likewise.
+ * tests/test-isnanl.h (minus_zero): Likewise.
+ * tests/test-ldexpl.c (minus_zero): Likewise.
+ * tests/test-roundl.c (minus_zero): Likewise.
+ * tests/test-signbit.c (minus_zerol): Likewise.
+ * tests/test-snprintf-posix.h (minus_zerol): Likewise.
+ * tests/test-sprintf-posix.h (minus_zerol): Likewise.
+ * tests/test-truncl.c (minus_zero): Likewise.
+ * tests/test-vasnprintf-posix.c (minus_zerol): Likewise.
+ * tests/test-vasprintf-posix.c (minus_zerol): Likewise.
+ Reported by Tom G. Christensen and Nelson H. F. Beebe.
+
2009-01-09 Paolo Bonzini <bonzini@gnu.org>
regex: fix glibc bug 9697
/* Test of rounding towards positive infinity.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 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
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zero instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
#if defined __hpux || defined __sgi
-long double minus_zero = -LDBL_MIN * LDBL_MIN;
+static long double
+compute_minus_zero (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zero compute_minus_zero ()
#else
long double minus_zero = -0.0L;
#endif
/* Test of rounding towards negative infinity.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 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
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zero instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
#if defined __hpux || defined __sgi
-long double minus_zero = -LDBL_MIN * LDBL_MIN;
+static long double
+compute_minus_zero (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zero compute_minus_zero ()
#else
long double minus_zero = -0.0L;
#endif
/* Test of splitting a 'long double' into fraction and mantissa.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 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
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zero instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
#if defined __hpux || defined __sgi
-long double minus_zero = -LDBL_MIN * LDBL_MIN;
+static long double
+compute_minus_zero (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zero compute_minus_zero ()
#else
long double minus_zero = -0.0L;
#endif
/* Test of isnand() substitute.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 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
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zerol instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
#if defined __hpux || defined __sgi
-long double minus_zerol = -LDBL_MIN * LDBL_MIN;
+static long double
+compute_minus_zerol (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zerol compute_minus_zerol ()
#else
long double minus_zerol = -0.0L;
#endif
/* Test of isnanl() substitute.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 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
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zero instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
#if defined __hpux || defined __sgi
-long double minus_zero = -LDBL_MIN * LDBL_MIN;
+static long double
+compute_minus_zero (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zero compute_minus_zero ()
#else
long double minus_zero = -0.0L;
#endif
/* Test of multiplying a 'long double' by a power of 2.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 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
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zero instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
#if defined __hpux || defined __sgi
-long double minus_zero = -LDBL_MIN * LDBL_MIN;
+static long double
+compute_minus_zero (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zero compute_minus_zero ()
#else
long double minus_zero = -0.0L;
#endif
/* Test of rounding to nearest, breaking ties away from zero.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 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 2, or (at your option)
+ the Free Software Foundation; either version 3, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zero instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
#if defined __hpux || defined __sgi
-long double minus_zero = -LDBL_MIN * LDBL_MIN;
+static long double
+compute_minus_zero (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zero compute_minus_zero ()
#else
long double minus_zero = -0.0L;
#endif
/* Test of signbit() substitute.
- Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009 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
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zerol instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
#if defined __hpux || defined __sgi
-long double minus_zerol = -LDBL_MIN * LDBL_MIN;
+static long double
+compute_minus_zerol (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zerol compute_minus_zerol ()
#else
long double minus_zerol = -0.0L;
#endif
/* Test of POSIX compatible vsnprintf() and snprintf() functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 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
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zerol instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
#if defined __hpux || defined __sgi
-long double minus_zerol = -LDBL_MIN * LDBL_MIN;
+static long double
+compute_minus_zerol (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zerol compute_minus_zerol ()
#else
long double minus_zerol = -0.0L;
#endif
/* Test of POSIX compatible vsprintf() and sprintf() functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 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
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zerol instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
#if defined __hpux || defined __sgi
-long double minus_zerol = -LDBL_MIN * LDBL_MIN;
+static long double
+compute_minus_zerol (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zerol compute_minus_zerol ()
#else
long double minus_zerol = -0.0L;
#endif
/* Test of rounding towards zero.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 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
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zero instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
#if defined __hpux || defined __sgi
-long double minus_zero = -LDBL_MIN * LDBL_MIN;
+static long double
+compute_minus_zero (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zero compute_minus_zero ()
#else
long double minus_zero = -0.0L;
#endif
/* Test of POSIX compatible vasnprintf() and asnprintf() functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 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
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zerol instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
#if defined __hpux || defined __sgi
-long double minus_zerol = -LDBL_MIN * LDBL_MIN;
+static long double
+compute_minus_zerol (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zerol compute_minus_zerol ()
#else
long double minus_zerol = -0.0L;
#endif
/* Test of POSIX compatible vasprintf() and asprintf() functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 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
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zerol instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
#if defined __hpux || defined __sgi
-long double minus_zerol = -LDBL_MIN * LDBL_MIN;
+static long double
+compute_minus_zerol (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zerol compute_minus_zerol ()
#else
long double minus_zerol = -0.0L;
#endif