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