This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.15-683-gded5180


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  ded5180a3b177c559ad144ac73bfa313284e2a8c (commit)
       via  7e0d315da842379f077fc61dca72460fb0e9263e (commit)
       via  6d5c57fabd1a97b110b00e59fd52f50ce5bbb1a3 (commit)
      from  48df16de98392ca11a1361142b2366ccefa1c81c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ded5180a3b177c559ad144ac73bfa313284e2a8c

commit ded5180a3b177c559ad144ac73bfa313284e2a8c
Author: Andreas Schwab <schwab@linux-m68k.org>
Date:   Sat Apr 28 16:39:41 2012 +0200

    Don't use long double *_finite functions if no long double math

diff --git a/ChangeLog b/ChangeLog
index ca38a87..67a29bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
 
+	* math/bits/math-finite.h [__NO_LONG_DOUBLE_MATH]: Redirect long
+	double functions to double *_finite functions.
+
 	[BZ #13941]
 	* sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c
 	(__mpn_extract_long_double): Use DBL_MIN_EXP instead of
diff --git a/math/bits/math-finite.h b/math/bits/math-finite.h
index ac1b345..ae44737 100644
--- a/math/bits/math-finite.h
+++ b/math/bits/math-finite.h
@@ -24,7 +24,11 @@
 extern double __REDIRECT_NTH (acos, (double), __acos_finite);
 extern float __REDIRECT_NTH (acosf, (float), __acosf_finite);
 #ifdef __MATH_DECLARE_LDOUBLE
+# ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (acosl, (long double), __acos_finite);
+# else
 extern long double __REDIRECT_NTH (acosl, (long double), __acosl_finite);
+# endif
 #endif
 
 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
@@ -32,7 +36,11 @@ extern long double __REDIRECT_NTH (acosl, (long double), __acosl_finite);
 extern double __REDIRECT_NTH (acosh, (double), __acosh_finite);
 extern float __REDIRECT_NTH (acoshf, (float), __acoshf_finite);
 # ifdef __MATH_DECLARE_LDOUBLE
+#  ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (acoshl, (long double), __acosh_finite);
+#  else
 extern long double __REDIRECT_NTH (acoshl, (long double), __acoshl_finite);
+#  endif
 # endif
 #endif
 
@@ -40,15 +48,24 @@ extern long double __REDIRECT_NTH (acoshl, (long double), __acoshl_finite);
 extern double __REDIRECT_NTH (asin, (double), __asin_finite);
 extern float __REDIRECT_NTH (asinf, (float), __asinf_finite);
 #ifdef __MATH_DECLARE_LDOUBLE
+# ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (asinl, (long double), __asin_finite);
+# else
 extern long double __REDIRECT_NTH (asinl, (long double), __asinl_finite);
+# endif
 #endif
 
 /* atan2.  */
 extern double __REDIRECT_NTH (atan2, (double, double), __atan2_finite);
 extern float __REDIRECT_NTH (atan2f, (float, float), __atan2f_finite);
 #ifdef __MATH_DECLARE_LDOUBLE
+# ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (atan2l, (long double, long double),
+				   __atan2_finite);
+# else
 extern long double __REDIRECT_NTH (atan2l, (long double, long double),
 				   __atan2l_finite);
+# endif
 #endif
 
 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
