Hi,
the patch below against OpenSSL 1.0.0b cleans up getpid() usage in
e_aep.c and fixes win32 target compilation with OpenWatcom:
--- e_aep.c.orig Mon Dec 22 14:54:12 2008
+++ e_aep.c Thu Nov 18 02:11:37 2010
@@ -68,6 +68,8 @@
#if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_CLIB)
#define getpid GetThreadID
extern int GetThreadID(void);
+#elif defined(_WIN32) && !defined(__WATCOMC__)
+#define getpid _getpid
#endif
#include <openssl/crypto.h>
@@ -867,13 +869,7 @@
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
-#ifdef NETWARE_CLIB
- curr_pid = GetThreadID();
-#elif defined(_WIN32)
- curr_pid = _getpid();
-#else
curr_pid = getpid();
-#endif
/*Check if this is the first time this is being called from the current
process*/
patch also attached.
--- e_aep.c.orig Mon Dec 22 14:54:12 2008
+++ e_aep.c Thu Nov 18 02:11:37 2010
@@ -68,6 +68,8 @@
#if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_CLIB)
#define getpid GetThreadID
extern int GetThreadID(void);
+#elif defined(_WIN32) && !defined(__WATCOMC__)
+#define getpid _getpid
#endif
#include <openssl/crypto.h>
@@ -867,13 +869,7 @@
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
-#ifdef NETWARE_CLIB
- curr_pid = GetThreadID();
-#elif defined(_WIN32)
- curr_pid = _getpid();
-#else
curr_pid = getpid();
-#endif
/*Check if this is the first time this is being called from the current
process*/