Mercurial > hg > th-libs
diff th_network.h @ 453:efd33accdc81
Break backwards compatibility by renaming BOOL, TRUE and FALSE to lowercase.
Introduce optional but default use of stdbool.h.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 02 Jan 2018 22:56:03 +0200 |
parents | 2991e6b52d95 |
children | 347bfd3e017e |
line wrap: on
line diff
--- a/th_network.h Wed Oct 25 22:32:07 2017 +0300 +++ b/th_network.h Tue Jan 02 22:56:03 2018 +0200 @@ -16,7 +16,7 @@ #ifdef TH_PLAT_WINDOWS -# define __OBJC_BOOL // A nasty hack +# define __OBJC_bool // A nasty hack # include <windows.h> # include <winsock.h> typedef uint16_t in_port_t; @@ -157,11 +157,11 @@ int th_conn_pull(th_conn_t *); int th_conn_send_buf(th_conn_t *, const void *buf, const size_t len); int th_conn_send_growbuf(th_conn_t *, th_growbuf_t *buf); -BOOL th_conn_check(th_conn_t *); +bool th_conn_check(th_conn_t *); -BOOL th_conn_buf_check(th_conn_t *conn, size_t n); -BOOL th_conn_buf_skip(th_conn_t *conn, size_t n); +bool th_conn_buf_check(th_conn_t *conn, size_t n); +bool th_conn_buf_skip(th_conn_t *conn, size_t n); int th_conn_buf_strncmp(th_conn_t *conn, const char *str, const size_t n); int th_conn_buf_strcmp(th_conn_t *conn, const char *str); char * th_conn_buf_strstr(th_conn_t *conn, const char *str);