diff options
author | Jérôme Loyet <fat@php.net> | 2011-07-05 01:24:10 +0000 |
---|---|---|
committer | Jérôme Loyet <fat@php.net> | 2011-07-05 01:24:10 +0000 |
commit | c4d83a413c0acb19cee64349c24768917f62ada9 (patch) | |
tree | 1eb675bcb7c946a63e23fdad4fa5b3f487145695 | |
parent | 5bd0be8a151c403b5c6a93db1549c62f55ce0470 (diff) | |
download | php-git-c4d83a413c0acb19cee64349c24768917f62ada9.tar.gz |
- moved STR2STR, BOOL2STR and PM2STR from fpm_conf.h to fpm_conf.c (Giovanni Giacobbi)
-rw-r--r-- | sapi/fpm/fpm/fpm_conf.c | 9 | ||||
-rw-r--r-- | sapi/fpm/fpm/fpm_conf.h | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c index 0a1494d404..cc7baea31e 100644 --- a/sapi/fpm/fpm/fpm_conf.c +++ b/sapi/fpm/fpm/fpm_conf.c @@ -44,6 +44,12 @@ #include "fpm_log.h" #include "zlog.h" +#define STR2STR(a) (a ? a : "undefined") +#define BOOL2STR(a) (a ? "yes" : "no") +#define PM2STR(a) (a == PM_STYLE_STATIC ? "static" : "dynamic") +#define GO(field) offsetof(struct fpm_global_config_s, field) +#define WPO(field) offsetof(struct fpm_worker_pool_config_s, field) + static int fpm_conf_load_ini_file(char *filename TSRMLS_DC); static char *fpm_conf_set_integer(zval *value, void **config, intptr_t offset); static char *fpm_conf_set_time(zval *value, void **config, intptr_t offset); @@ -60,9 +66,6 @@ static char *ini_filename = NULL; static int ini_lineno = 0; static char *ini_include = NULL; -#define GO(field) offsetof(struct fpm_global_config_s, field) -#define WPO(field) offsetof(struct fpm_worker_pool_config_s, field) - static struct ini_value_parser_s ini_fpm_global_options[] = { { "emergency_restart_threshold", &fpm_conf_set_integer, GO(emergency_restart_threshold) }, { "emergency_restart_interval", &fpm_conf_set_time, GO(emergency_restart_interval) }, diff --git a/sapi/fpm/fpm/fpm_conf.h b/sapi/fpm/fpm/fpm_conf.h index d1087641d3..e8615ebae0 100644 --- a/sapi/fpm/fpm/fpm_conf.h +++ b/sapi/fpm/fpm/fpm_conf.h @@ -10,10 +10,6 @@ #define FPM_CONF_MAX_PONG_LENGTH 64 -#define STR2STR(a) (a ? a : "undefined") -#define BOOL2STR(a) (a ? "yes" : "no") -#define PM2STR(a) (a == PM_STYLE_STATIC ? "static" : "dynamic") - struct key_value_s; struct key_value_s { |