@@ -56,7 +73,11 @@ extern long double __REDIRECT_NTH (atan2l, (long double, long double),
 extern double __REDIRECT_NTH (atanh, (double), __atanh_finite);
 extern float __REDIRECT_NTH (atanhf, (float), __atanhf_finite);
 # ifdef __MATH_DECLARE_LDOUBLE
+#  ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (atanhl, (long double), __atanh_finite);
+#  else
 extern long double __REDIRECT_NTH (atanhl, (long double), __atanhl_finite);
+#  endif
 # endif
 #endif
 
@@ -64,14 +85,22 @@ extern long double __REDIRECT_NTH (atanhl, (long double), __atanhl_finite);
 extern double __REDIRECT_NTH (cosh, (double), __cosh_finite);
 extern float __REDIRECT_NTH (coshf, (float), __coshf_finite);
 #ifdef __MATH_DECLARE_LDOUBLE
+# ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (coshl, (long double), __cosh_finite);
+# else
 extern long double __REDIRECT_NTH (coshl, (long double), __coshl_finite);
+# endif
 #endif
 
 /* exp.  */
 extern double __REDIRECT_NTH (exp, (double), __exp_finite);
 extern float __REDIRECT_NTH (expf, (float), __expf_finite);
 #ifdef __MATH_DECLARE_LDOUBLE
+# ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (expl, (long double), __exp_finite);
+# else
 extern long double __REDIRECT_NTH (expl, (long double), __expl_finite);
+# endif
 #endif
 
 #ifdef __USE_GNU
@@ -79,14 +108,22 @@ extern long double __REDIRECT_NTH (expl, (long double), __expl_finite);
 extern double __REDIRECT_NTH (exp10, (double), __exp10_finite);
 extern float __REDIRECT_NTH (exp10f, (float), __exp10f_finite);
 # ifdef __MATH_DECLARE_LDOUBLE
+#  ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (exp10l, (long double), __exp10_finite);
+#  else
 extern long double __REDIRECT_NTH (exp10l, (long double), __exp10l_finite);
+#  endif
 # endif
 
 /* pow10.  */
 extern double __REDIRECT_NTH (pow10, (double), __exp10_finite);
 extern float __REDIRECT_NTH (pow10f, (float), __exp10f_finite);
 # ifdef __MATH_DECLARE_LDOUBLE
+#  ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (pow10l, (long double), __exp10_finite);
+#  else
 extern long double __REDIRECT_NTH (pow10l, (long double), __exp10l_finite);
+#  endif
 # endif
 #endif
 
@@ -95,7 +132,11 @@ extern long double __REDIRECT_NTH (pow10l, (long double), __exp10l_finite);
 extern double __REDIRECT_NTH (exp2, (double), __exp2_finite);
 extern float __REDIRECT_NTH (exp2f, (float), __exp2f_finite);
 # ifdef __MATH_DECLARE_LDOUBLE
+#  ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (exp2l, (long double), __exp2_finite);
+#  else
 extern long double __REDIRECT_NTH (exp2l, (long double), __exp2l_finite);
+#  endif
 # endif
 #endif
 
@@ -103,8 +144,13 @@ extern long double __REDIRECT_NTH (exp2l, (long double), __exp2l_finite);
 extern double __REDIRECT_NTH (fmod, (double, double), __fmod_finite);
 extern float __REDIRECT_NTH (fmodf, (float, float), __fmodf_finite);
 #ifdef __MATH_DECLARE_LDOUBLE
+# ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (fmodl, (long double, long double),
+				   __fmod_finite);
+# else
 extern long double __REDIRECT_NTH (fmodl, (long double, long double),
 				   __fmodl_finite);
+# endif
 #endif
 
 #ifdef __USE_ISOC99
@@ -112,8 +158,13 @@ extern long double __REDIRECT_NTH (fmodl, (long double, long double),
 extern double __REDIRECT_NTH (hypot, (double, double), __hypot_finite);
 extern float __REDIRECT_NTH (hypotf, (float, float), __hypotf_finite);
 # ifdef __MATH_DECLARE_LDOUBLE
+#  ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (hypotl, (long double, long double),
+				   __hypot_finite);
+#  else
 extern long double __REDIRECT_NTH (hypotl, (long double, long double),
 				   __hypotl_finite);
+#  endif
 # endif
 #endif
 
