Skip to content

Commit

Permalink
* Changed the way removed ini directives are shown so its easier to a…
Browse files Browse the repository at this point in the history
…dd new ones

* Removed define_syslog_variables and its associated functions
  • Loading branch information
KalleZ committed Apr 12, 2010
1 parent 4da75af commit 8087be6
Show file tree
Hide file tree
Showing 16 changed files with 42 additions and 739 deletions.
2 changes: 1 addition & 1 deletion Makefile.global
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ PHP_TEST_SHARED_EXTENSIONS = ` \
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d $(ZEND_EXT_TYPE)=$(top_builddir)/modules/$$dlname"; \
done; \
fi`
PHP_DEPRECATED_DIRECTIVES_REGEX = '^(define_syslog_variables|register_(globals|long_arrays)?|safe_mode|magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*='
PHP_DEPRECATED_DIRECTIVES_REGEX = '^(register_(globals|long_arrays)?|safe_mode|magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*='

test: all
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
Expand Down
4 changes: 0 additions & 4 deletions ext/standard/basic_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -2464,9 +2464,6 @@ ZEND_END_ARG_INFO()
/* }}} */
/* {{{ syslog.c */
#ifdef HAVE_SYSLOG_H
ZEND_BEGIN_ARG_INFO(arginfo_define_syslog_variables, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_openlog, 0)
ZEND_ARG_INFO(0, ident)
ZEND_ARG_INFO(0, option)
Expand Down Expand Up @@ -3221,7 +3218,6 @@ const zend_function_entry basic_functions[] = { /* {{{ */
PHP_FE(openlog, arginfo_openlog)
PHP_FE(syslog, arginfo_syslog)
PHP_FE(closelog, arginfo_closelog)
PHP_DEP_FE(define_syslog_variables, arginfo_define_syslog_variables)
#endif

/* functions from lcg.c */
Expand Down
1 change: 0 additions & 1 deletion ext/standard/basic_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ typedef struct _php_basic_globals {
zend_bool mt_rand_is_seeded; /* Whether mt_rand() has been seeded */

/* syslog.c */
int syslog_started;
char *syslog_device;

/* var.c */
Expand Down
1 change: 0 additions & 1 deletion ext/standard/php_ext_syslog.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ PHP_MSHUTDOWN_FUNCTION(syslog);
PHP_FUNCTION(openlog);
PHP_FUNCTION(syslog);
PHP_FUNCTION(closelog);
PHP_FUNCTION(define_syslog_variables);

#endif

Expand Down
88 changes: 0 additions & 88 deletions ext/standard/syslog.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
#include "basic_functions.h"
#include "php_ext_syslog.h"

static void start_syslog(TSRMLS_D);

/* {{{ PHP_MINIT_FUNCTION
*/
PHP_MINIT_FUNCTION(syslog)
Expand Down Expand Up @@ -105,11 +103,6 @@ PHP_MINIT_FUNCTION(syslog)

PHP_RINIT_FUNCTION(syslog)
{
if (INI_INT("define_syslog_variables")) {
start_syslog(TSRMLS_C);
} else {
BG(syslog_started)=0;
}
BG(syslog_device) = NULL;
return SUCCESS;
}
Expand All @@ -132,87 +125,6 @@ PHP_MSHUTDOWN_FUNCTION(syslog)
return SUCCESS;
}

/* {{{ start_syslog
*/
static void start_syslog(TSRMLS_D)
{
/* error levels */
SET_VAR_LONG("LOG_EMERG", LOG_EMERG); /* system unusable */
SET_VAR_LONG("LOG_ALERT", LOG_ALERT); /* immediate action required */
SET_VAR_LONG("LOG_CRIT", LOG_CRIT); /* critical conditions */
SET_VAR_LONG("LOG_ERR", LOG_ERR);
SET_VAR_LONG("LOG_WARNING", LOG_WARNING);
SET_VAR_LONG("LOG_NOTICE", LOG_NOTICE);
SET_VAR_LONG("LOG_INFO", LOG_INFO);
SET_VAR_LONG("LOG_DEBUG", LOG_DEBUG);
/* facility: type of program logging the message */
SET_VAR_LONG("LOG_KERN", LOG_KERN);
SET_VAR_LONG("LOG_USER", LOG_USER); /* generic user level */
SET_VAR_LONG("LOG_MAIL", LOG_MAIL); /* log to email */
SET_VAR_LONG("LOG_DAEMON", LOG_DAEMON); /* other system daemons */
SET_VAR_LONG("LOG_AUTH", LOG_AUTH);
#ifndef NETWARE
SET_VAR_LONG("LOG_SYSLOG", LOG_SYSLOG);
#endif
SET_VAR_LONG("LOG_LPR", LOG_LPR);
#ifdef LOG_NEWS
/* No LOG_NEWS on HP-UX */
SET_VAR_LONG("LOG_NEWS", LOG_NEWS); /* usenet new */
#endif
#ifdef LOG_UUCP
/* No LOG_UUCP on HP-UX */
SET_VAR_LONG("LOG_UUCP", LOG_UUCP);
#endif
#ifdef LOG_CRON
/* apparently some systems don't have this one */
SET_VAR_LONG("LOG_CRON", LOG_CRON);
#endif
#ifdef LOG_AUTHPRIV
/* AIX doesn't have LOG_AUTHPRIV */
SET_VAR_LONG("LOG_AUTHPRIV", LOG_AUTHPRIV);
#endif
#if !defined(PHP_WIN32) && !defined(NETWARE)
SET_VAR_LONG("LOG_LOCAL0", LOG_LOCAL0);
SET_VAR_LONG("LOG_LOCAL1", LOG_LOCAL1);
SET_VAR_LONG("LOG_LOCAL2", LOG_LOCAL2);
SET_VAR_LONG("LOG_LOCAL3", LOG_LOCAL3);
SET_VAR_LONG("LOG_LOCAL4", LOG_LOCAL4);
SET_VAR_LONG("LOG_LOCAL5", LOG_LOCAL5);
SET_VAR_LONG("LOG_LOCAL6", LOG_LOCAL6);
SET_VAR_LONG("LOG_LOCAL7", LOG_LOCAL7);
#endif
/* options */
SET_VAR_LONG("LOG_PID", LOG_PID);
SET_VAR_LONG("LOG_CONS", LOG_CONS);
SET_VAR_LONG("LOG_ODELAY", LOG_ODELAY);
SET_VAR_LONG("LOG_NDELAY", LOG_NDELAY);
#ifdef LOG_NOWAIT
/* BeOS doesn't have LOG_NOWAIT */
SET_VAR_LONG("LOG_NOWAIT", LOG_NOWAIT);
#endif
#ifdef LOG_PERROR
/* AIX doesn't have LOG_PERROR */
SET_VAR_LONG("LOG_PERROR", LOG_PERROR); /*log to stderr*/
#endif

BG(syslog_started)=1;
}
/* }}} */

/* {{{ proto void define_syslog_variables(void)
Initializes all syslog-related variables */
PHP_FUNCTION(define_syslog_variables)
{
if (zend_parse_parameters_none() == FAILURE) {
return;
}

if (!BG(syslog_started)) {
start_syslog(TSRMLS_C);
}
}
/* }}} */

/* {{{ proto bool openlog(string ident, int option, int facility)
Open connection to system logger */
/*
Expand Down
11 changes: 0 additions & 11 deletions ext/standard/tests/misc/syslog_vars_variation1.phpt

This file was deleted.

52 changes: 0 additions & 52 deletions ext/standard/tests/misc/syslog_vars_variation2.phpt

This file was deleted.

107 changes: 0 additions & 107 deletions ext/standard/tests/network/define_syslog_variables_basic-win32.phpt

This file was deleted.

Loading

0 comments on commit 8087be6

Please sign in to comment.