diff options
author | Sascha Schumann <sas@php.net> | 2001-02-24 21:08:15 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2001-02-24 21:08:15 +0000 |
commit | a40ee1f181f98504e476dc85ab27210099a54680 (patch) | |
tree | 0fa0037fa9f01b5fe5c7a70bddd283225c29caf3 | |
parent | adb3e3992ca89f3bed30f40b8ab6fa2c2a50cfc6 (diff) | |
download | php-git-a40ee1f181f98504e476dc85ab27210099a54680.tar.gz |
Actually compile on systems without syslog.
PR: #9412
-rw-r--r-- | ext/standard/basic_functions.c | 2 | ||||
-rw-r--r-- | ext/standard/php_ext_syslog.h | 6 | ||||
-rw-r--r-- | ext/standard/syslog.c | 4 | ||||
-rw-r--r-- | main/php_syslog.h | 3 |
4 files changed, 12 insertions, 3 deletions
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 <syslog.h> #endif +#endif /* * The SCO OpenServer 5 Development System (not the UDK) |