This is the mail archive of the libc-alpha@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]

Re: Problems with <tgmath.h>


On Fri, Dec 17, 1999 at 08:16:41AM -0800, Ulrich Drepper wrote:
> Daniel Jacobowitz <drow@false.org> writes:
> 
> > In which case, I would think it appropriate for _ISOC9X_SOURCE
> > undefined to be an error in tgmath.h.
> 
> It's also undefined to include unistd.h without defining _POSIX_SOURCE
> or something which includes it.  If you are using the header you must
> know where it comes from.  Otherwise you wouldn't use it.

Could there perhaps be a comment in <tgmath.h> indicating this?

I disagree with "you must know where it comes from"; very frequently, I
need a function that does something, and I grep /usr/include a bit to
see if there is a standard library function that does what I want it
to.  If I find something in <tgmath.h> that way I won't know that it is
part of ISO c9x, and nothing in the file indicates that it requires ISO
c9x to be defined; just a comment saying that it is according to
section 7.9 of the standard.

Why allow gratuitous programmer stupidity?  If it is undefined to
include <tgmath.h> without _ISOC9X_SOURCE, make it an error!

Dan

/--------------------------------\  /--------------------------------\
|       Daniel Jacobowitz        |__|        SCS Class of 2002       |
|   Debian GNU/Linux Developer    __    Carnegie Mellon University   |
|         dan@debian.org         |  |       dmj+@andrew.cmu.edu      |
\--------------------------------/  \--------------------------------/

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