summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-03-03 19:56:00 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-03-03 19:56:00 +0000
commitb7c114f0447519561fa87ba579fdc35b4496c4ca (patch)
treefd0a2b05ea52eb54082189dcd824aff3e28375d6 /apps
parentede1351997d7dc9564dae45c48dd90d860f1ffb2 (diff)
PR: 2183
PR#1999 broke fork detection by assuming HAVE_FORK was set for all platforms. Include original HAVE_FORK detection logic while allowing it to be overridden on specific platforms with -DHAVE_FORK=1 or -DHAVE_FORK=0
Diffstat (limited to 'apps')
-rw-r--r--apps/speed.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/speed.c b/apps/speed.c
index 07f0ae04a6..393a7baade 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -254,12 +254,18 @@
# endif
#endif
-#if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_NETWARE)
-# define NO_FORK 1
-#elif HAVE_FORK
+#ifndef HAVE_FORK
+# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_NETWARE)
+# define HAVE_FORK 0
+# else
+# define HAVE_FORK 1
+# endif
+#endif
+
+#if HAVE_FORK
# undef NO_FORK
#else
-# define NO_FORK 1
+# define NO_FORK
#endif
#undef BUFSIZE