Fix typo and make clearer the intent by using defined(). See #198.

This commit is contained in:
brectanus
2007-08-10 13:44:55 +00:00
parent 716d0fd419
commit 7c856eef1f
3 changed files with 6 additions and 3 deletions

View File

@@ -18,7 +18,7 @@
#include <apr_optional.h> #include <apr_optional.h>
#ifdef NO_MODSEC_API #if (!defined(NO_MODSEC_API))
/* Optional functions. */ /* Optional functions. */
APR_DECLARE_OPTIONAL_FN(void, modsec_register_tfn, (const char *name, void *fn)); APR_DECLARE_OPTIONAL_FN(void, modsec_register_tfn, (const char *name, void *fn));

View File

@@ -3,6 +3,9 @@ This directory contains two examples how you can extend
ModSecurity without having to touch it directly, simply ModSecurity without having to touch it directly, simply
by creating custom Apache modules. by creating custom Apache modules.
NOTE: ModSecurity must be compiled with API support
to use this feature (do not use -DNO_MODSEC_API).
1) 1)
Module mod_tfn_reverse.c creates a custom transformation Module mod_tfn_reverse.c creates a custom transformation

View File

@@ -972,7 +972,7 @@ static void hook_insert_error_filter(request_rec *r) {
} }
#endif #endif
#ifdef NO_MODSEC_API #if (!defined(NO_MODSEC_API))
/** /**
* This function is exported for other Apache modules to * This function is exported for other Apache modules to
* register new transformation functions. * register new transformation functions.
@@ -1033,7 +1033,7 @@ static void register_hooks(apr_pool_t *mp) {
NULL NULL
}; };
#ifdef NO_MODSEC_API #if (!defined(NO_MODSEC_API))
/* Export optional functions. */ /* Export optional functions. */
APR_REGISTER_OPTIONAL_FN(modsec_register_tfn); APR_REGISTER_OPTIONAL_FN(modsec_register_tfn);
APR_REGISTER_OPTIONAL_FN(modsec_register_operator); APR_REGISTER_OPTIONAL_FN(modsec_register_operator);