summaryrefslogtreecommitdiffstats
path: root/e_os2.h
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-07-26 18:15:59 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-07-26 18:15:59 +0000
commiteb1c48be6f27180fbb0622ea3ed26ea683f78869 (patch)
treee8494fd714dc70cf0ef620d576a6118e67dc352e /e_os2.h
parent2fd9664b0b7464b6ce512eb78815928590d860c6 (diff)
Add new type ossl_ssize_t instead of ssize_t and move definitions to
e_os2.h, this should fix WIN32 compilation issues and hopefully avoid conflicts with other headers which may workaround ssize_t in different ways.
Diffstat (limited to 'e_os2.h')
-rw-r--r--e_os2.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/e_os2.h b/e_os2.h
index f5a5fa2bfb..405b51fcec 100644
--- a/e_os2.h
+++ b/e_os2.h
@@ -283,6 +283,27 @@ extern "C" {
# define OPENSSL_GLOBAL_REF(name) _shadow_##name
#endif
+#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) && macintosh==1 && !defined(MAC_OS_GUSI_SOURCE)
+# define ossl_ssize_t long
+#endif
+
+#ifdef OPENSSL_SYS_MSDOS
+# define ossl_ssize_t long
+#endif
+
+#if defined(NeXT) || defined(OPENSSL_SYS_NEWS4) || defined(OPENSSL_SYS_SUNOS)
+# define ssize_t int
+#endif
+
+#if defined(__ultrix) && !defined(ssize_t)
+# define ossl_ssize_t int
+#endif
+
+#ifndef ossl_ssize_t
+# define ossl_ssize_t ssize_t
+#endif
+
+
#ifdef DEBUG_UNUSED
#define __owur __attribute__((__warn_unused_result__))
#else