diff options
| author | Xinchen Hui <laruence@gmail.com> | 2015-05-23 19:19:48 +0800 |
|---|---|---|
| committer | Xinchen Hui <laruence@gmail.com> | 2015-05-23 19:19:48 +0800 |
| commit | 86de98cabada88f4667839794c176ea37648498b (patch) | |
| tree | ccc110ff41110d7cf21372a3ae2fa177aa20b8e4 /sapi/cgi/cgi_main.c | |
| parent | 18cf4e0a8a574034f60f4d123407c173e57e54ec (diff) | |
| download | php-git-86de98cabada88f4667839794c176ea37648498b.tar.gz | |
Use weak function for fcgi_log
Diffstat (limited to 'sapi/cgi/cgi_main.c')
| -rw-r--r-- | sapi/cgi/cgi_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index b89829f016..fd8f665936 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -219,6 +219,7 @@ static php_cgi_globals_struct php_cgi_globals; #define TRANSLATE_SLASHES(path) #endif +#ifndef HAVE_ATTRIBUTE_WEAK static void fcgi_log(int type, const char *format, ...) { va_list ap; @@ -226,6 +227,7 @@ static void fcgi_log(int type, const char *format, ...) { vfprintf(stderr, format, ap); va_end(ap); } +#endif static int print_module_info(zval *element) { @@ -1936,7 +1938,10 @@ consult the installation file that came with this distribution, or visit \n\ } } +#ifndef HAVE_ATTRIBUTE_WEAK fcgi_set_logger(fcgi_log); +#endif + if (bindpath) { int backlog = 128; if (getenv("PHP_FCGI_BACKLOG")) { |
