This is the mail archive of the libc-hacker@sourceware.cygnus.com 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]

A patch for glibc


Hi,

Those tests don't work with size of mp_limb_t == 8. Here is a patch
to skip them.


-- 
H.J. Lu (hjl@gnu.org)
---
Wed Aug  5 07:21:44 1998  H.J. Lu  (hjl@gnu.org)

	* math/atest-exp.c (main): Skip the test if size of mp_limb_t
	is 8.
	* math/atest-exp2.c (main): Likewise.
	* math/atest-sincos.c (main): Likewise.

Index: math/atest-exp.c
===================================================================
RCS file: /home/work/cvs/gnu/glibc/math/atest-exp.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 atest-exp.c
--- math/atest-exp.c	1998/06/27 22:00:48	1.1.1.2
+++ math/atest-exp.c	1998/08/05 20:18:31
@@ -112,7 +112,16 @@ main (void)
    int failures = 0;
    mp1 maxerror;
    int maxerror_s = 0;
-   const double sf = pow (2, mpbpl);
+   const double sf;
+
+   if (sizeof (mp_limb_t) == 8)
+     {
+       printf ("size of mp_limb_t (%d) is not implemented, test ignored.\n",
+	       sizeof (mp_limb_t));
+       return 0;
+     }
+
+   sf = pow (2, mpbpl);
 
    /* assert (mpbpl == mp_bits_per_limb); */
    assert (FRAC / mpbpl * mpbpl == FRAC);
Index: math/atest-exp2.c
===================================================================
RCS file: /home/work/cvs/gnu/glibc/math/atest-exp2.c,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 atest-exp2.c
--- math/atest-exp2.c	1998/06/27 22:00:49	1.1.1.3
+++ math/atest-exp2.c	1998/08/05 20:18:50
@@ -163,7 +163,16 @@ main (void)
   int failures = 0;
   mp1 maxerror;
   int maxerror_s = 0;
-  const double sf = pow (2, mpbpl);
+  const double sf;
+
+  if (sizeof (mp_limb_t) == 8)
+    {
+      printf ("size of mp_limb_t (%d) is not implemented, test ignored.\n",
+	      sizeof (mp_limb_t));
+      return 0;
+    }
+
+  sf = pow (2, mpbpl);
 
   /* assert(mpbpl == mp_bits_per_limb); */
   assert(FRAC / mpbpl * mpbpl == FRAC);
Index: math/atest-sincos.c
===================================================================
RCS file: /home/work/cvs/gnu/glibc/math/atest-sincos.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 atest-sincos.c
--- math/atest-sincos.c	1998/06/27 22:00:51	1.1.1.2
+++ math/atest-sincos.c	1998/08/05 20:18:59
@@ -148,7 +148,16 @@ main (void)
   int sin_failures = 0, cos_failures = 0;
   mp1 sin_maxerror, cos_maxerror;
   int sin_maxerror_s = 0, cos_maxerror_s = 0;
-  const double sf = pow (2, mpbpl);
+  const double sf;
+
+  if (sizeof (mp_limb_t) == 8)
+    {
+      printf ("size of mp_limb_t (%d) is  not implemented, test ignored.\n",
+	      sizeof (mp_limb_t));
+      return 0;
+    }
+
+  sf = pow (2, mpbpl);
 
   /* assert(mpbpl == mp_bits_per_limb);  */
   assert(FRAC / mpbpl * mpbpl == FRAC);


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