diff options
author | Yann Ylavic <ylavic@apache.org> | 2017-09-22 15:13:44 +0200 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2017-09-22 15:13:44 +0200 |
commit | 91566715427817ae70ec386ae0d283015d5a73ee (patch) | |
tree | 7d0da178e2fb3fc3376f1f7386357fb7a3b28f55 /include | |
parent | config: follow up to r1809302. (diff) | |
download | apache2-91566715427817ae70ec386ae0d283015d5a73ee.tar.xz apache2-91566715427817ae70ec386ae0d283015d5a73ee.zip |
config: follow up to r1809302.
Provide a convenient function to get module flags, and remove useless
AP_MODULE_HAS_FLAGS checks in the core, core's version is at current MMN.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1809311 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/http_config.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/include/http_config.h b/include/http_config.h index cfc0c3233c..37e0b382ab 100644 --- a/include/http_config.h +++ b/include/http_config.h @@ -333,18 +333,11 @@ struct cmd_parms_struct { ap_directive_t *parent; }; -#define AP_MODULE_FLAGS_MMN_MAJOR 20161018 -#define AP_MODULE_FLAGS_MMN_MINOR 7 -#define AP_MODULE_HAS_FLAGS(m) \ - AP_MODULE_MAGIC_AT_LEAST(AP_MODULE_FLAGS_MMN_MAJOR, \ - AP_MODULE_FLAGS_MMN_MINOR) -#if AP_MODULE_HAS_FLAGS /** * Flags associated with a module. */ #define AP_MODULE_FLAG_NONE (0) #define AP_MODULE_FLAG_ALWAYS_MERGE (1 << 0) -#endif /** * Module structures. Just about everything is dispatched through @@ -426,10 +419,8 @@ struct module_struct { */ void (*register_hooks) (apr_pool_t *p); -#if AP_MODULE_HAS_FLAGS /** A bitmask of AP_MODULE_FLAG_* */ int flags; -#endif }; /** @@ -542,6 +533,21 @@ AP_DECLARE(void *) ap_get_module_config(const ap_conf_vector_t *cv, AP_DECLARE(void) ap_set_module_config(ap_conf_vector_t *cv, const module *m, void *val); +/** + * When module flags have been introduced, and a way to check this. + */ +#define AP_MODULE_FLAGS_MMN_MAJOR 20161018 +#define AP_MODULE_FLAGS_MMN_MINOR 7 +#define AP_MODULE_HAS_FLAGS(m) \ + AP_MODULE_MAGIC_AT_LEAST(AP_MODULE_FLAGS_MMN_MAJOR, \ + AP_MODULE_FLAGS_MMN_MINOR) +/** + * Generic accessor for the module's flags + * @param m The module to get the flags from. + * @return The module-specific flags + */ +AP_DECLARE(int) ap_get_module_flags(const module *m); + #if !defined(AP_DEBUG) #define ap_get_module_config(v,m) \ |