Files @ ed4fe8216eb0
Branch filter:

Location: CSY/reowolf/pseudo_socket.h - annotation

MH
Fix binding- and assignment-expression related typing issues.

Simpler solutions are better, so the typechecker is back to normal.
Instead we simply make sure that assignment expression is never
nested under another expression, and binding expressions may only
be nested under LogicalAnd-expressions. If only I knew why I thought
type shenanigans were a good idea in the first place...
1
2
3
4
5
6
7
8
#include <sys/socket.h> // defines {sockaddr, socklen_t}

int rw_socket(int domain, int type, int protocol);
int rw_connect(int fd, const struct sockaddr *address, socklen_t address_len);
int rw_bind(int socket, const struct sockaddr *address, socklen_t address_len);
int rw_close(int fd);
ssize_t rw_send(int fd, const void * message, size_t length, int flags);
ssize_t rw_recv(int fd, void * buffer, size_t length, int flags);