diff options
Diffstat (limited to 'include/apache13.h')
-rw-r--r-- | include/apache13.h | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/include/apache13.h b/include/apache13.h new file mode 100644 index 0000000..5659420 --- /dev/null +++ b/include/apache13.h | |||
@@ -0,0 +1,101 @@ | |||
1 | /* $Id: apache13.h 175 2007-10-20 13:18:20Z urkle@drip.ws $ */ | ||
2 | #ifndef APACHE13_H | ||
3 | #define APACHE13_H | ||
4 | |||
5 | #include "httpd.h" | ||
6 | #include "http_config.h" | ||
7 | #include "http_log.h" | ||
8 | #include "http_core.h" | ||
9 | |||
10 | /* Defines */ | ||
11 | #define AP_MODULE_DECLARE_DATA MODULE_VAR_EXPORT | ||
12 | #define APR_OFF_T_FMT "ld" | ||
13 | #define APR_PID_T_FMT "d" | ||
14 | #define APR_SUCCESS 0 | ||
15 | #define APR_OFFSETOF XtOffsetOf | ||
16 | |||
17 | /** method of declaring a directive with raw argument parsing */ | ||
18 | # define AP_INIT_RAW_ARGS(directive, func, mconfig, where, help) \ | ||
19 | { directive, func, mconfig, where, RAW_ARGS, help } | ||
20 | /** method of declaring a directive which takes 1 argument */ | ||
21 | # define AP_INIT_TAKE1(directive, func, mconfig, where, help) \ | ||
22 | { directive, func, mconfig, where, TAKE1, help } | ||
23 | /** method of declaring a directive which takes 2 argument */ | ||
24 | # define AP_INIT_TAKE2(directive, func, mconfig, where, help) \ | ||
25 | { directive, func, mconfig, where, TAKE2, help } | ||
26 | /** method of declaring a directive which takes multiple arguments */ | ||
27 | # define AP_INIT_ITERATE(directive, func, mconfig, where, help) \ | ||
28 | { directive, func, mconfig, where, ITERATE, help } | ||
29 | /** method of declaring a directive which takes 1 or 3 arguments */ | ||
30 | # define AP_INIT_TAKE13(directive, func, mconfig, where, help) \ | ||
31 | { directive, func, mconfig, where, TAKE13, help } | ||
32 | /** method of declaring a directive which takes 3 arguments */ | ||
33 | # define AP_INIT_TAKE3(directive, func, mconfig, where, help) \ | ||
34 | { directive, func, mconfig, where, TAKE3, help } | ||
35 | /** method of declaring a directive which takes a flag (on/off) as an argument */ | ||
36 | # define AP_INIT_FLAG(directive, func, mconfig, where, help) \ | ||
37 | { directive, func, mconfig, where, FLAG, help } | ||
38 | |||
39 | /* Types */ | ||
40 | #define apr_pool_t pool | ||
41 | #define apr_array_header_t array_header | ||
42 | #define apr_table_t table | ||
43 | |||
44 | #define apr_status_t int | ||
45 | #define apr_uri_t uri_components | ||
46 | |||
47 | /* Functions */ | ||
48 | #define ap_get_remote_host(a,b,c,d) ap_get_remote_host(a,b,c) | ||
49 | #define ap_set_deprecated NULL | ||
50 | |||
51 | #define apr_uri_unparse ap_unparse_uri_components | ||
52 | #define apr_uri_parse ap_parse_uri_components | ||
53 | #define ap_add_version_component(p,s) ap_add_version_component(s) | ||
54 | |||
55 | #define apr_pool_create(a,b) *(a) = ap_make_sub_pool(b) | ||
56 | #define apr_pool_destroy ap_destroy_pool | ||
57 | #define apr_pool_cleanup_register ap_register_cleanup | ||
58 | #define apr_palloc ap_palloc | ||
59 | #define apr_pcalloc ap_pcalloc | ||
60 | #define apr_pstrdup ap_pstrdup | ||
61 | #define apr_pstrcat ap_pstrcat | ||
62 | #define apr_psprintf ap_psprintf | ||
63 | #define apr_snprintf ap_snprintf | ||
64 | #define ap_strchr strchr | ||
65 | #define ap_strchr_c strchr | ||
66 | #define ap_strstr strstr | ||
67 | #define ap_strstr_c strstr | ||
68 | |||
69 | #define apr_table_set ap_table_set | ||
70 | #define apr_table_get ap_table_get | ||
71 | #define apr_table_make ap_make_table | ||
72 | |||
73 | #define apr_array_push ap_push_array | ||
74 | #define apr_array_make ap_make_array | ||
75 | #define apr_array_cat ap_array_cat | ||
76 | #define apr_is_empty_array(t) (((t) == NULL)||((t)->nelts == 0)) | ||
77 | |||
78 | #define apr_file_t FILE | ||
79 | #define apr_file_printf fprintf | ||
80 | |||
81 | #define apr_tolower ap_tolower | ||
82 | |||
83 | void log_error(char *file, int line, int level, apr_status_t status, | ||
84 | const server_rec *s, const char *fmt, ...) __attribute__ ((format (printf, 6,7))); | ||
85 | |||
86 | #ifndef WIN32 | ||
87 | inline | ||
88 | #endif | ||
89 | void log_error(char *file, int line, int level, | ||
90 | apr_status_t status, const server_rec *s, const char *fmt, ...) | ||
91 | { | ||
92 | static char buff[MAX_STRING_LEN]; | ||
93 | va_list args; | ||
94 | va_start(args, fmt); | ||
95 | ap_vsnprintf(buff,MAX_STRING_LEN, fmt,args); | ||
96 | ap_log_error(file,line,level | APLOG_NOERRNO ,s,"%s",buff); | ||
97 | va_end(args); | ||
98 | } | ||
99 | |||
100 | |||
101 | #endif /* APACHE13_H */ | ||