@@ -122,42 +173,66 @@ extern long double __REDIRECT_NTH (hypotl, (long double, long double),
 extern double __REDIRECT_NTH (j0, (double), __j0_finite);
 extern float __REDIRECT_NTH (j0f, (float), __j0f_finite);
 # ifdef __MATH_DECLARE_LDOUBLE
+#  ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (j0l, (long double), __j0_finite);
+#  else
 extern long double __REDIRECT_NTH (j0l, (long double), __j0l_finite);
+#  endif
 # endif
 
 /* y0.  */
 extern double __REDIRECT_NTH (y0, (double), __y0_finite);
 extern float __REDIRECT_NTH (y0f, (float), __y0f_finite);
 # ifdef __MATH_DECLARE_LDOUBLE
+#  ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (y0l, (long double), __y0_finite);
+#  else
 extern long double __REDIRECT_NTH (y0l, (long double), __y0l_finite);
+#  endif
 # endif
 
 /* j1.  */
 extern double __REDIRECT_NTH (j1, (double), __j1_finite);
 extern float __REDIRECT_NTH (j1f, (float), __j1f_finite);
 # ifdef __MATH_DECLARE_LDOUBLE
+#  ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (j1l, (long double), __j1_finite);
+#  else
 extern long double __REDIRECT_NTH (j1l, (long double), __j1l_finite);
+#  endif
 # endif
 
 /* y1.  */
 extern double __REDIRECT_NTH (y1, (double), __y1_finite);
 extern float __REDIRECT_NTH (y1f, (float), __y1f_finite);
 # ifdef __MATH_DECLARE_LDOUBLE
+#  ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (y1l, (long double), __y1_finite);
+#  else
 extern long double __REDIRECT_NTH (y1l, (long double), __y1l_finite);
+#  endif
 # endif
 
 /* jn.  */
 extern double __REDIRECT_NTH (jn, (int, double), __jn_finite);
 extern float __REDIRECT_NTH (jnf, (int, float), __jnf_finite);
 # ifdef __MATH_DECLARE_LDOUBLE
+#  ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (jnl, (int, long double), __jn_finite);
+#  else
 extern long double __REDIRECT_NTH (jnl, (int, long double), __jnl_finite);
+#  endif
 # endif
 
 /* yn.  */
 extern double __REDIRECT_NTH (yn, (int, double), __yn_finite);
 extern float __REDIRECT_NTH (ynf, (int, float), __ynf_finite);
 # ifdef __MATH_DECLARE_LDOUBLE
+#  ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (ynl, (int, long double), __yn_finite);
+#  else
 extern long double __REDIRECT_NTH (ynl, (int, long double), __ynl_finite);
+#  endif
 # endif
 #endif
 
@@ -166,8 +241,13 @@ extern long double __REDIRECT_NTH (ynl, (int, long double), __ynl_finite);
 extern double __REDIRECT_NTH (lgamma_r, (double, int *), __lgamma_r_finite);
 extern float __REDIRECT_NTH (lgammaf_r, (float, int *), __lgammaf_r_finite);
 # ifdef __MATH_DECLARE_LDOUBLE
+#  ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (lgammal_r, (long double, int *),
+				   __lgamma_r_finite);
+#  else
 extern long double __REDIRECT_NTH (lgammal_r, (long double, int *),
 				   __lgammal_r_finite);
+#  endif
 # endif
 #endif
 
@@ -241,14 +321,22 @@ __extern_always_inline long double __NTH (gammal (long double __d))
 extern double __REDIRECT_NTH (log, (double), __log_finite);
 extern float __REDIRECT_NTH (logf, (float), __logf_finite);
 #ifdef __MATH_DECLARE_LDOUBLE
+# ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (logl, (long double), __log_finite);
+# else
 extern long double __REDIRECT_NTH (logl, (long double), __logl_finite);
+# endif
 #endif
 
 /* log10.  */
 extern double __REDIRECT_NTH (log10, (double), __log10_finite);
 extern float __REDIRECT_NTH (log10f, (float), __log10f_finite);
 #ifdef __MATH_DECLARE_LDOUBLE
+# ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (log10l, (long double), __log10_finite);
+# else
 extern long double __REDIRECT_NTH (log10l, (long double), __log10l_finite);
+# endif
 #endif
 
 #ifdef __USE_ISOC99
@@ -256,7 +344,11 @@ extern long double __REDIRECT_NTH (log10l, (long double), __log10l_finite);
 extern double __REDIRECT_NTH (log2, (double), __log2_finite);
 extern float __REDIRECT_NTH (log2f, (float), __log2f_finite);
 # ifdef __MATH_DECLARE_LDOUBLE
+#  ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (log2l, (long double), __log2_finite);
+#  else
 extern long double __REDIRECT_NTH (log2l, (long double), __log2l_finite);
+#  endif
 # endif
 #endif
 
