Open System Services System Calls Reference Manual (G06.28+, H06.05+)

spt_putcx(2) OSS System Calls Reference Manual
the source). Consequently, you cannot use this interface where a function is necessary; for
example, a subroutine pointer cannot point to it. In addition, spt_putcx( ) does not work
correctly with a stream parameter that has side effects. In particular, the following does not
work:
spt_putcx(*f++)
When a function is necessary, use the spt_fputcx( ) function instead.
RETURN VALUES
The spt_putcx( ) function and macro, upon successful completion, returns the value written. If
this function or macro fails, it returns the constant EOF. The function sets errno when an error
is encountered.
If the le descriptor underlying stream becomes invalid (is closed by another thread), EOF is
returned with an errno value of [EBADF]. If a signal is received via the pthread_kill(2) func-
tion and is not blocked, ignored, or handled, EOF is returned with an errno value of [EINTR].
ERRORS
The spt_putcx( ) function fails if:
The stream parameter is not open for writing.
The output le size cannot be increased.
The stream is unbuffered
The buffer of the stream needs to be ushed and the function call causes an
underlying spt_writex() or lseek() to be invoked and this underlying operation
fails.
In addition, if any of these conditions occur, the spt_putcx( ) function sets errno to the
corresponding value:
[EAGAIN] The O_NONBLOCK ag is set for the le descriptor underlying the
output stream and the process would be delayed in the write operation.
[EBADF] The le descriptor underlying the output stream is not a valid le
descriptor open for writing.
[EFBIG] An attempt was made to write to a le that exceeds the processs le size
limit or the maximum le size.
[EINTR] The write operation was interrupted by a signal that was caught, and no
data was transferred.
[EIO] The implementation supports job control; the process is a member of a
background process group attempting to write to its controlling terminal;
TOSTOP is set; the process is neither ignoring nor blocking SIGTTOU;
and the process group of the process is orphaned. This error might also
be returned under implementation-dened conditions.
[ENOMEM] Insufcient memory storage space is available.
[ENOSPC] No free space was remaining on the device containing the le.
7226 Hewlett-Packard Company 527186-007