problem with <tgmath.h>

Lev S Bishop lev.bishop@yale.edu
Fri May 7 00:20:00 GMT 2004


On Thu, 6 May 2004, Ulrich Drepper wrote:

> Yep, this is a bug in tgmath.h.  I've fixed it now.

Thanks for the quick fix. I think the problem also exists for fabs() and
carg().  Here's my attempt at a patch for those cases.

[lsb32@bulldoga tgmath]$ diff -u -p  tgmath.h tgmath.h.orig
--- tgmath.h    2004-05-06 19:42:44.000000000 -0400
+++ tgmath.h.orig       2004-05-06 19:46:56.000000000 -0400
@@ -346,7 +346,7 @@
 #define ceil(Val) __TGMATH_UNARY_REAL_ONLY (Val, ceil)

 /* Absolute value of X.  */
-#define fabs(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL (Val, fabs, cabs)
+#define fabs(Val) __TGMATH_UNARY_REAL_IMAG (Val, fabs, cabs)

 /* Largest integer not greater than X.  */
 #define floor(Val) __TGMATH_UNARY_REAL_ONLY (Val, floor)
@@ -439,7 +439,7 @@
 /* Absolute value, conjugates, and projection.  */

 /* Argument value of Z.  */
-#define carg(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL (Val, carg, carg)
+#define carg(Val) __TGMATH_UNARY_REAL_IMAG (Val, carg, carg)

 /* Complex conjugate of Z.  */
 #define conj(Val) __TGMATH_UNARY_REAL_IMAG (Val, conj, conj)


Lev




More information about the Libc-alpha mailing list