This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: Problems with <tgmath.h>
On Thu, Dec 16, 1999 at 12:55:15PM +0100, Andreas Jaeger wrote:
> >>>>> Daniel Jacobowitz writes:
>
> > More troublesome: <tgmath.h> generates calls to func, funcf, and funcl
> > for each math function, but without __USE_MISC || __USE_ISOC9X, funcf
> > does not get defined. Also, funcl does not get defined if
> > -D__NO_LONG_DOUBLE_MATH, which is always set on powerpc, at least.
>
> > This produces wrong output from calling trunc() on a float without
> > __USE_MISC || __USE_ISOC9X, because the float is converted incorrectly.
>
> tgmath.h is part of ISO C99 - therefore you should use _ISOC9X_SOURCE
> when including the file.
In which case, I would think it appropriate for _ISOC9X_SOURCE
undefined to be an error in tgmath.h. This is a stupid mistake to
make, and miserable to track down - is there any reason not to make
things more obvious?
Dan
/--------------------------------\ /--------------------------------\
| Daniel Jacobowitz |__| SCS Class of 2002 |
| Debian GNU/Linux Developer __ Carnegie Mellon University |
| dan@debian.org | | dmj+@andrew.cmu.edu |
\--------------------------------/ \--------------------------------/