X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=e_os.h;h=58934d1be104f5d49264ae1c0002c2448032483c;hp=eb5c7bf696e4b30309e38b963feec2a0b4dfdaeb;hb=fccbb9b34f13b2d181db9a4714d92bc70c8c7ef0;hpb=0cc395796b7537e0dcd7674319b948a8f92639bd diff --git a/e_os.h b/e_os.h index eb5c7bf696..58934d1be1 100644 --- a/e_os.h +++ b/e_os.h @@ -59,6 +59,13 @@ #ifndef HEADER_E_OS_H #define HEADER_E_OS_H +#include + +#include +/* contains what we can justify to make visible + * to the outside; this file e_os.h is not part of the exported + * interface. */ + #ifdef __cplusplus extern "C" { #endif @@ -75,10 +82,6 @@ extern "C" { #define DEVRANDOM "/dev/urandom" #endif -#if defined(NOCONST) -#define const -#endif - /******************************************************************** The Microsoft section ********************************************************************/ @@ -154,8 +157,6 @@ extern "C" { #endif -#define strncasecmp(a,b,c) strnicmp((a),(b),(c)) - # ifdef WINDOWS # include # include @@ -166,6 +167,13 @@ extern "C" { # include # include +#if defined (__BORLANDC__) +#define _setmode setmode +#define _O_TEXT O_TEXT +#define _O_BINARY O_BINARY +#define _int64 __int64 +#endif + #if defined(WIN16) && !defined(MONOLITH) && defined(SSLEAY) && defined(_WINEXITNOPERSIST) # define EXIT(n) { if (n == 0) _wsetexit(_WINEXITNOPERSIST); return(n); } #else @@ -188,27 +196,58 @@ extern "C" { #else /* The non-microsoft world world */ -# ifdef VMS -# include -# else -# include +# if defined(__VMS) && !defined(VMS) +# define VMS 1 # endif -# define OPENSSL_CONF "openssl.cnf" -# define SSLEAY_CONF OPENSSL_CONF -# define RFILE ".rnd" -# define LIST_SEPARATOR_CHAR ':' -# ifndef MONOLITH -# define EXIT(n) exit(n); return(n) +# ifdef VMS + /* some programs don't include stdlib, so exit() and others give implicit + function warnings */ +# include +# if defined(__DECC) +# include +# else +# include +# endif +# define OPENSSL_CONF "openssl.cnf" +# define SSLEAY_CONF OPENSSL_CONF +# define RFILE ".rnd" +# define LIST_SEPARATOR_CHAR ',' +# define NUL_DEV "NLA0:" + /* We need to do this, because DEC C converts exit code 0 to 1, but not 1 + to 0. We will convert 1 to 3! Also, add the inhibit message bit... */ +# ifndef MONOLITH +# define EXIT(n) do { int __VMS_EXIT = n; \ + if (__VMS_EXIT == 1) __VMS_EXIT = 3; \ + __VMS_EXIT |= 0x10000000; \ + exit(n); return(n); } while(0) +# else +# define EXIT(n) do { int __VMS_EXIT = n; \ + if (__VMS_EXIT == 1) __VMS_EXIT = 3; \ + __VMS_EXIT |= 0x10000000; \ + return(n); } while(0) +# endif # else -# define EXIT(n) return(n) + /* !defined VMS */ +# include OPENSSL_UNISTD + +# define OPENSSL_CONF "openssl.cnf" +# define SSLEAY_CONF OPENSSL_CONF +# define RFILE ".rnd" +# define LIST_SEPARATOR_CHAR ':' +# define NUL_DEV "/dev/null" +# ifndef MONOLITH +# define EXIT(n) exit(n); return(n) +# else +# define EXIT(n) return(n) +# endif # endif -# define NUL_DEV "/dev/null" # define SSLeay_getpid() getpid() #endif + /*************/ #ifdef USE_SOCKETS @@ -232,16 +271,21 @@ extern HINSTANCE _hInstance; # else +# include # ifndef VMS - /* unix world */ -# include -# include +# include +# endif +# include /* Needed under linux for FD_XXX */ + +# include +# if defined(VMS) && !defined(__DECC) +# include +# include +# else # include # ifdef FILIO_H # include /* Added for FIONBIO under unixware */ # endif -# include -# include /* Needed under linux for FD_XXX */ # include # endif @@ -257,11 +301,21 @@ extern HINSTANCE _hInstance; # if defined(sun) # include # else -# include +# ifndef VMS +# include +# else + /* ioctl is only in VMS > 7.0 and when socketshr is not used */ +# if !defined(TCPIP_TYPE_SOCKETSHR) && defined(__VMS_VER) && (__VMS_VER > 70000000) +# include +# endif +# endif # endif # ifdef VMS # include +# if defined(TCPIP_TYPE_SOCKETSHR) +# include +# endif # endif # define SSLeay_Read(a,b,c) read((a),(b),(c)) @@ -280,26 +334,6 @@ extern HINSTANCE _hInstance; /***********************************************/ -#ifndef NOPROTO -#define P_CC_CC const void *,const void * -#define P_I_I int,int -#define P_I_I_P int,int,char * -#define P_I_I_P_I int,int,char *,int -#define P_IP_I_I_P_I int *,int,int,char *,int -#define P_V void -#else -#define P_CC_CC -#define P_I_I -#define P_I_I_P -#define P_IP_I_I_P_I -#define P_I_I_P_I -#define P_V -#endif - -/* not used yet */ -#define CS_BEGIN -#define CS_END - /* do we need to do this for getenv. * Just define getenv for use under windows */ @@ -317,6 +351,9 @@ extern HINSTANCE _hInstance; #ifdef sgi #define IRIX_CC_BUG /* all version of IRIX I've tested (4.* 5.*) */ #endif +#ifdef SNI +#define IRIX_CC_BUG /* CDS++ up to V2.0Bsomething suffered from the same bug.*/ +#endif #ifdef NO_MD2 #define MD2_Init MD2Init