POSIX vs SVID

Don_Lewine at dgc.ceo.dg.com Don_Lewine at dgc.ceo.dg.com
Wed Aug 15 08:44:12 AEST 1990


From:  Don_Lewine at dgc.ceo.dg.com

CEO summary:
I have been comparing SVID Issue 3 (for V.4) to IEEE Std 1003.1-1988. 
I noticed that the SVID specifies header files in the synopsis for 
various functions that are not required for POSIX.  For example,
POSIX says that setuid() requires that <sys/types.h> be included.  
The SVID requires that both <sys/types.h> and <unistd.h> be included.
 
Question: Is there anything wrong with this?  If I write a strictly
conforming application, can I include <unistd.h> for SVID 
compatibility even if POSIX does not require it?  Is there any 
problem with including "extra" header files (other than the obvious 
restrictions on the namespace)?
 
BTW, looking at the SVR4 code there is nothing in <unistd.h> that 
would require it to be included for setuid().  There do not seem to 
be any symbols in the header file that are prohibited.  However, this 
is a standards questions and reading the .h files is cheating!





Volume-Number: Volume 21, Number 30



More information about the Comp.std.unix mailing list