Remove PROXY controls that aren't used anywhere
[openssl.git] / include / openssl / e_os2.h
index 177b0981e387962c00e1fdecc2fc9fd36f4a10e3..23602a5266dc63c98f0fcf1e52630a26e40e60c5 100644 (file)
@@ -90,7 +90,13 @@ extern "C" {
  * For 32 bit environment, there seems to be the CygWin environment and then
  * all the others that try to do the same thing Microsoft does...
  */
-# if defined(OPENSSL_SYS_UWIN)
+/*
+ * UEFI lives here because it might be built with a Microsoft toolchain and
+ * we need to avoid the false positive match on Windows.
+ */
+# if defined(OPENSSL_SYS_UEFI)
+#  undef OPENSSL_SYS_UNIX
+# elif defined(OPENSSL_SYS_UWIN)
 #  undef OPENSSL_SYS_UNIX
 #  define OPENSSL_SYS_WIN32_UWIN
 # else
@@ -256,8 +262,12 @@ extern "C" {
 #  define OPENSSL_GLOBAL_REF(name) _shadow_##name
 # endif
 
-# ifdef OPENSSL_SYS_MSDOS
-#  define ossl_ssize_t long
+# ifdef _WIN32
+#  ifdef _WIN64
+#   define ossl_ssize_t __int64
+#  else
+#   define ossl_ssize_t int
+#  endif
 # endif
 
 # if defined(__ultrix) && !defined(ssize_t)
@@ -277,6 +287,15 @@ extern "C" {
 /* Standard integer types */
 # if defined(__osf__) || defined(__sgi) || defined(__hpux) || defined(OPENSSL_SYS_VMS)
 #  include <inttypes.h>
+# elif defined(OPENSSL_SYS_UEFI)
+typedef INT8 int8_t;
+typedef UINT8 uint8_t;
+typedef INT16 int16_t;
+typedef UINT16 uint16_t;
+typedef INT32 int32_t;
+typedef UINT32 uint32_t;
+typedef INT64 int64_t;
+typedef UINT64 uint64_t;
 # elif defined(_MSC_VER) && _MSC_VER<=1500
 /*
  * minimally required typdefs for systems not supporting inttypes.h or
@@ -294,6 +313,22 @@ typedef unsigned __int64 uint64_t;
 #  include <stdint.h>
 # endif
 
+/*
+ * We need a format operator for some client tools for uint64_t.
+ * This is an attempt at doing so in a portable manner.
+ * If we can't use a built-in definition, we'll revert to the previous
+ * behavior that was hard-coded but now causing compiler warnings on
+ * some systems (e.g. Mac OS X).
+ */
+# ifndef PRIu64
+#  if (__STDC_VERSION__ >= 199901L)
+#   include <inttypes.h>
+#  endif
+#  ifndef PRIu64
+#   define PRIu64 "lu"
+#  endif
+# endif
+
 #ifdef  __cplusplus
 }
 #endif