Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!uunet.UU.NET!sef From: gwc@root.co.uk (Geoff Clare) Newsgroups: comp.std.unix Subject: Re: Is this POSIX compliant? Message-ID: <1991Jun15.180507.6722@uunet.uu.net> Date: 14 Jun 91 17:53:02 GMT References: <4369@rwthinf.UUCP> <4369@rwthinf.UUCP>, <1991Jun12.035046.16547@uunet.uu.net> Sender: usenet@uunet.uu.net (UseNet News) Organization: UniSoft Ltd., London, England Lines: 59 Approved: sef@uunet.uu.net (Moderator, Sean Eric Fagan - comp.std.unix) Originator: sef@uunet.UU.NET Nntp-Posting-Host: uunet.uu.net X-Submissions: std-unix@uunet.uu.net Submitted-by: gwc@root.co.uk (Geoff Clare) berg@physik.tu-muenchen.de (Stephen R. van den Berg) wrote: ] Could someone knowledgable please tell me if the following include files, ] the mentioned identifiers and the include files they are 'allocated' to are ] all conform the POSIX standard? (I dont't have any POSIX literature, ] so all the data I present here are educated guesses). I emailed my answer to Stephen like a good net.user, but now I see that an incorrect answer has been posted to the newsgroup, so I feel obliged to waste more bandwidth by correcting it. lewine@cheshirecat.webo.dg.com (Donald Lewine) writes: ]|> ] #include ] ^^^^^^^^^^^^^^^^^^ unistd.h contains the prototypes for the ] functions you list and should be included in ] an ANSI C system. Except that open() is in , not . Also the comments regarding prototypes and ANSI C are misleading. The original poster asked about "POSIX", he didn't specify "POSIX with ANSI C", so I assume he wants answers which apply equally well to POSIX with either common C or ANSI C. ]|> #include /* EOF */ ] NO. EOF is defined in . ] defines: ] NULL, offsetof, ptrdiff_t, size_t, wchar_t is not required by POSIX.1. ]|> #include /* getenv() memmove() malloc() realloc() ]|> free() strtol() size_t */ ] memmove() is in all others are ] in memmove() and strtol() are not required by POSIX.1. ]|> #include /* signal() kill() */ signal() is not required by POSIX.1. ]A complete listing of the POSIX headers is in Appendix A of the ]POSIX Programmer's Guide available for $34.95 from: (address deleted) ]In my not so humble opinion, the POSIX Programmer's Guide is ]required reading for anyone who wants to write programs that ]work on all POSIX systems. I hope it wasn't the source of the errors above. -- Geoff Clare (Dumb American mailers: ...!uunet!root.co.uk!gwc) UniSoft Limited, London, England. Tel: +44 71 729 3773 Fax: +44 71 729 3273 Volume-Number: Volume 24, Number 7