X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=e_os.h;h=d0217f1863cfb85e9e5f714a03f086da859e052e;hp=0a97895360d71407e2be33279641421728ac796e;hb=6dec5e1ca91171aa8b5e528c8d8f5f88a7841ec6;hpb=f642ebc1e2dca34bc2b3c46796c131e1f5077bee diff --git a/e_os.h b/e_os.h index 0a97895360..d0217f1863 100644 --- a/e_os.h +++ b/e_os.h @@ -94,20 +94,6 @@ extern "C" { # define NO_SYSLOG #endif -#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) -# if macintosh==1 -# ifndef MAC_OS_GUSI_SOURCE -# define MAC_OS_pre_X -# define NO_SYS_TYPES_H -# endif -# define NO_SYS_PARAM_H -# define NO_CHMOD -# define NO_SYSLOG -# undef DEVRANDOM -# define GETPID_IS_MEANINGLESS -# endif -#endif - /******************************************************************** The Microsoft section ********************************************************************/ @@ -157,12 +143,6 @@ extern "C" { #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(MAC_OS_pre_X) -#define get_last_socket_error() errno -#define clear_socket_error() errno=0 -#define closesocket(s) MacSocket_close(s) -#define readsocket(s,b,n) MacSocket_recv((s),(b),(n),true) -#define writesocket(s,b,n) MacSocket_send((s),(b),(n)) #elif defined(OPENSSL_SYS_VMS) #define get_last_socket_error() errno #define clear_socket_error() errno=0 @@ -294,7 +274,7 @@ extern "C" { # ifdef _WIN64 # define strlen(s) _strlen31(s) /* cut strings to 2GB */ -static unsigned int _strlen31(const char *str) +static __inline unsigned int _strlen31(const char *str) { unsigned int len=0; while (*str && len<0x80000000U) str++, len++; @@ -336,10 +316,8 @@ static unsigned int _strlen31(const char *str) # endif # endif # endif -# if !defined(OPENSSL_FIPSCANISTER) # include # include -# endif # ifdef OPENSSL_SYS_WINCE # define OPENSSL_NO_POSIX_IO @@ -379,7 +357,7 @@ static unsigned int _strlen31(const char *str) # define check_winnt() (1) #else # define check_winnt() (GetVersion() < 0x80000000) -#endif +#endif #else /* The non-microsoft world */ @@ -490,6 +468,10 @@ static unsigned int _strlen31(const char *str) /*************/ +#if defined(OPENSSL_NO_SOCK) && !defined(OPENSSL_NO_DGRAM) +# define OPENSSL_NO_DGRAM +#endif + #ifdef USE_SOCKETS # if defined(WINDOWS) || defined(MSDOS) /* windows world */ @@ -533,14 +515,6 @@ static unsigned int _strlen31(const char *str) # define SHUTDOWN2(fd) close_s(fd) # endif -# elif defined(MAC_OS_pre_X) - -# include "MacSocket.h" -# define SSLeay_Write(a,b,c) MacSocket_send((a),(b),(c)) -# define SSLeay_Read(a,b,c) MacSocket_recv((a),(b),(c),true) -# define SHUTDOWN(fd) MacSocket_close(fd) -# define SHUTDOWN2(fd) MacSocket_close(fd) - # elif defined(OPENSSL_SYS_NETWARE) /* NetWare uses the WinSock2 interfaces by default, but can be configured for BSD */ @@ -748,10 +722,25 @@ struct servent *getservbyname(const char *name, const char *proto); #include #endif +#if !defined(inline) && !defined(__cplusplus) +# if defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L + /* do nothing, inline works */ +# elif defined(__GNUC__) && __GNUC__>=2 +# define inline __inline__ +# elif defined(_MSC_VER) + /* + * Visual Studio: inline is available in C++ only, however + * __inline is available for C, see + * http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx + */ +# define inline __inline +# else +# define inline +# endif +#endif #ifdef __cplusplus } #endif #endif -