summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/bss_log.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bio/bss_log.c')
-rw-r--r--src/lib/libcrypto/bio/bss_log.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/lib/libcrypto/bio/bss_log.c b/src/lib/libcrypto/bio/bss_log.c
index 1edf16a76f..a39d95297c 100644
--- a/src/lib/libcrypto/bio/bss_log.c
+++ b/src/lib/libcrypto/bio/bss_log.c
@@ -66,26 +66,27 @@
66#include <stdio.h> 66#include <stdio.h>
67#include <errno.h> 67#include <errno.h>
68 68
69#if defined(WIN32) 69#include "cryptlib.h"
70
71#if defined(OPENSSL_SYS_WIN32)
70# include <process.h> 72# include <process.h>
71#elif defined(VMS) || defined(__VMS) 73#elif defined(OPENSSL_SYS_VMS)
72# include <opcdef.h> 74# include <opcdef.h>
73# include <descrip.h> 75# include <descrip.h>
74# include <lib$routines.h> 76# include <lib$routines.h>
75# include <starlet.h> 77# include <starlet.h>
76#elif defined(__ultrix) 78#elif defined(__ultrix)
77# include <sys/syslog.h> 79# include <sys/syslog.h>
78#elif !defined(MSDOS) /* Unix */ 80#elif !defined(MSDOS) && !defined(OPENSSL_SYS_VXWORKS) && !defined(NO_SYSLOG) /* Unix */
79# include <syslog.h> 81# include <syslog.h>
80#endif 82#endif
81 83
82#include "cryptlib.h"
83#include <openssl/buffer.h> 84#include <openssl/buffer.h>
84#include <openssl/err.h> 85#include <openssl/err.h>
85 86
86#ifndef NO_SYSLOG 87#ifndef NO_SYSLOG
87 88
88#if defined(WIN32) 89#if defined(OPENSSL_SYS_WIN32)
89#define LOG_EMERG 0 90#define LOG_EMERG 0
90#define LOG_ALERT 1 91#define LOG_ALERT 1
91#define LOG_CRIT 2 92#define LOG_CRIT 2
@@ -96,7 +97,7 @@
96#define LOG_DEBUG 7 97#define LOG_DEBUG 7
97 98
98#define LOG_DAEMON (3<<3) 99#define LOG_DAEMON (3<<3)
99#elif defined(VMS) 100#elif defined(OPENSSL_SYS_VMS)
100/* On VMS, we don't really care about these, but we need them to compile */ 101/* On VMS, we don't really care about these, but we need them to compile */
101#define LOG_EMERG 0 102#define LOG_EMERG 0
102#define LOG_ALERT 1 103#define LOG_ALERT 1
@@ -118,7 +119,7 @@ static int MS_CALLBACK slg_free(BIO *data);
118static void xopenlog(BIO* bp, char* name, int level); 119static void xopenlog(BIO* bp, char* name, int level);
119static void xsyslog(BIO* bp, int priority, const char* string); 120static void xsyslog(BIO* bp, int priority, const char* string);
120static void xcloselog(BIO* bp); 121static void xcloselog(BIO* bp);
121#ifdef WIN32 122#ifdef OPENSSL_SYS_WIN32
122LONG (WINAPI *go_for_advapi)() = RegOpenKeyEx; 123LONG (WINAPI *go_for_advapi)() = RegOpenKeyEx;
123HANDLE (WINAPI *register_event_source)() = NULL; 124HANDLE (WINAPI *register_event_source)() = NULL;
124BOOL (WINAPI *deregister_event_source)() = NULL; 125BOOL (WINAPI *deregister_event_source)() = NULL;
@@ -241,7 +242,7 @@ static int MS_CALLBACK slg_puts(BIO *bp, const char *str)
241 return(ret); 242 return(ret);
242 } 243 }
243 244
244#if defined(WIN32) 245#if defined(OPENSSL_SYS_WIN32)
245 246
246static void xopenlog(BIO* bp, char* name, int level) 247static void xopenlog(BIO* bp, char* name, int level)
247{ 248{
@@ -313,7 +314,7 @@ static void xcloselog(BIO* bp)
313 bp->ptr= NULL; 314 bp->ptr= NULL;
314} 315}
315 316
316#elif defined(VMS) 317#elif defined(OPENSSL_SYS_VMS)
317 318
318static int VMS_OPC_target = LOG_DAEMON; 319static int VMS_OPC_target = LOG_DAEMON;
319 320