X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=e_os.h;h=8c644bf13225d6da2fc9536f5706e74bac8c175c;hp=30ddbc97c84cfc48939ae7b8a7a8dad9ed599071;hb=aa1477926769dcdf839f8fccd9db79847899aa86;hpb=2f2c805a2649fcbe8919242b78982c8e9344e2f3 diff --git a/e_os.h b/e_os.h index 30ddbc97c8..8c644bf132 100644 --- a/e_os.h +++ b/e_os.h @@ -377,6 +377,13 @@ extern FILE *_imp___iob; So, what we do here is to change 0 to 1 to get the default success status, and everything else is shifted up to fit into the status number field, and the status is tagged as an error, which I believe is what is wanted here. + + Finally, we add the VMS C facility code 0x35a000, because there are some + programs, such as Perl, that will reinterpret the code back to something + POSIXly. 'man perlvms' explains it further. + NOTE: the perlvms manual wants to turn all codes 2 to 255 into success + codes (status type = 1). I couldn't disagree more. Fortunately, the + status type doesn't seem to bother Perl. -- Richard Levitte */ # define EXIT(n) do { int __VMS_EXIT = n; \ @@ -385,6 +392,7 @@ extern FILE *_imp___iob; else \ __VMS_EXIT = (n << 3) | 2; \ __VMS_EXIT |= 0x10000000; \ + __VMS_EXIT |= 0x35a000; \ exit(__VMS_EXIT); } while(0) # define NO_SYS_PARAM_H # define NO_SYS_UN_H @@ -539,7 +547,7 @@ struct servent *PASCAL getservbyname(const char *, const char *); # endif # endif # ifdef FILIO_H -# include /* Added for FIONBIO under unixware */ +# include /* FIONBIO in some SVR4, e.g. unixware, solaris */ # endif # include # include @@ -654,23 +662,6 @@ struct servent *getservbyname(const char *name, const char *proto); # endif /* end vxworks */ -# 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 - #define OSSL_NELEM(x) (sizeof(x)/sizeof(x[0])) #ifdef __cplusplus