[PATCH] Fix ilogb exception and errno (bug 6794)

Thomas Schwinge thomas@codesourcery.com
Sun Jul 22 20:30:00 GMT 2012


Hi!

On Wed, 11 Apr 2012 16:30:13 -0300, Adhemerval Zanella <azanella@linux.vnet.ibm.com> wrote:
> 2012-04-11  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
> 
> 	[BZ #6794]

> 	* math/w_ilogb.c: New file: ilogb wrapper.
> 	* math/w_ilogbf.c: New file: ilogbf wrapper.
> 	* math/w_ilogbl.c: New file: ilogbl wrapper.

I pushed the following in commit
c23c33b01e2043fefd00b353b45844822905b43b.  In commit
38de94a5efbc3de186d6f287d666f74e5b4c8247, Roland already fixed
math/w_ilogbf.c, but not the other files.  ;-)

	* math/w_ilogb.c: Include <limits.h>.
	* math/w_ilogbl.c: Likewise.

diff --git a/math/w_ilogb.c b/math/w_ilogb.c
index c87b517..7cb897a 100644
--- a/math/w_ilogb.c
+++ b/math/w_ilogb.c
@@ -18,6 +18,7 @@
 
 #include <math.h>
 #include <errno.h>
+#include <limits.h>
 #include <math_private.h>
 
 /* wrapper ilogb */
@@ -34,7 +35,6 @@ __ilogb (double x)
     }
   return r;
 }
-
 weak_alias (__ilogb, ilogb)
 #ifdef NO_LONG_DOUBLE
 strong_alias (__ilogb, __ilogbl)
diff --git a/math/w_ilogbf.c b/math/w_ilogbf.c
index 27a0c58..aa48bc4 100644
--- a/math/w_ilogbf.c
+++ b/math/w_ilogbf.c
@@ -35,5 +35,4 @@ __ilogbf (float x)
     }
   return r;
 }
-
 weak_alias (__ilogbf, ilogbf)
diff --git a/math/w_ilogbl.c b/math/w_ilogbl.c
index 8c30caa..7cfc648 100644
--- a/math/w_ilogbl.c
+++ b/math/w_ilogbl.c
@@ -18,6 +18,7 @@
 
 #include <math.h>
 #include <errno.h>
+#include <limits.h>
 #include <math_private.h>
 
 /* wrapper ilogbl */


Grüße,
 Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120722/df3927e6/attachment.sig>


More information about the Libc-alpha mailing list