Subject: None
To: Jonathan Stone <>
From: Perry E. Metzger <>
List: current-users
Date: 03/27/1996 00:50:05
Jonathan Stone writes:
> and named-xfer/named-xfer.c.   Those programs were (I assume,
> deliberately) written to avoid returning from main(). They consistently
> use exit() instead.  The end of main() is marked with /*NOTREACHED*/
> for lint.   I think there are perfectly reasonable arguments for
> declaring main() as returning void in such circumstances.


1) It violates ANSI.
2) It makes the semantics of what value is returned to the calling
   program ambiguous.

Main is int, just as argc is int and argv is a char**; these aren't
user defined.

> There's one very important principle at stake here that I haven't
> seen explicitly addressed.  That principle is that ``third-party''
> software in the NetBSD tree should be kept as close as possible
> to the third party's original version -- at least, if the third
> party is actually maintaining that software.

True enough, but the "right thing" there is to contribute back bug
fixes for the obvious non-ansiisms. the changes aren't so big
(i.e. changing a void to an int) to make it a problem.

> IMHO, adding local hacks to named is not necessarily "added value"
> or even sensible.

We have local hacks in our bind; see the man page for resolv.conf.