1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #define APR_WANT_STRFUNC
21 #include "http_config.h"
23 /* Possibly get rid of the macros we defined in httpd.h */
37 #if defined(ap_strchr)
39 AP_DECLARE(char *) ap_strchr(char *s
, int c
);
42 AP_DECLARE(char *) ap_strchr(char *s
, int c
)
47 #if defined(ap_strchr_c)
49 AP_DECLARE(const char *) ap_strchr_c(const char *s
, int c
);
52 AP_DECLARE(const char *) ap_strchr_c(const char *s
, int c
)
57 #if defined(ap_strrchr)
59 AP_DECLARE(char *) ap_strrchr(char *s
, int c
);
62 AP_DECLARE(char *) ap_strrchr(char *s
, int c
)
67 #if defined(ap_strrchr_c)
69 AP_DECLARE(const char *) ap_strrchr_c(const char *s
, int c
);
72 AP_DECLARE(const char *) ap_strrchr_c(const char *s
, int c
)
77 #if defined(ap_strstr)
79 AP_DECLARE(char *) ap_strstr(char *s
, const char *c
);
82 AP_DECLARE(char *) ap_strstr(char *s
, const char *c
)
87 #if defined(ap_strstr_c)
89 AP_DECLARE(const char *) ap_strstr_c(const char *s
, const char *c
);
92 AP_DECLARE(const char *) ap_strstr_c(const char *s
, const char *c
)
97 #if defined(ap_get_module_config)
98 #undef ap_get_module_config
99 AP_DECLARE(void *) ap_get_module_config(const ap_conf_vector_t
*cv
,
103 AP_DECLARE(void *) ap_get_module_config(const ap_conf_vector_t
*cv
,
106 return ((void **)cv
)[m
->module_index
];
110 * Generic accessors for other modules to set at their own module-specific
112 * @param conf_vector The vector in which the modules configuration is stored.
113 * usually r->per_dir_config or s->module_config
114 * @param m The module to set the data for.
115 * @param val The module-specific data to set
116 * @fn void ap_set_module_config(ap_conf_vector_t *cv, const module *m, void *val)
118 #if defined(ap_set_module_config)
119 #undef ap_set_module_config
120 AP_DECLARE(void) ap_set_module_config(ap_conf_vector_t
*cv
, const module
*m
,
124 AP_DECLARE(void) ap_set_module_config(ap_conf_vector_t
*cv
, const module
*m
,
127 ((void **)cv
)[m
->module_index
] = val
;