Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Sep 1996 10:07:19 +0200 (MET DST)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        freebsd-hackers@freebsd.org (FreeBSD hackers)
Subject:   Re: void main
Message-ID:  <199609050807.KAA00701@uriah.heep.sax.de>
In-Reply-To: <87loepbfko.fsf@freebsd.gaffaneys.com> from Zach Heilig at "Sep 5, 96 02:12:39 am"

next in thread | previous in thread | raw e-mail | index | archive | help
As Zach Heilig wrote:

> > int main (int argc, char *argv[], char *env[]);
> 
> It is listed as a common extension in either an appendix or footnote
> of the standard  ...
>   Why they didn't is beyond be (but Terry Labert's explanation
> might be close to the real reason).

It's not needed either.  In a Unix programming environment, you can
always access the program environment via ``extern char **environ''.
char *env[] in main() would be useless for implementing functions
like getenv() anyway.  The standard blesses getenv(), but doesn't
mandate the way how it is actually implemented.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609050807.KAA00701>