Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openssl/openssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/e_os.h
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-12-03 19:34:28 +0300
committerRichard Levitte <levitte@openssl.org>2002-12-03 19:34:28 +0300
commit27498a33307b9e79f93f13bb2841f32ce8b2783e (patch)
treeeb3d2628c02c4242942ac221c5b34a94ca60abe4 /e_os.h
parent49cd4b7316879bf8655be2d3927e840e7fcaf546 (diff)
EXIT() may mean return(). That's confusing, so let's have it really mean
exit() in whatever way works for the intended platform, and define OPENSSL_EXIT() to have the old meaning (the name is of course because it's only used in the openssl program)
Diffstat (limited to 'e_os.h')
-rw-r--r--e_os.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/e_os.h b/e_os.h
index 5d761781b8..db9ba97ec8 100644
--- a/e_os.h
+++ b/e_os.h
@@ -243,10 +243,11 @@ extern "C" {
# define _kbhit kbhit
# endif
-# if defined(WIN16) && !defined(MONOLITH) && defined(SSLEAY) && defined(_WINEXITNOPERSIST)
-# define EXIT(n) do { if (n == 0) _wsetexit(_WINEXITNOPERSIST); return(n); } while(0)
+# if defined(WIN16) && defined(SSLEAY) && defined(_WINEXITNOPERSIST)
+# define EXIT(n) _wsetexit(_WINEXITNOPERSIST)
+# define OPENSSL_EXIT(n) do { if (n == 0) EXIT(n); return(n); } while(0)
# else
-# define EXIT(n) return(n)
+# define EXIT(n) return(n)
# endif
# define LIST_SEPARATOR_CHAR ';'
# ifndef X_OK
@@ -302,18 +303,13 @@ extern "C" {
the status is tagged as an error, which I believe is what is wanted here.
-- Richard Levitte
*/
-# if !defined(MONOLITH) || defined(OPENSSL_C)
-# define EXIT(n) do { int __VMS_EXIT = n; \
+# define EXIT(n) do { int __VMS_EXIT = n; \
if (__VMS_EXIT == 0) \
__VMS_EXIT = 1; \
else \
__VMS_EXIT = (n << 3) | 2; \
__VMS_EXIT |= 0x10000000; \
- exit(__VMS_EXIT); \
- return(__VMS_EXIT); } while(0)
-# else
-# define EXIT(n) return(n)
-# endif
+ exit(__VMS_EXIT); } while(0)
# define NO_SYS_PARAM_H
# else
/* !defined VMS */
@@ -344,11 +340,7 @@ extern "C" {
# define RFILE ".rnd"
# define LIST_SEPARATOR_CHAR ':'
# define NUL_DEV "/dev/null"
-# ifndef MONOLITH
-# define EXIT(n) do { exit(n); return(n); } while(0)
-# else
-# define EXIT(n) return(n)
-# endif
+# define EXIT(n) exit(n)
# endif
# define SSLeay_getpid() getpid()
@@ -475,6 +467,14 @@ extern char *sys_errlist[]; extern int sys_nerr;
(((errnum)<0 || (errnum)>=sys_nerr) ? NULL : sys_errlist[errnum])
#endif
+#ifndef OPENSSL_EXIT
+# if defined(MONOLITH) && !defined(OPENSSL_C)
+# define OPENSSL_EXIT(n) return(n)
+# else
+# define OPENSSL_EXIT(n) do { EXIT(n); return(n); } while(0)
+# endif
+#endif
+
/***********************************************/
/* do we need to do this for getenv.