diff options
Diffstat (limited to '')
-rw-r--r-- | lang/modula-3-socks/files/write.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lang/modula-3-socks/files/write.c b/lang/modula-3-socks/files/write.c new file mode 100644 index 000000000000..fc9412ea0774 --- /dev/null +++ b/lang/modula-3-socks/files/write.c @@ -0,0 +1,15 @@ +#include "wrap.h" +#include <sys/types.h> +#include <unistd.h> + +size_t +m3_write(int fd, const void *buf, int nbytes) +{ + int result; + + ENTER_CRITICAL; + MAKE_READABLE(buf); + result = write(fd, buf, nbytes); + EXIT_CRITICAL; + return result; +} |