#ifndef WIN32
#ifdef __ultrix
-#include <sys/sylog.h>
+#include <sys/syslog.h>
#else
#include <syslog.h>
#endif
+#else
+#include <process.h>
#endif
#include "cryptlib.h"
-#include "buffer.h"
-#include "err.h"
+#include <openssl/buffer.h>
+#include <openssl/err.h>
#ifndef NO_SYSLOG
-#ifndef NOPROTO
static int MS_CALLBACK slg_write(BIO *h,char *buf,int num);
static int MS_CALLBACK slg_puts(BIO *h,char *str);
static long MS_CALLBACK slg_ctrl(BIO *h,int cmd,long arg1,char *arg2);
static int MS_CALLBACK slg_new(BIO *h);
static int MS_CALLBACK slg_free(BIO *data);
-#else
-static int MS_CALLBACK slg_write();
-static int MS_CALLBACK slg_puts();
-static long MS_CALLBACK slg_ctrl();
-static int MS_CALLBACK slg_new();
-static int MS_CALLBACK slg_free();
-#endif
-
static int xopenlog(BIO* bp, const char* name, int level);
static int xcloselog(BIO* bp);
slg_ctrl,
slg_new,
slg_free,
+ NULL,
};
BIO_METHOD *BIO_s_log(void)
char* buf= in;
char* pp;
#if defined(WIN32)
- LPTSTR lpszStrings[1];
+ LPCSTR lpszStrings[2];
WORD evtype= EVENTLOG_ERROR_TYPE;
+ int pid = _getpid();
+ char pidbuf[20];
#else
int priority;
#endif
evtype= EVENTLOG_ERROR_TYPE;
pp= buf;
}
- lpszStrings[0]= pp;
+
+ sprintf(pidbuf, "[%d] ", pid);
+ lpszStrings[0] = pidbuf;
+ lpszStrings[1] = pp;
if(b->ptr)
- ReportEvent(b->ptr, evtype, 0, 1024, NULL, 1, 0,
+ ReportEvent(b->ptr, evtype, 0, 1024, NULL, 2, 0,
lpszStrings, NULL);
#else
if(strncmp(buf, "ERR ", 4) == 0){