X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2F_PDCLIB%2Fprepwrite.c;h=0b31529d5d74693e40c97010d8d946acb549cbf8;hp=148e1c144c0bcec02e88220e136210ecc73f02cb;hb=7015f5842d05bd5da32523048e4260e60e9e310c;hpb=2546ca02850b8d684a694dc7373887f7aec994dc diff --git a/functions/_PDCLIB/prepwrite.c b/functions/_PDCLIB/prepwrite.c index 148e1c1..0b31529 100644 --- a/functions/_PDCLIB/prepwrite.c +++ b/functions/_PDCLIB/prepwrite.c @@ -7,6 +7,7 @@ */ #include +#include int _PDCLIB_prepwrite( struct _PDCLIB_file_t * stream ) { @@ -18,7 +19,7 @@ int _PDCLIB_prepwrite( struct _PDCLIB_file_t * stream ) See the comments on implementation-defined errno values in <_PDCLIB_config.h>. */ - _PDCLIB_errno = _PDCLIB_ERROR; + errno = EINVAL; stream->status |= _PDCLIB_ERRORFLAG; return EOF; }