Mark __libc_resp with attribute_tls_model_ie for consistency with __resp
[glibc/nacl-glibc.git] / sysdeps / nacl / read.c
blob84357bf9ce51a62eafcababf544d99382a469817
2 #include <errno.h>
3 #include <unistd.h>
4 #include <stddef.h>
6 #include <nacl_syscalls.h>
9 ssize_t __libc_read (int fd, void *buf, size_t size)
11 int (*nacl_read)(int fd, void *buf, size_t size) =
12 NACL_SYSCALL_ADDR(NACL_sys_read);
13 int result = nacl_read(fd, buf, size);
14 if (result < 0) {
15 errno = -result;
16 return -1;
18 return result;
20 libc_hidden_def (__libc_read)
21 weak_alias (__libc_read, __read)
22 libc_hidden_weak (__read)
23 weak_alias (__libc_read, read)
24 strong_alias (__libc_read, __read_nocancel)