summaryrefslogtreecommitdiff
path: root/main/php_syslog.h
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-05-28 16:22:28 +0000
committerSascha Schumann <sas@php.net>2000-05-28 16:22:28 +0000
commit0d9c0616f9bf1441cddadc1ff1e9870d2e1c09e0 (patch)
treecce0a054e5ab5c5ebf64298a108479f6b8077f4c /main/php_syslog.h
parent9cd4929417a944a4600875db7018159900bee7b3 (diff)
downloadphp-git-0d9c0616f9bf1441cddadc1ff1e9870d2e1c09e0.tar.gz
Use php_syslog() for system call. On OpenServer 5, syslog is defined to
var_syslog/sys_syslog which causes various problems. Submitted by: Paul Gardiner <I.T.Manager@barleychalu.co.uk>
Diffstat (limited to 'main/php_syslog.h')
-rw-r--r--main/php_syslog.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/main/php_syslog.h b/main/php_syslog.h
new file mode 100644
index 0000000000..f356ff5418
--- /dev/null
+++ b/main/php_syslog.h
@@ -0,0 +1,33 @@
+#ifndef PHP_SYSLOG_H
+#define PHP_SYSLOG_H
+
+#ifdef PHP_WIN32
+#include "win32/syslog.h"
+#include "win32/php_registry.h"
+#else
+#include <syslog.h>
+#endif
+
+/*
+ * SCO OpenServer 5 defines syslog to var_syslog/sys_syslog which
+ * causes trouble with our use of syslog. We define php_syslog
+ * to be the system function syslog.
+ */
+
+#ifdef syslog
+
+#if defined(var_syslog) && var_syslog == syslog
+#define php_syslog var_syslog
+#elif defined(sys_syslog) && sys_syslog == syslog
+#define php_syslog sys_syslog
+#endif
+
+#endif
+
+#ifndef php_syslog
+#define php_syslog syslog
+#undef syslog
+#endif
+
+
+#endif