@@ -271,16 +363,26 @@ extern long double __REDIRECT_NTH (ldexpl, (long double, int), scalbnl);
 extern double __REDIRECT_NTH (pow, (double, double), __pow_finite);
 extern float __REDIRECT_NTH (powf, (float, float), __powf_finite);
 #ifdef __MATH_DECLARE_LDOUBLE
+# ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (powl, (long double, long double),
+				   __pow_finite);
+# else
 extern long double __REDIRECT_NTH (powl, (long double, long double),
 				   __powl_finite);
+# endif
 #endif
 
 /* remainder.  */
 extern double __REDIRECT_NTH (remainder, (double, double), __remainder_finite);
 extern float __REDIRECT_NTH (remainderf, (float, float), __remainderf_finite);
 #ifdef __MATH_DECLARE_LDOUBLE
+# ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (remainderl, (long double, long double),
+				   __remainder_finite);
+# else
 extern long double __REDIRECT_NTH (remainderl, (long double, long double),
 				   __remainderl_finite);
+# endif
 #endif
 
 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
@@ -288,8 +390,13 @@ extern long double __REDIRECT_NTH (remainderl, (long double, long double),
 extern double __REDIRECT_NTH (scalb, (double, double), __scalb_finite);
 extern float __REDIRECT_NTH (scalbf, (float, float), __scalbf_finite);
 # ifdef __MATH_DECLARE_LDOUBLE
+#  ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (scalbl, (long double, long double),
+				   __scalb_finite);
+#  else
 extern long double __REDIRECT_NTH (scalbl, (long double, long double),
 				   __scalbl_finite);
+#  endif
 # endif
 #endif
 
