]> granicus.if.org Git - php/commitdiff
Actually compile on systems without syslog.
authorSascha Schumann <sas@php.net>
Sat, 24 Feb 2001 21:08:15 +0000 (21:08 +0000)
committerSascha Schumann <sas@php.net>
Sat, 24 Feb 2001 21:08:15 +0000 (21:08 +0000)
PR: #9412

ext/standard/basic_functions.c
ext/standard/php_ext_syslog.h
ext/standard/syslog.c
main/php_syslog.h

index ac45428ac4499fa957394dd8694028b9115965a7..021ad30fa8127a346412d1d21edd677b1edfc545 100644 (file)
@@ -507,10 +507,12 @@ function_entry basic_functions[] = {
        PHP_FE(ezmlm_hash,                              NULL)
 
        /* functions from syslog.c */
+#ifdef HAVE_SYSLOG_H
        PHP_FE(openlog,                                 NULL)
        PHP_FE(syslog,                                  NULL)
        PHP_FE(closelog,                                NULL)
        PHP_FE(define_syslog_variables, NULL)
+#endif
 
        /* functions from lcg.c */
        PHP_FE(lcg_value, NULL)
index aa597cf0809475c55ef0179334648398aa3199ea..016c81163f9376205fe4bc7020871e9a97ef4b27 100644 (file)
@@ -25,9 +25,9 @@
 
 #include "php_syslog.h"
 
-extern PHP_MINIT_FUNCTION(syslog);
-extern PHP_RINIT_FUNCTION(syslog);
-extern PHP_RSHUTDOWN_FUNCTION(syslog);
+PHP_MINIT_FUNCTION(syslog);
+PHP_RINIT_FUNCTION(syslog);
+PHP_RSHUTDOWN_FUNCTION(syslog);
 
 PHP_FUNCTION(openlog);
 PHP_FUNCTION(syslog);
index ef7f1a483ff66a4e1c6ec36fa73a20e91e60ff65..24ceb9ab75569949b81406a45bbab87c57dde6eb 100644 (file)
@@ -19,6 +19,8 @@
 /* $Id$ */
 
 #include "php.h"
+
+#ifdef HAVE_SYSLOG_H
 #include "php_ini.h"
 #include "zend_globals.h"
 
@@ -262,6 +264,8 @@ PHP_FUNCTION(syslog)
 }
 /* }}} */
 
+#endif
+
 /*
  * Local variables:
  * tab-width: 4
index cf701591338f2c113361a89eb447c740670dd2ac..279da71c9207a0640124fe453b411408fd473546 100644 (file)
@@ -4,8 +4,11 @@
 #ifdef PHP_WIN32
 #include "win32/syslog.h"
 #else
+#include "php_config.h"
+#ifdef HAVE_SYSLOG_H
 #include <syslog.h>
 #endif
+#endif
 
 /* 
  * The SCO OpenServer 5 Development System (not the UDK)