mirror of
https://github.com/fluencelabs/musl
synced 2025-05-05 12:02:13 +00:00
this is not a standard but it's the traditional behavior and it's more useful because the caller can reliably detect errors.
8 lines
112 B
C
8 lines
112 B
C
#define _GNU_SOURCE
|
|
#include <stdio.h>
|
|
|
|
int putw(int x, FILE *f)
|
|
{
|
|
return (int)fwrite(&x, sizeof x, 1, f)-1;
|
|
}
|