From: aoliva Date: Fri, 10 Mar 2000 17:57:31 +0000 (+0000) Subject: * libc/stdio/putw.c (putw): Return 0 on success, to be compliant X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=77ddf2719142030ecdd162c7377c0d20d6d7d968;p=pf3gnuchains%2Fsourceware.git * libc/stdio/putw.c (putw): Return 0 on success, to be compliant with XSH5, not SVID. --- diff --git a/newlib/ChangeLog b/newlib/ChangeLog index cda46e7ac7..a8642badc1 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +Fri Mar 10 14:53:50 2000 Alexandre Oliva + + * libc/stdio/putw.c (putw): Return 0 on success, to be compliant + with XSH5, not SVID. + Thu Mar 9 17:20:41 2000 Jeff Johnston * libc/include/string.h: Changed last argument back to ssize_t diff --git a/newlib/libc/stdio/putw.c b/newlib/libc/stdio/putw.c index 4bcefaf7d2..19f4abc014 100644 --- a/newlib/libc/stdio/putw.c +++ b/newlib/libc/stdio/putw.c @@ -37,10 +37,7 @@ DESCRIPTION to write a word to the file or stream identified by <[fp]>. As a side effect, <> advances the file's current position indicator. -RETURNS The written word, unless the host system reports a write -error, in which case <> returns <>. Since <> is a -valid <>, you must use <> or <> to distinguish -these situations when writing the integer equal to <>. +RETURNS Zero on success, <> on failure. PORTABILITY <> is a remnant of K&R C, it is not part of any ISO C Standard. @@ -62,5 +59,5 @@ putw (w, fp) { if (fwrite((const char*)&w, sizeof(w), 1, fp) != 1) return EOF; - return w; + return 0; }