From 7d7d2cbcb02206f3393681f2bce198e11e2e185b Mon Sep 17 00:00:00 2001 From: Ulf Möller Date: Thu, 13 May 1999 11:37:32 +0000 Subject: VMS support. Submitted by: Richard Levitte --- e_os.h | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 73 insertions(+), 17 deletions(-) (limited to 'e_os.h') diff --git a/e_os.h b/e_os.h index 9f525cb8e1..01a9c9402a 100644 --- a/e_os.h +++ b/e_os.h @@ -192,27 +192,68 @@ 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 +/* Definitions of GLOBAL and EXTERN, to define and declare certain global + symbols that, with some compilers under VMS, have to be defined and + declared explicitely with globaldef and globalref. On other OS:es, + these macros are defined with something sensible. */ +#if defined(VMS) && !defined(__DECC) +#define EXTERN globalref +#define GLOBAL globaldef +#else +#define EXTERN extern +#define GLOBAL +#endif + /*************/ #ifdef USE_SOCKETS @@ -236,16 +277,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 @@ -261,11 +307,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)) -- cgit v1.2.3