diff options
author | Richard Levitte <levitte@openssl.org> | 2017-08-25 14:48:04 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-08-25 23:59:30 +0200 |
commit | 384cdd46a1184ae33c2fe76ad49f87b0c02d078a (patch) | |
tree | 8816344c6ad1858e633fdcfb206c2b7b8c269981 /include/internal/sockets.h | |
parent | 9a5d80cb5e44aa0908f4b10e5fca1eac5a0792ca (diff) |
Fix guarding macro in include/internal/sockets.h
The guard was checked but never defined. Also, rename it to reflect
that this is an internal header file, not a public one.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4254)
Diffstat (limited to 'include/internal/sockets.h')
-rw-r--r-- | include/internal/sockets.h | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/include/internal/sockets.h b/include/internal/sockets.h index cc45424a02..fa958c4db3 100644 --- a/include/internal/sockets.h +++ b/include/internal/sockets.h @@ -8,7 +8,8 @@ */ -#ifndef HEADER_OPENSSL_SOCKETS +#ifndef HEADER_INTERNAL_SOCKETS +# define HEADER_INTERNAL_SOCKETS # if defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_UEFI) # define NO_SYS_PARAM_H @@ -125,38 +126,37 @@ struct servent *PASCAL getservbyname(const char *, const char *); # endif # endif -#endif +# define get_last_socket_error() errno +# define clear_socket_error() errno=0 + +# if defined(OPENSSL_SYS_WINDOWS) +# undef get_last_socket_error +# undef clear_socket_error +# define get_last_socket_error() WSAGetLastError() +# define clear_socket_error() WSASetLastError(0) +# define readsocket(s,b,n) recv((s),(b),(n),0) +# define writesocket(s,b,n) send((s),(b),(n),0) +# elif defined(__DJGPP__) +# define WATT32 +# define WATT32_NO_OLDIES +# define closesocket(s) close_s(s) +# define readsocket(s,b,n) read_s(s,b,n) +# define writesocket(s,b,n) send(s,b,n,0) +# elif defined(OPENSSL_SYS_VMS) +# define ioctlsocket(a,b,c) ioctl(a,b,c) +# define closesocket(s) close(s) +# define readsocket(s,b,n) recv((s),(b),(n),0) +# define writesocket(s,b,n) send((s),(b),(n),0) +# elif defined(OPENSSL_SYS_VXWORKS) +# define ioctlsocket(a,b,c) ioctl((a),(b),(int)(c)) +# define closesocket(s) close(s) +# define readsocket(s,b,n) read((s),(b),(n)) +# define writesocket(s,b,n) write((s),(char *)(b),(n)) +# else +# define ioctlsocket(a,b,c) ioctl(a,b,c) +# define closesocket(s) close(s) +# define readsocket(s,b,n) read((s),(b),(n)) +# define writesocket(s,b,n) write((s),(b),(n)) +# endif -#define get_last_socket_error() errno -#define clear_socket_error() errno=0 - -#if defined(OPENSSL_SYS_WINDOWS) -# undef get_last_socket_error -# undef clear_socket_error -# define get_last_socket_error() WSAGetLastError() -# define clear_socket_error() WSASetLastError(0) -# define readsocket(s,b,n) recv((s),(b),(n),0) -# define writesocket(s,b,n) send((s),(b),(n),0) -#elif defined(__DJGPP__) -# define WATT32 -# define WATT32_NO_OLDIES -# define closesocket(s) close_s(s) -# define readsocket(s,b,n) read_s(s,b,n) -# define writesocket(s,b,n) send(s,b,n,0) -#elif defined(OPENSSL_SYS_VMS) -# define ioctlsocket(a,b,c) ioctl(a,b,c) -# define closesocket(s) close(s) -# define readsocket(s,b,n) recv((s),(b),(n),0) -# define writesocket(s,b,n) send((s),(b),(n),0) -#elif defined(OPENSSL_SYS_VXWORKS) -# define ioctlsocket(a,b,c) ioctl((a),(b),(int)(c)) -# define closesocket(s) close(s) -# define readsocket(s,b,n) read((s),(b),(n)) -# define writesocket(s,b,n) write((s),(char *)(b),(n)) -#else -# define ioctlsocket(a,b,c) ioctl(a,b,c) -# define closesocket(s) close(s) -# define readsocket(s,b,n) read((s),(b),(n)) -# define writesocket(s,b,n) write((s),(b),(n)) #endif - |