X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2F_PDCLIB%2Fprepwrite.c;h=0b31529d5d74693e40c97010d8d946acb549cbf8;hb=f2e874bbb30fa8857975a683a17dce7669524520;hp=148e1c144c0bcec02e88220e136210ecc73f02cb;hpb=7af1f0a20869ff41a951132d14bcc5f6b647fd07;p=pdclib.old 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; }