delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/19/10:48:41

From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: make depend
Date: Wed, 19 Jan 2000 11:46:40 +0200
Organization: NetVision Israel
Lines: 28
Message-ID: <Pine.SUN.3.91.1000119114615.9609O-100000@is>
References: <Pine DOT A41 DOT 4 DOT 05 DOT 10001171922480 DOT 64218-100000 AT ieva01 DOT lanet DOT lv> <Pine DOT SUN DOT 3 DOT 91 DOT 1000118095433 DOT 3041E-100000 AT is> <a5g98sc8do8rns17qun3r9l68j3n3aqu3u AT 4ax DOT com>
NNTP-Posting-Host: is.elta.co.il
Mime-Version: 1.0
X-Trace: news.netvision.net.il 948275398 1469 199.203.121.2 (19 Jan 2000 09:49:58 GMT)
X-Complaints-To: abuse AT netvision DOT net DOT il
NNTP-Posting-Date: 19 Jan 2000 09:49:58 GMT
X-Sender: eliz AT is
In-Reply-To: <a5g98sc8do8rns17qun3r9l68j3n3aqu3u@4ax.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019