From: Sascha Schumann Date: Sat, 24 Feb 2001 21:08:15 +0000 (+0000) Subject: Actually compile on systems without syslog. X-Git-Tag: php-4.0.5RC1~173 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a40ee1f181f98504e476dc85ab27210099a54680;p=php Actually compile on systems without syslog. PR: #9412 --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index ac45428ac4..021ad30fa8 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -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) diff --git a/ext/standard/php_ext_syslog.h b/ext/standard/php_ext_syslog.h index aa597cf080..016c81163f 100644 --- a/ext/standard/php_ext_syslog.h +++ b/ext/standard/php_ext_syslog.h @@ -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); diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c index ef7f1a483f..24ceb9ab75 100644 --- a/ext/standard/syslog.c +++ b/ext/standard/syslog.c @@ -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 diff --git a/main/php_syslog.h b/main/php_syslog.h index cf70159133..279da71c92 100644 --- a/main/php_syslog.h +++ b/main/php_syslog.h @@ -4,8 +4,11 @@ #ifdef PHP_WIN32 #include "win32/syslog.h" #else +#include "php_config.h" +#ifdef HAVE_SYSLOG_H #include #endif +#endif /* * The SCO OpenServer 5 Development System (not the UDK)