1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-01 22:05:08 +00:00
freebsd-ports/lang/modula-3-socks/files/read.c

16 lines
237 B
C
Raw Normal View History

#include "wrap.h"
#include <sys/types.h>
#include <unistd.h>
ssize_t
m3_read(int d, void *buf, size_t nbytes)
{
int result;
ENTER_CRITICAL;
MAKE_WRITABLE(buf);
result = read(d, buf, nbytes);
EXIT_CRITICAL;
return result;
}