diff options
Diffstat (limited to 'lib/sockets.h')
-rw-r--r-- | lib/sockets.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/sockets.h b/lib/sockets.h index 8392e57..5a83332 100644 --- a/lib/sockets.h +++ b/lib/sockets.h @@ -1,6 +1,6 @@ /* sockets.h - wrappers for Windows socket functions - Copyright (C) 2008-2017 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -13,12 +13,12 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ + along with this program. If not, see <https://www.gnu.org/licenses/>. */ /* Written by Simon Josefsson */ #ifndef SOCKETS_H -# define SOCKETS_H 1 +#define SOCKETS_H 1 #define SOCKETS_1_0 0x0001 #define SOCKETS_1_1 0x0101 @@ -43,9 +43,13 @@ int gl_sockets_cleanup (void) other library that only accepts sockets. */ #ifdef WINDOWS_SOCKETS -#include <sys/socket.h> +# include <sys/socket.h> -#include "msvc-nothrow.h" +# if GNULIB_MSVC_NOTHROW +# include "msvc-nothrow.h" +# else +# include <io.h> +# endif static inline SOCKET gl_fd_to_handle (int fd) @@ -55,7 +59,7 @@ gl_fd_to_handle (int fd) #else -#define gl_fd_to_handle(x) (x) +# define gl_fd_to_handle(x) (x) #endif /* WINDOWS_SOCKETS */ |