I think I got it now. Apparently, the case of having to shift down
[openssl.git] / e_os.h
diff --git a/e_os.h b/e_os.h
index 2455f993861f9d13e29c2b6b51bdb4e3e47fa9f4..a4f1cb1a94347b88767f0317e8adae05618b98a9 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -229,6 +229,13 @@ extern "C" {
 #  include <io.h>
 #  include <fcntl.h>
 
+#  ifdef OPENSSL_SYS_WINCE
+#    include <stdio_extras.h>
+#    include <stdlib_extras.h>
+#    include <string_extras.h>
+#    include <winsock_extras.h>
+#  endif
+
 #  define ssize_t long
 
 #  if defined (__BORLANDC__)
@@ -240,9 +247,9 @@ extern "C" {
 #  endif
 
 #  if defined(WIN16) && !defined(MONOLITH) && defined(SSLEAY) && defined(_WINEXITNOPERSIST)
-#    define EXIT(n) { if (n == 0) _wsetexit(_WINEXITNOPERSIST); return(n); }
+#    define EXIT(n) do { if (n == 0) _wsetexit(_WINEXITNOPERSIST); return(n); } while(0)
 #  else
-#    define EXIT(n)            return(n);
+#    define EXIT(n)            return(n)
 #  endif
 #  define LIST_SEPARATOR_CHAR ';'
 #  ifndef X_OK
@@ -258,7 +265,11 @@ extern "C" {
 #  define SSLEAY_CONF  OPENSSL_CONF
 #  define NUL_DEV      "nul"
 #  define RFILE                ".rnd"
-#  define DEFAULT_HOME  "C:"
+#  ifdef OPENSSL_SYS_WINCE
+#    define DEFAULT_HOME  ""
+#  else
+#    define DEFAULT_HOME  "C:"
+#  endif
 
 #else /* The non-microsoft world world */
 
@@ -337,7 +348,7 @@ extern "C" {
 #    define LIST_SEPARATOR_CHAR ':'
 #    define NUL_DEV            "/dev/null"
 #    ifndef MONOLITH
-#      define EXIT(n)          exit(n); return(n)
+#      define EXIT(n)          do { exit(n); return(n); } while(0)
 #    else
 #      define EXIT(n)          return(n)
 #    endif