@@ -297,14 +404,22 @@ extern long double __REDIRECT_NTH (scalbl, (long double, long double),
 extern double __REDIRECT_NTH (sinh, (double), __sinh_finite);
 extern float __REDIRECT_NTH (sinhf, (float), __sinhf_finite);
 #ifdef __MATH_DECLARE_LDOUBLE
+# ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (sinhl, (long double), __sinh_finite);
+# else
 extern long double __REDIRECT_NTH (sinhl, (long double), __sinhl_finite);
+# endif
 #endif
 
 /* sqrt.  */
 extern double __REDIRECT_NTH (sqrt, (double), __sqrt_finite);
 extern float __REDIRECT_NTH (sqrtf, (float), __sqrtf_finite);
 #ifdef __MATH_DECLARE_LDOUBLE
+# ifdef __NO_LONG_DOUBLE_MATH
+extern long double __REDIRECT_NTH (sqrtl, (long double), __sqrt_finite);
+# else
 extern long double __REDIRECT_NTH (sqrtl, (long double), __sqrtl_finite);
+# endif
 #endif
 
 #ifdef __USE_ISOC99
@@ -328,7 +443,11 @@ extern long double __gammal_r_finite (long double, int *);
 __extern_always_inline long double __NTH (tgammal (long double __d))
 {
   int __local_signgam = 0;
+#  ifdef __NO_LONG_DOUBLE_MATH
+  long double __res = __gamma_r_finite (__d, &__local_signgam);
+#  else
   long double __res = __gammal_r_finite (__d, &__local_signgam);
+#  endif
   return __local_signgam < 0 ? -__res : __res;
 }
 # endif

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7e0d315da842379f077fc61dca72460fb0e9263e

commit 7e0d315da842379f077fc61dca72460fb0e9263e
Author: Andreas Schwab <schwab@linux-m68k.org>
Date:   Tue Apr 3 18:38:46 2012 +0200

    Fix formatting of denormal IBM long double numbers

diff --git a/ChangeLog b/ChangeLog
index 931510b..ca38a87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
 
+	[BZ #13941]
+	* sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c
+	(__mpn_extract_long_double): Use DBL_MIN_EXP instead of
+	LDBL_MIN_EXP.
+	* stdio-common/Makefile (tests): Add tst-sprintf3.
+	* stdio-common/tst-sprintf3.c: New file.
+
 	* elf/Makefile ($(objpfx)tst-leaks1-mem, $(objpfx)noload-mem)
 	($(objpfx)tst-unused-dep.out): Don't run when cross-compiling.
 
diff --git a/NEWS b/NEWS
index 34cbf2d..fa1d45d 100644
--- a/NEWS
+++ b/NEWS
@@ -13,15 +13,15 @@ Version 2.16
   2554, 2562, 2563, 2565, 2566, 2576, 2636, 2678, 3335, 3768, 3866, 3868,
   3976, 3992, 4026, 4108, 4596, 4822, 5077, 5461, 5805, 5993, 6471, 6486,
   6578, 6649, 6730, 6770, 6794, 6884, 6890, 6894, 6895, 6907, 6911, 7064,
-  9739, 9902, 10110, 10135, 10140, 10153, 10210, 10254, 10346, 10545,
-  10716, 11174, 11322, 11365, 11451, 11494, 11521, 11959, 12047, 12340,
-  13058, 13525, 13526, 13527, 13528, 13529, 13530, 13531, 13532, 13533,
-  13547, 13551, 13552, 13553, 13555, 13559, 13566, 13583, 13592, 13618,
-  13637, 13656, 13658, 13673, 13691, 13695, 13704, 13705, 13706, 13726,
-  13738, 13739, 13760, 13761, 13786, 13792, 13806, 13824, 13840, 13841,
-  13844, 13846, 13851, 13852, 13854, 13871, 13872, 13873, 13879, 13883,
-  13886, 13892, 13895, 13908, 13910, 13911, 13912, 13913, 13915, 13916,
-  13917, 13918, 13919, 13920, 13921, 13926, 13927, 13928, 13938, 13963,
+  9739, 9902, 10110, 10135, 10140, 10153, 10210, 10254, 10346, 10545, 10716,
+  11174, 11322, 11365, 11451, 11494, 11521, 11959, 12047, 12340, 13058,
+  13525, 13526, 13527, 13528, 13529, 13530, 13531, 13532, 13533, 13547,
+  13551, 13552, 13553, 13555, 13559, 13566, 13583, 13592, 13618, 13637,
+  13656, 13658, 13673, 13691, 13695, 13704, 13705, 13706, 13726, 13738,
+  13739, 13760, 13761, 13786, 13792, 13806, 13824, 13840, 13841, 13844,
+  13846, 13851, 13852, 13854, 13871, 13872, 13873, 13879, 13883, 13886,
+  13892, 13895, 13908, 13910, 13911, 13912, 13913, 13915, 13916, 13917,
+  13918, 13919, 13920, 13921, 13926, 13927, 13928, 13938, 13941, 13963,
   13967, 13970, 13973, 14027
 
 * ISO C11 support:
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
index 8cf6335..7519bc1 100644
--- a/stdio-common/Makefile
+++ b/stdio-common/Makefile
@@ -56,7 +56,7 @@ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \
 	 tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
 	 bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
 	 scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 \
-	 bug-vfprintf-nargs tst-long-dbl-fphex tst-fphex-wide
+	 bug-vfprintf-nargs tst-long-dbl-fphex tst-fphex-wide tst-sprintf3
 
 test-srcs = tst-unbputc tst-printf
 
diff --git a/stdio-common/tst-sprintf3.c b/stdio-common/tst-sprintf3.c
new file mode 100644
index 0000000..d56f247
--- /dev/null
+++ b/stdio-common/tst-sprintf3.c
@@ -0,0 +1,90 @@
+/* Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* Test bug #13941.  */
+
+#include <float.h>
+#include <math.h>
+#include <stdio.h>
+#include <string.h>
+
+int
+main (void)
+{
+#if LDBL_MANT_DIG >= 106
+  volatile union { long double l; long long x[2]; } u, v;
+  char buf[64];
+#endif
+  int result = 0;
+
+#if LDBL_MANT_DIG == 106 || LDBL_MANT_DIG == 113
+# define COMPARE_LDBL(u, v) \
+  ((u).l == (v).l && (u).x[0] == (v).x[0] && (u).x[1] == (v).x[1])
+#else
+# define COMPARE_LDBL(u, v) ((u).l == (v).l)
+#endif
+
+#define TEST(val) \
+  do									   \
+    {									   \
+      u.l = (val);							   \
+      snprintf (buf, sizeof buf, "%.30LgL", u.l);			   \
+      if (strcmp (buf, #val) != 0)					   \
+	{								   \
+	  printf ("Error on line %d: %s != %s\n", __LINE__, buf, #val);	   \
+	  result = 1;							   \
+	}								   \
+      if (sscanf (#val, "%Lg", &v.l) != 1 || !COMPARE_LDBL (u, v))	   \
+	{								   \
+	  printf ("Error sscanf on line %d: %.30Lg != %.30Lg\n", __LINE__, \
+		  u.l, v.l);						   \
+	  result = 1;							   \
+	}								   \
+      /* printf ("%s %Lg %016Lx %016Lx\n", #val, u.l, u.x[0], u.x[1]); */  \
+    }									   \
+  while (0)
+
+#if LDBL_MANT_DIG >= 106
+# if LDBL_MANT_DIG == 106
+  TEST (2.22507385850719347803989925739e-308L);
+  TEST (2.22507385850719397210554509863e-308L);
+  TEST (2.22507385850720088902458687609e-308L);
+# endif
+  TEST (2.22507385850720138309023271733e-308L);
+  TEST (2.22507385850720187715587855858e-308L);
+  TEST (2.2250738585074419930597574044e-308L);
+  TEST (4.45014771701440227211481959342e-308L);
+  TEST (4.45014771701440276618046543466e-308L);
+  TEST (4.45014771701440375431175711716e-308L);
+  TEST (4.45014771701440474244304879965e-308L);
+  TEST (7.12023634722304600689881138745e-307L);
+  TEST (1.13923781555569064960474854133e-305L);
+  TEST (1.13777777777777776389998996996L);
+  TEST (1.13777777777777765287768750745L);
+  TEST (20988295479420645138.2044444444L);
+  TEST (20988295479420643090.2044444444L);
+  TEST (2.14668699894294423266045294316e-292L);
+# if LDBL_MANT_DIG == 106
+  TEST (-2.35993711055432139266626434123e-292L);
+  TEST (6.26323524637968345414769634658e-302L);
+  TEST (1.49327164802066885331814201989e-308L);
+  TEST (3.71834550652787023640837473722e-308L);
+  TEST (9.51896449671134907001349268087e-306L);
+# endif
+#endif
+  return result;
+}
diff --git a/sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c b/sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c
index 3162bbd..83162c5 100644
--- a/sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c
+++ b/sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1995,1996,1997,1998,1999,2002,2003,2006
-	Free Software Foundation, Inc.
+/* Copyright (C) 1995-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -104,7 +103,10 @@ __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size,
       else
 	{
 	  /* It is a denormal number, meaning it has no implicit leading
-  	     one bit, and its exponent is in fact the format minimum.  */
+	     one bit, and its exponent is in fact the format minimum.  We
+	     use DBL_MIN_EXP instead of LDBL_MIN_EXP below because the
+	     latter describes the properties of both parts together, but
+	     the exponent is computed from the high part only.  */
 	  int cnt;
 
 #if N == 2
@@ -115,7 +117,7 @@ __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size,
 	      res_ptr[N - 1] = res_ptr[N - 1] << cnt
 			       | (res_ptr[0] >> (BITS_PER_MP_LIMB - cnt));
 	      res_ptr[0] <<= cnt;
-	      *expt = LDBL_MIN_EXP - 1 - cnt;
+	      *expt = DBL_MIN_EXP - 1 - cnt;
 	    }
 	  else
 	    {
@@ -130,7 +132,7 @@ __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size,
 		  res_ptr[N - 1] = res_ptr[0] >> (NUM_LEADING_ZEROS - cnt);
 		  res_ptr[0] <<= BITS_PER_MP_LIMB - (NUM_LEADING_ZEROS - cnt);
 		}
-	      *expt = LDBL_MIN_EXP - 1
+	      *expt = DBL_MIN_EXP - 1
 		- (BITS_PER_MP_LIMB - NUM_LEADING_ZEROS) - cnt;
 	    }
 #else
@@ -161,7 +163,7 @@ __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size,
 
 	  for (; k >= 0; k--)
 	    res_ptr[k] = 0;
-	  *expt = LDBL_MIN_EXP - 1 - l * BITS_PER_MP_LIMB - cnt;
+	  *expt = DBL_MIN_EXP - 1 - l * BITS_PER_MP_LIMB - cnt;
 #endif
 	}
     }

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6d5c57fabd1a97b110b00e59fd52f50ce5bbb1a3

commit 6d5c57fabd1a97b110b00e59fd52f50ce5bbb1a3
Author: Andreas Schwab <schwab@linux-m68k.org>
Date:   Sat Nov 14 10:42:02 2009 +0100

    Don't run tests when cross-compiling

diff --git a/ChangeLog b/ChangeLog
index 677bf37..931510b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* elf/Makefile ($(objpfx)tst-leaks1-mem, $(objpfx)noload-mem)
+	($(objpfx)tst-unused-dep.out): Don't run when cross-compiling.
+
 2012-04-28  Joseph Myers  <joseph@codesourcery.com>
 
 	* conform/conformtest.pl: Remove duplicate typed-constant
diff --git a/elf/Makefile b/elf/Makefile
index fd766c5..32d113e 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -156,7 +156,9 @@ tests += tst-audit6 tst-audit7
 endif
 endif
 endif
+ifeq ($(cross-compiling),no)
 tests: $(objpfx)tst-leaks1-mem $(objpfx)noload-mem
+endif
 tlsmod17a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
 tlsmod18a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
 tlsmod17a-modules = $(addprefix tst-tlsmod17a, $(tlsmod17a-suffixes))
@@ -1119,7 +1121,9 @@ $(objpfx)tst-relsort1mod2.so: $(libm)
 $(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
 			   $(objpfx)tst-relsort1mod2.so
 
+ifeq ($(cross-compiling),no)
 tests: $(objpfx)tst-unused-dep.out
+endif
 
 $(objpfx)tst-unused-dep.out: $(objpfx)testobj1.so
 	LD_TRACE_LOADED_OBJECTS=1 \
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 194dcc3..def7f2c 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
+	run when cross-compiling.
+
 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
 	* sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
diff --git a/nptl/Makefile b/nptl/Makefile
index 52277dd..09acd8a 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -438,7 +438,9 @@ LDFLAGS-tst-atfork2 = -rdynamic
 tst-atfork2-ENV = MALLOC_TRACE=$(objpfx)tst-atfork2.mtrace
 $(objpfx)tst-atfork2mod.so: $(shared-thread-library)
 
+ifeq ($(cross-compiling),no)
 tests: $(objpfx)tst-stack3-mem
+endif
 tst-stack3-ENV = MALLOC_TRACE=$(objpfx)tst-stack3.mtrace
 $(objpfx)tst-stack3-mem: $(objpfx)tst-stack3.out
 	$(common-objpfx)malloc/mtrace $(objpfx)tst-stack3.mtrace > $@
@@ -459,7 +461,9 @@ $(objpfx)tst-tls5: $(objpfx)tst-tls5mod.so $(shared-thread-library)
 LDFLAGS-tst-tls5mod.so = -Wl,-soname,tst-tls5mod.so
 
 ifeq ($(build-shared),yes)
+ifeq ($(cross-compiling),no)
 tests: $(objpfx)tst-tls6.out
+endif
 $(objpfx)tst-tls6.out: tst-tls6.sh $(objpfx)tst-tls5 \
 		       $(objpfx)tst-tls5moda.so $(objpfx)tst-tls5modb.so \
 		       $(objpfx)tst-tls5modc.so $(objpfx)tst-tls5modd.so \

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                              |   15 ++++
 NEWS                                   |   18 +++---
 elf/Makefile                           |    4 +
 math/bits/math-finite.h                |  119 ++++++++++++++++++++++++++++++++
 nptl/ChangeLog                         |    5 ++
 nptl/Makefile                          |    4 +
 stdio-common/Makefile                  |    2 +-
 stdio-common/tst-sprintf3.c            |   90 ++++++++++++++++++++++++
 sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c |   14 ++--
 9 files changed, 255 insertions(+), 16 deletions(-)
 create mode 100644 stdio-common/tst-sprintf3.c


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]