Add ability to compile without API support (-DNO_MODSEC_API). See #198.

This commit is contained in:
brectanus
2007-08-10 00:46:04 +00:00
parent f4389c9a55
commit 32905f9d46
4 changed files with 10 additions and 1 deletions

View File

@@ -972,6 +972,7 @@ static void hook_insert_error_filter(request_rec *r) {
}
#endif
#ifdef NO_MODSEC_API
/**
* This function is exported for other Apache modules to
* register new transformation functions.
@@ -1007,6 +1008,7 @@ static void modsec_register_variable(const char *name, unsigned int type,
fprintf(stderr,"modsecurity is NULL\n");
}
}
#endif
/**
* Registers module hooks with Apache.
@@ -1031,10 +1033,12 @@ static void register_hooks(apr_pool_t *mp) {
NULL
};
#ifdef NO_MODSEC_API
/* Export optional functions. */
APR_REGISTER_OPTIONAL_FN(modsec_register_tfn);
APR_REGISTER_OPTIONAL_FN(modsec_register_operator);
APR_REGISTER_OPTIONAL_FN(modsec_register_variable);
#endif
/* Main hooks */
ap_hook_pre_config(hook_pre_config, NULL, NULL, APR_HOOK_FIRST);