diff options
author | Paul Querna | 2005-04-08 22:31:04 +0000 |
---|---|---|
committer | Paul Querna | 2005-04-08 22:31:04 +0000 |
commit | 482f47ffe26bf5d4d3ca0f0de81380b3cb061be3 (patch) | |
tree | 00763423d914958e28fb61943e6fd0478c296c36 | |
parent | 5a6446d26767fb0f0f8164a62fe1100d0a304d88 (diff) |
include support for 2.0.xx
-rw-r--r-- | include/mod_gnutls.h.in | 13 | ||||
-rw-r--r-- | src/mod_gnutls.c | 5 |
2 files changed, 18 insertions, 0 deletions
diff --git a/include/mod_gnutls.h.in b/include/mod_gnutls.h.in index 234e23c..d9b989e 100644 --- a/include/mod_gnutls.h.in +++ b/include/mod_gnutls.h.in | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "apr_buckets.h" | 25 | #include "apr_buckets.h" |
26 | #include "apr_strings.h" | 26 | #include "apr_strings.h" |
27 | #include "apr_tables.h" | 27 | #include "apr_tables.h" |
28 | #include "ap_release.h" | ||
28 | 29 | ||
29 | #ifndef __mod_gnutls_h_inc | 30 | #ifndef __mod_gnutls_h_inc |
30 | #define __mod_gnutls_h_inc | 31 | #define __mod_gnutls_h_inc |
@@ -46,6 +47,18 @@ module AP_MODULE_DECLARE_DATA gnutls_module; | |||
46 | 47 | ||
47 | #define MOD_GNUTLS_DEBUG @OOO_MAINTAIN@ | 48 | #define MOD_GNUTLS_DEBUG @OOO_MAINTAIN@ |
48 | 49 | ||
50 | /* Recent Versions of 2.1 renamed several hooks. This allows us to | ||
51 | compile on 2.0.xx */ | ||
52 | #if AP_SERVER_MINORVERSION_NUMBER >= 1 | ||
53 | #if AP_SERVER_PATCHLEVEL_NUMBER >= 3 | ||
54 | #define USING_2_1_RECENT 1 | ||
55 | #endif | ||
56 | #endif | ||
57 | |||
58 | #ifndef USING_2_1_RECENT | ||
59 | #define USING_2_1_RECENT 0 | ||
60 | #endif | ||
61 | |||
49 | typedef enum | 62 | typedef enum |
50 | { | 63 | { |
51 | mod_gnutls_cache_none, | 64 | mod_gnutls_cache_none, |
diff --git a/src/mod_gnutls.c b/src/mod_gnutls.c index ad07d5f..71076ef 100644 --- a/src/mod_gnutls.c +++ b/src/mod_gnutls.c | |||
@@ -526,8 +526,13 @@ static void gnutls_hooks(apr_pool_t * p) | |||
526 | APR_HOOK_MIDDLE); | 526 | APR_HOOK_MIDDLE); |
527 | ap_hook_child_init(mod_gnutls_hook_child_init, NULL, NULL, | 527 | ap_hook_child_init(mod_gnutls_hook_child_init, NULL, NULL, |
528 | APR_HOOK_MIDDLE); | 528 | APR_HOOK_MIDDLE); |
529 | #if USING_2_1_RECENT | ||
529 | ap_hook_http_scheme(mod_gnutls_hook_http_scheme, NULL, NULL, | 530 | ap_hook_http_scheme(mod_gnutls_hook_http_scheme, NULL, NULL, |
530 | APR_HOOK_MIDDLE); | 531 | APR_HOOK_MIDDLE); |
532 | #else | ||
533 | ap_hook_http_method(mod_gnutls_hook_http_scheme, NULL, NULL, | ||
534 | APR_HOOK_MIDDLE); | ||
535 | #endif | ||
531 | ap_hook_default_port(mod_gnutls_hook_default_port, NULL, NULL, | 536 | ap_hook_default_port(mod_gnutls_hook_default_port, NULL, NULL, |
532 | APR_HOOK_MIDDLE); | 537 | APR_HOOK_MIDDLE); |
533 | ap_hook_pre_config(mod_gnutls_hook_pre_config, NULL, NULL, | 538 | ap_hook_pre_config(mod_gnutls_hook_pre_config, NULL, NULL, |