X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=e_os.h;h=919fec8f28e7afb98eb30a4f10eb40d88b3baa9f;hb=8745c0815c38c483915c8855b6c8c432341aee87;hp=c6c6082c83feb2da2499ca3972492af6fdbf7fd4;hpb=3d11b8f89617edc81d01329dbb5bf134fcda3303;p=openssl.git diff --git a/e_os.h b/e_os.h index c6c6082c83..919fec8f28 100644 --- a/e_os.h +++ b/e_os.h @@ -112,7 +112,7 @@ extern "C" { /******************************************************************** The Microsoft section ********************************************************************/ -/* The following is used becaue of the small stack in some +/* The following is used because of the small stack in some * Microsoft operating systems */ #if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYSNAME_WIN32) # define MS_STATIC static @@ -150,7 +150,6 @@ extern "C" { #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) -#define EADDRINUSE WSAEADDRINUSE #elif defined(__DJGPP__) #define WATT32 #define get_last_socket_error() errno @@ -275,14 +274,14 @@ extern "C" { # if !defined(OPENSSL_NO_SOCK) && defined(_WIN32_WINNT) /* * Just like defining _WIN32_WINNT including winsock2.h implies - * certain "discipline" for maintaing [broad] binary compatibility. + * certain "discipline" for maintaining [broad] binary compatibility. * As long as structures are invariant among Winsock versions, * it's sufficient to check for specific Winsock2 API availability * at run-time [DSO_global_lookup is recommended]... */ # include # include - /* yes, they have to be #included prior */ + /* yes, they have to be #included prior to */ # endif # include # include @@ -372,7 +371,23 @@ static unsigned int _strlen31(const char *str) # define DEFAULT_HOME "C:" # endif -#else /* The non-microsoft world world */ +/* Avoid Windows 8 SDK GetVersion deprecated problems */ +#if defined(_MSC_VER) && _MSC_VER>=1800 +# define check_winnt() (1) +#else +# define check_winnt() (GetVersion() < 0x80000000) +#endif + +/* + * Visual Studio: inline is available in C++ only, however + * __inline is available for C, see + * http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx + */ +#if defined(_MSC_VER) && !defined(__cplusplus) && !defined(inline) +# define inline __inline +#endif + +#else /* The non-microsoft world */ # ifdef OPENSSL_SYS_VMS # define VMS 1 @@ -624,6 +639,18 @@ static unsigned int _strlen31(const char *str) # define INVALID_SOCKET (-1) # endif /* INVALID_SOCKET */ # endif + +/* Some IPv6 implementations are broken, disable them in known bad + * versions. + */ +# if !defined(OPENSSL_USE_IPV6) +# if defined(AF_INET6) && !defined(OPENSSL_SYS_BEOS_BONE) && !defined(NETWARE_CLIB) +# define OPENSSL_USE_IPV6 1 +# else +# define OPENSSL_USE_IPV6 0 +# endif +# endif + #endif #if defined(__ultrix) @@ -732,4 +759,3 @@ struct servent *getservbyname(const char *name, const char *proto); #endif #endif -