aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/bio
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2001-02-20 08:13:47 +0000
committerRichard Levitte <levitte@openssl.org>2001-02-20 08:13:47 +0000
commitbc36ee6227517edae802bcb0da68d4f04fe1fb5e (patch)
tree19782c56cd5f5930807df5c8bfb4963a05121c48 /crypto/bio
parentf2bc668429fa2abdc77db0db861a9bb2be0c3a85 (diff)
downloadopenssl-bc36ee6227517edae802bcb0da68d4f04fe1fb5e.tar.gz
Use new-style system-id macros everywhere possible. I hope I haven't
missed any. This compiles and runs on Linux, and external applications have no problems with it. The definite test will be to build this on VMS.
Diffstat (limited to 'crypto/bio')
-rw-r--r--crypto/bio/b_sock.c12
-rw-r--r--crypto/bio/bio_cb.c2
-rw-r--r--crypto/bio/bss_acpt.c4
-rw-r--r--crypto/bio/bss_conn.c4
-rw-r--r--crypto/bio/bss_fd.c2
-rw-r--r--crypto/bio/bss_file.c4
-rw-r--r--crypto/bio/bss_log.c16
-rw-r--r--crypto/bio/bss_sock.c4
8 files changed, 25 insertions, 23 deletions
diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c
index 35d2e5b6f3..d4b44b62bb 100644
--- a/crypto/bio/b_sock.c
+++ b/crypto/bio/b_sock.c
@@ -65,7 +65,7 @@
#include "cryptlib.h"
#include <openssl/bio.h>
-#ifdef WIN16
+#ifdef OPENSSL_SYS_WIN16
#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
#else
#define SOCKET_PROTOCOL IPPROTO_TCP
@@ -79,7 +79,7 @@
#define MAX_LISTEN 32
#endif
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
static int wsa_init_done=0;
#endif
@@ -429,7 +429,7 @@ end:
int BIO_sock_init(void)
{
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
static struct WSAData wsa_state;
if (!wsa_init_done)
@@ -449,13 +449,13 @@ int BIO_sock_init(void)
return(-1);
}
}
-#endif /* WINDOWS */
+#endif /* OPENSSL_SYS_WINDOWS */
return(1);
}
void BIO_sock_cleanup(void)
{
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
if (wsa_init_done)
{
wsa_init_done=0;
@@ -465,7 +465,7 @@ void BIO_sock_cleanup(void)
#endif
}
-#if !defined(VMS) || __VMS_VER >= 70000000
+#if !defined(OPENSSL_SYS_VMS) || __VMS_VER >= 70000000
int BIO_socket_ioctl(int fd, long type, unsigned long *arg)
{
diff --git a/crypto/bio/bio_cb.c b/crypto/bio/bio_cb.c
index d6b8aa313a..0ffa4d2136 100644
--- a/crypto/bio/bio_cb.c
+++ b/crypto/bio/bio_cb.c
@@ -125,7 +125,7 @@ long MS_CALLBACK BIO_debug_callback(BIO *bio, int cmd, const char *argp,
b=(BIO *)bio->cb_arg;
if (b != NULL)
BIO_write(b,buf,strlen(buf));
-#if !defined(OPENSSL_NO_STDIO) && !defined(WIN16)
+#if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16)
else
fputs(buf,stderr);
#endif
diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c
index 9569c7ed8d..8ea1db158b 100644
--- a/crypto/bio/bss_acpt.c
+++ b/crypto/bio/bss_acpt.c
@@ -64,13 +64,13 @@
#include "cryptlib.h"
#include <openssl/bio.h>
-#ifdef WIN16
+#ifdef OPENSSL_SYS_WIN16
#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
#else
#define SOCKET_PROTOCOL IPPROTO_TCP
#endif
-#if (defined(VMS) && __VMS_VER < 70000000)
+#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000)
/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
#undef FIONBIO
#endif
diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c
index 9772bc8529..c41ba3cc41 100644
--- a/crypto/bio/bss_conn.c
+++ b/crypto/bio/bss_conn.c
@@ -64,13 +64,13 @@
#include "cryptlib.h"
#include <openssl/bio.h>
-#ifdef WIN16
+#ifdef OPENSSL_SYS_WIN16
#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
#else
#define SOCKET_PROTOCOL IPPROTO_TCP
#endif
-#if (defined(VMS) && __VMS_VER < 70000000)
+#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000)
/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
#undef FIONBIO
#endif
diff --git a/crypto/bio/bss_fd.c b/crypto/bio/bss_fd.c
index 47f59c467d..5e3e187de6 100644
--- a/crypto/bio/bss_fd.c
+++ b/crypto/bio/bss_fd.c
@@ -223,7 +223,7 @@ int BIO_fd_should_retry(int i)
{
err=get_last_sys_error();
-#if defined(WINDOWS) && 0 /* more microsoft stupidity? perhaps not? Ben 4/1/99 */
+#if defined(OPENSSL_SYS_WINDOWS) && 0 /* more microsoft stupidity? perhaps not? Ben 4/1/99 */
if ((i == -1) && (err == 0))
return(1);
#endif
diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c
index cbfe74a5eb..f31e0a50ee 100644
--- a/crypto/bio/bss_file.c
+++ b/crypto/bio/bss_file.c
@@ -204,7 +204,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
b->shutdown=(int)num&BIO_CLOSE;
b->ptr=(char *)ptr;
b->init=1;
-#if defined(MSDOS) || defined(WINDOWS)
+#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS)
/* Set correct text/binary mode */
if (num & BIO_FP_TEXT)
_setmode(fileno((FILE *)ptr),_O_TEXT);
@@ -233,7 +233,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
ret=0;
break;
}
-#if defined(MSDOS) || defined(WINDOWS)
+#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS)
if (!(num & BIO_FP_TEXT))
strcat(p,"b");
else
diff --git a/crypto/bio/bss_log.c b/crypto/bio/bss_log.c
index 1edf16a76f..b289c97d3c 100644
--- a/crypto/bio/bss_log.c
+++ b/crypto/bio/bss_log.c
@@ -66,9 +66,11 @@
#include <stdio.h>
#include <errno.h>
-#if defined(WIN32)
+#include <openssl/opensslconf.h>
+
+#if defined(OPENSSL_SYS_WIN32)
# include <process.h>
-#elif defined(VMS) || defined(__VMS)
+#elif defined(OPENSSL_SYS_VMS)
# include <opcdef.h>
# include <descrip.h>
# include <lib$routines.h>
@@ -85,7 +87,7 @@
#ifndef NO_SYSLOG
-#if defined(WIN32)
+#if defined(OPENSSL_SYS_WIN32)
#define LOG_EMERG 0
#define LOG_ALERT 1
#define LOG_CRIT 2
@@ -96,7 +98,7 @@
#define LOG_DEBUG 7
#define LOG_DAEMON (3<<3)
-#elif defined(VMS)
+#elif defined(OPENSSL_SYS_VMS)
/* On VMS, we don't really care about these, but we need them to compile */
#define LOG_EMERG 0
#define LOG_ALERT 1
@@ -118,7 +120,7 @@ static int MS_CALLBACK slg_free(BIO *data);
static void xopenlog(BIO* bp, char* name, int level);
static void xsyslog(BIO* bp, int priority, const char* string);
static void xcloselog(BIO* bp);
-#ifdef WIN32
+#ifdef OPENSSL_SYS_WIN32
LONG (WINAPI *go_for_advapi)() = RegOpenKeyEx;
HANDLE (WINAPI *register_event_source)() = NULL;
BOOL (WINAPI *deregister_event_source)() = NULL;
@@ -241,7 +243,7 @@ static int MS_CALLBACK slg_puts(BIO *bp, const char *str)
return(ret);
}
-#if defined(WIN32)
+#if defined(OPENSSL_SYS_WIN32)
static void xopenlog(BIO* bp, char* name, int level)
{
@@ -313,7 +315,7 @@ static void xcloselog(BIO* bp)
bp->ptr= NULL;
}
-#elif defined(VMS)
+#elif defined(OPENSSL_SYS_VMS)
static int VMS_OPC_target = LOG_DAEMON;
diff --git a/crypto/bio/bss_sock.c b/crypto/bio/bss_sock.c
index 727378ad93..fdabd16d7e 100644
--- a/crypto/bio/bss_sock.c
+++ b/crypto/bio/bss_sock.c
@@ -228,7 +228,7 @@ int BIO_sock_should_retry(int i)
{
err=get_last_socket_error();
-#if defined(WINDOWS) && 0 /* more microsoft stupidity? perhaps not? Ben 4/1/99 */
+#if defined(OPENSSL_SYS_WINDOWS) && 0 /* more microsoft stupidity? perhaps not? Ben 4/1/99 */
if ((i == -1) && (err == 0))
return(1);
#endif
@@ -242,7 +242,7 @@ int BIO_sock_non_fatal_error(int err)
{
switch (err)
{
-#if defined(WINDOWS)
+#if defined(OPENSSL_SYS_WINDOWS)
# if defined(WSAEWOULDBLOCK)
case WSAEWOULDBLOCK:
# endif