From 541477736dc9d0c7fc358413a5910e6d513c29eb Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Mon, 25 Sep 2023 02:27:58 +0200 Subject: Update comments --- include/kit.inl.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'include/kit.inl.h') diff --git a/include/kit.inl.h b/include/kit.inl.h index aa3740d..da90638 100644 --- a/include/kit.inl.h +++ b/include/kit.inl.h @@ -3,7 +3,7 @@ // kit.inl.h // https://guattari.tech/kit.git // -// Single header-only utility library for C. +// Single header-only cross-platform utility library for C. // // ================================================================ // @@ -1769,15 +1769,15 @@ kit_sha256_hash_t kit_sha256(i64 size, u8 *data); # pragma GCC diagnostic ignored "-Wunused-function" # pragma GCC diagnostic ignored "-Wunknown-pragmas" # endif +# ifdef __cplusplus +extern "C" { +# endif # if defined(_WIN32) && !defined(__CYGWIN__) # define WIN32_LEAN_AND_MEAN # include # include # define socket_t SOCKET # define socklen_t i32 -# ifdef __cplusplus -extern "C" { -# endif static kit_status_t kit_sockets_init(void) { WSADATA data; memset(&data, 0, sizeof data); @@ -1802,9 +1802,6 @@ static i32 kit_socket_set_nonblocking(socket_t s) { ? KIT_OK : KIT_ERROR_SOCKET_CONTROL_FAILED; } -# ifdef __cplusplus -} -# endif # else # include # include @@ -1819,9 +1816,6 @@ static i32 kit_socket_set_nonblocking(socket_t s) { # define socket_t i32 # define closesocket close # define INVALID_SOCKET -1 -# ifdef __cplusplus -extern "C" { -# endif static kit_status_t kit_sockets_init(void) { signal(SIGPIPE, SIG_IGN); return KIT_OK; @@ -1841,9 +1835,9 @@ static i32 kit_socket_set_nonblocking(socket_t s) { ? KIT_OK : KIT_ERROR_SOCKET_CONTROL_FAILED; } -# ifdef __cplusplus +# endif +# ifdef __cplusplus } -# endif # endif # ifdef __GNUC__ # pragma GCC diagnostic pop -- cgit v1.2.3