diff options
Diffstat (limited to 'libio/stdio/putw.c')
-rw-r--r-- | libio/stdio/putw.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libio/stdio/putw.c b/libio/stdio/putw.c new file mode 100644 index 00000000000..fd73261359c --- /dev/null +++ b/libio/stdio/putw.c @@ -0,0 +1,15 @@ +#include "libioP.h" +#include "stdio.h" + +#undef putw + +int +putw(w, fp) + int w; + FILE *fp; +{ + _IO_size_t written; + CHECK_FILE(fp, EOF); + written = _IO_sputn(fp, (const char *)&w, sizeof(w)); + return written == sizeof(w) ? 0 : EOF; +} |