Mail Archives: djgpp/2000/01/19/10:48:41
On Tue, 18 Jan 2000, Damian Yerrick wrote:
> >the ANSI Standard
>
> does not define the behavior of __DJGPP__.
No, but it does define general rules for interoperability between the
compiler and the library, including the header files.
> >says that a program which doesn't include any header files
> >should still have the same behavior as when it does.
>
> How would certain programs work without math.h?
Exactly like they did before ANSI C invented the prototypes: you need
to put either the definition of a function or its protoype before you
use it. The prototype doesn't *have* to come from a header file.
But while you can require this for standard functions like sin and
atan2, it's unreasonable to do that for library-private symbols like
__DJGPP__.
Incidentally, stdio.h doesn't include any functions that take floats
or doubles, so you can easily write a program that doesn't include
stdio.h and still works perfectly. Most of the functions in stdio.h
(those which return an int or a void) don't need a prototype to work
correctly.
- Raw text -