Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!usenix!std-unix From: donn@hpfcrn.fc.hp.com (Donn Terry) Newsgroups: comp.std.unix Subject: Re: Question about atexit() Message-ID: <450@usenix.ORG> Date: 22 Aug 90 16:30:42 GMT References: <444@usenix.ORG> <443@usenix.ORG> <442@usenix.ORG> Sender: std-unix@usenix.ORG Lines: 36 Approved: jsq@usenix.org (Moderator, John Quarterman) X-Submissions: std-unix@uunet.uu.net From: Donn Terry The list at the beginning of chapter 8 is NOT a list of the requirements of POSIX.1 on the C standard, although it is often misread that way. It is a list of functions *from the C standard* that must be provided by a "common usage" implementation. That list will (as far as I can predict) be completely removed from the first version of the standard that doesn't discuss common usage, and rely solely on the pointer from POSIX.1 C-language binding to X3.159/ISO 9xxx (someone can fill in the number, I forget) for all Standard C functions. Also, if you read the requirements on common usage closely enough, you realize that if you document it well enough, you probably could get away with a Fortran compiler. (OK... maybe that's an exaggeration, but not by a whole lot.) Doug Gwyn is right: specify the Standard C conformant option to POSIX (or simply specify Standard C) and you'll get atexit(). (Also, until POSIX.1 is stated in terms soley of Standard C (when it ceases to be necessary), there is nothing at all to prevent POSIX.4 from requiring that atexit() with the Standard C semantics be provided in common-usage implementations. POSIX.4 could also simply require Standard C to be conformant, although I doubt that that would succeed in balloting.) Atexit() was omitted primarily because it was an X3J11 invetion that was not rapidly being included in common usage compilers. Since (transitional) backwards compatabilty of implementations was a concern for POSIX.1, that was a reasonable decision two years (or more) ago. Donn Terry Speaking only for myself, as I always have to say. volume-Number: Volume 21, Number 52