OLD | NEW |
1 #include <string.h> | 1 #include <string.h> |
2 #include <sys/stat.h> | 2 #include <sys/stat.h> |
3 #include <time.h> | 3 #include <time.h> |
4 #include <nacl_stat.h> | 4 #include <nacl_stat.h> |
5 #include <nacl_syscalls.h> | 5 #include <nacl_syscalls.h> |
6 #define stat nacl_abi_stat | 6 #define stat nacl_abi_stat |
7 #include <irt.h> | 7 #include <irt.h> |
8 #undef stat | 8 #undef stat |
9 #include <irt_syscalls.h> | 9 #include <irt_syscalls.h> |
10 #ifdef IS_IN_rtld | 10 #ifdef IS_IN_rtld |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 int (*__nacl_irt_close) (int fd); | 298 int (*__nacl_irt_close) (int fd); |
299 int (*__nacl_irt_read) (int fd, void *buf, size_t count, size_t *nread); | 299 int (*__nacl_irt_read) (int fd, void *buf, size_t count, size_t *nread); |
300 int (*__nacl_irt_write) (int fd, const void *buf, size_t count, size_t *nwrote); | 300 int (*__nacl_irt_write) (int fd, const void *buf, size_t count, size_t *nwrote); |
301 int (*__nacl_irt_seek) (int fd, off_t offset, int whence, off_t *new_offset); | 301 int (*__nacl_irt_seek) (int fd, off_t offset, int whence, off_t *new_offset); |
302 int (*__nacl_irt_dup) (int fd, int *newfd); | 302 int (*__nacl_irt_dup) (int fd, int *newfd); |
303 int (*__nacl_irt_dup2) (int fd, int newfd); | 303 int (*__nacl_irt_dup2) (int fd, int newfd); |
304 int (*__nacl_irt_fstat) (int fd, struct nacl_abi_stat *); | 304 int (*__nacl_irt_fstat) (int fd, struct nacl_abi_stat *); |
305 int (*__nacl_irt_stat) (const char *pathname, struct nacl_abi_stat *); | 305 int (*__nacl_irt_stat) (const char *pathname, struct nacl_abi_stat *); |
306 int (*__nacl_irt_getdents) (int fd, struct dirent *, size_t count, | 306 int (*__nacl_irt_getdents) (int fd, struct dirent *, size_t count, |
307 size_t *nread); | 307 size_t *nread); |
308 int (*__nacl_irt_socket) (int domain, int type, int protocol); | 308 int (*__nacl_irt_socket) (int domain, int type, int protocol, int *ret); |
309 int (*__nacl_irt_accept) (int sockfd, struct sockaddr *addr, | 309 int (*__nacl_irt_accept) (int sockfd, struct sockaddr *addr, |
310 socklen_t *addrlen); | 310 socklen_t *addrlen, int *ret); |
311 int (*__nacl_irt_bind) (int sockfd, const struct sockaddr *addr, socklen_t addrl
en); | 311 int (*__nacl_irt_bind) (int sockfd, const struct sockaddr *addr, socklen_t addrl
en); |
312 int (*__nacl_irt_listen) (int sockfd, int backlog); | 312 int (*__nacl_irt_listen) (int sockfd, int backlog); |
313 int (*__nacl_irt_connect) (int sockfd, const struct sockaddr *addr, | 313 int (*__nacl_irt_connect) (int sockfd, const struct sockaddr *addr, |
314 socklen_t addrlen); | 314 socklen_t addrlen); |
315 int (*__nacl_irt_send) (int sockfd, const void *buf, size_t len, int flags, | 315 int (*__nacl_irt_send) (int sockfd, const void *buf, size_t len, int flags, |
316 int* ret); | 316 int* ret); |
317 int (*__nacl_irt_sendmsg) (int sockfd, const struct msghdr *msg, int flags, | 317 int (*__nacl_irt_sendmsg) (int sockfd, const struct msghdr *msg, int flags, |
318 int* ret); | 318 int* ret); |
319 int (*__nacl_irt_sendto) (int sockfd, const void *buf, size_t len, int flags, | 319 int (*__nacl_irt_sendto) (int sockfd, const void *buf, size_t len, int flags, |
320 const struct sockaddr *dest_addr, socklen_t addrlen, | 320 const struct sockaddr *dest_addr, socklen_t addrlen, |
321 int* ret); | 321 int* ret); |
322 int (*__nacl_irt_recv) (int sockfd, void *buf, size_t len, int flags, int* ret); | 322 int (*__nacl_irt_recv) (int sockfd, void *buf, size_t len, int flags, int* ret); |
323 int (*__nacl_irt_recvmsg) (int sockfd, struct msghdr *msg, int flags, int* ret); | 323 int (*__nacl_irt_recvmsg) (int sockfd, struct msghdr *msg, int flags, int* ret); |
324 int (*__nacl_irt_recvfrom) (int sockfd, void *buf, size_t len, int flags, | 324 int (*__nacl_irt_recvfrom) (int sockfd, void *buf, size_t len, int flags, |
325 struct sockaddr *dest_addr, socklen_t* addrlen, int*
ret); | 325 struct sockaddr *dest_addr, socklen_t* addrlen, int*
ret); |
326 | 326 |
327 int (*__nacl_irt_epoll_create) (int size); | 327 int (*__nacl_irt_epoll_create) (int size, int *ret); |
328 int (*__nacl_irt_epoll_ctl) (int epfd, int op, int fd, | 328 int (*__nacl_irt_epoll_ctl) (int epfd, int op, int fd, |
329 struct epoll_event *event); | 329 struct epoll_event *event); |
330 int (*__nacl_irt_epoll_pwait) (int epfd, struct epoll_event *events, | 330 int (*__nacl_irt_epoll_pwait) (int epfd, struct epoll_event *events, |
331 int maxevents, int timeout, | 331 int maxevents, int timeout, const sigset_t *sigmask, size_t sigset_size, |
332 const sigset_t *sigmask, size_t sigset_size); | 332 » int *ret); |
333 int (*__nacl_irt_epoll_wait) (int epfd, struct epoll_event *events, | 333 int (*__nacl_irt_epoll_wait) (int epfd, struct epoll_event *events, |
334 int maxevents, int timeout); | 334 int maxevents, int timeout, int *ret); |
335 int (*__nacl_irt_poll) (struct pollfd *fds, nfds_t nfds, | 335 int (*__nacl_irt_poll) (struct pollfd *fds, nfds_t nfds, |
336 int timeout); | 336 int timeout, int *ret); |
337 int (*__nacl_irt_ppoll) (struct pollfd *fds, nfds_t nfds, | 337 int (*__nacl_irt_ppoll) (struct pollfd *fds, nfds_t nfds, |
338 const struct timespec *timeout, | 338 const struct timespec *timeout, const sigset_t *sigmask, |
339 const sigset_t *sigmask, size_t sigset_size); | 339 » size_t sigset_size, int *ret); |
340 int (*__nacl_irt_select) (int nfds, fd_set *readfds, | 340 int (*__nacl_irt_select) (int nfds, fd_set *readfds, |
341 fd_set *writefds, fd_set *exceptfds, | 341 fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout, |
342 const struct timeval *timeout); | 342 » int *ret); |
343 int (*__nacl_irt_pselect) (int nfds, fd_set *readfds, | 343 int (*__nacl_irt_pselect) (int nfds, fd_set *readfds, |
344 fd_set *writefds, fd_set *exceptfds, | 344 fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout, |
345 const struct timeval *timeout, void* sigmask); | 345 » void* sigmask, int *ret); |
346 int (*__nacl_irt_getpeername) (int sockfd, struct sockaddr *addr, | 346 int (*__nacl_irt_getpeername) (int sockfd, struct sockaddr *addr, |
347 socklen_t *addrlen); | 347 socklen_t *addrlen); |
348 int (*__nacl_irt_getsockname) (int sockfd, struct sockaddr *addr, | 348 int (*__nacl_irt_getsockname) (int sockfd, struct sockaddr *addr, |
349 socklen_t *addrlen); | 349 socklen_t *addrlen); |
350 int (*__nacl_irt_getsockopt) (int sockfd, int level, int optname, | 350 int (*__nacl_irt_getsockopt) (int sockfd, int level, int optname, |
351 void *optval, socklen_t *optlen); | 351 void *optval, socklen_t *optlen); |
352 int (*__nacl_irt_setsockopt) (int sockfd, int level, int optname, | 352 int (*__nacl_irt_setsockopt) (int sockfd, int level, int optname, |
353 const void *optval, socklen_t optlen); | 353 const void *optval, socklen_t optlen); |
354 int (*__nacl_irt_socketpair) (int domain, int type, int protocol, int sv[2]); | 354 int (*__nacl_irt_socketpair) (int domain, int type, int protocol, int sv[2]); |
355 int (*__nacl_irt_shutdown) (int sockfd, int how); | 355 int (*__nacl_irt_shutdown) (int sockfd, int how); |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 __nacl_irt_getsockopt = not_implemented; | 633 __nacl_irt_getsockopt = not_implemented; |
634 __nacl_irt_setsockopt = not_implemented; | 634 __nacl_irt_setsockopt = not_implemented; |
635 __nacl_irt_socketpair = not_implemented; | 635 __nacl_irt_socketpair = not_implemented; |
636 __nacl_irt_shutdown = not_implemented; | 636 __nacl_irt_shutdown = not_implemented; |
637 } | 637 } |
638 | 638 |
639 size_t nacl_interface_query(const char *interface_ident, | 639 size_t nacl_interface_query(const char *interface_ident, |
640 void *table, size_t tablesize) { | 640 void *table, size_t tablesize) { |
641 return (*__nacl_irt_query)(interface_ident, table, tablesize); | 641 return (*__nacl_irt_query)(interface_ident, table, tablesize); |
642 } | 642 } |
OLD | NEW |