X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=e_os.h;h=678e4d547025113992e54dfea13797bb441ab718;hp=cff94e3e2df0bc9d8b414d0afa24b2cadd1b61ee;hb=d76c85a301f0ab5ff74b54f841cf5db70916dbba;hpb=31a674d8c9766d582596876b221bb685d6d32a91 diff --git a/e_os.h b/e_os.h index cff94e3e2d..678e4d5470 100644 --- a/e_os.h +++ b/e_os.h @@ -59,6 +59,11 @@ #ifndef HEADER_E_OS_H #define HEADER_E_OS_H +#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 @@ -98,6 +103,9 @@ extern "C" { #ifdef WIN32 #define get_last_sys_error() GetLastError() #define clear_sys_error() SetLastError(0) +/* These are defined in wincrypt.h and can cause problems */ +#undef X509_NAME +#undef PKCS7_SIGNER_INFO #if !defined(WINNT) #define WIN_CONSOLE_BUG #endif @@ -189,27 +197,57 @@ extern "C" { #else /* The non-microsoft world world */ +# if defined(__VMS) && !defined(VMS) +# define VMS 1 +# endif + # ifdef VMS -# include + /* 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 # include -# 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) -# else -# define EXIT(n) return(n) +# 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 @@ -233,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 @@ -258,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))