functions and headers

Karl Heuer karl at IMA.IMA.ISC.COM
Wed Jul 25 08:29:02 AEST 1990


From:  karl at IMA.IMA.ISC.COM (Karl Heuer)

In which header should ctermid() and cuserid() be declared?  Traditionally
they have been found in <stdio.h>, which is where their L_ constants are
defined, but they aren't listed there in 2.8.3.  Is this an oversight which
is being corrected in a supplement, or do these functions go in <unistd.h>
(as implied by the default clause of 2.8.3)?

How about popen() and pclose()?  These aren't listed in 1003.1 at all,
presumably because they use shell syntax and so they're described by 1003.2.
Should they go in <stdio.h>, <unistd.h>, or nowhere?  (XPG3 says they're
declared in <stdio.h>, but does not mark this as an extension over POSIX.)

Karl W. Z. Heuer (karl at kelp.ima.isc.com or ima!kelp!karl), The Walking Lint

Volume-Number: Volume 20, Number 141



More information about the Comp.std.unix mailing list