Where Online Learning is simpler!
The C and C++ Include Header Files
/usr/include/apache2/mod_perl.h
$ cat -n /usr/include/apache2/mod_perl.h 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 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 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. 15 */ 16 17 #ifndef MOD_PERL_H 18 #define MOD_PERL_H 19 20 #include "modperl_apache_includes.h" 21 #include "modperl_common_includes.h" 22 #include "modperl_apache_compat.h" 23 24 #ifdef WIN32 25 #define MP_THREADED 1 26 #else 27 #define MP_THREADED (defined(USE_ITHREADS) && APR_HAS_THREADS) 28 #endif 29 30 extern module AP_MODULE_DECLARE_DATA perl_module; 31 32 #include "modperl_error.h" 33 #include "modperl_flags.h" 34 #include "modperl_hooks.h" 35 #include "modperl_perl_global.h" 36 #include "modperl_perl_pp.h" 37 #include "modperl_sys.h" 38 #include "modperl_const.h" 39 #include "modperl_constants.h" 40 41 /* both perl and apr have largefile support enabled */ 42 #if defined(USE_LARGE_FILES) && APR_HAS_LARGE_FILES 43 #define MP_LARGE_FILES_ENABLED 44 #endif 45 46 /* both perl and apr have largefile support disabled */ 47 #if (!defined(USE_LARGE_FILES)) && !APR_HAS_LARGE_FILES 48 #define MP_LARGE_FILES_DISABLED 49 #endif 50 51 /* perl largefile support is enabled, apr support is disabled */ 52 #if defined(USE_LARGE_FILES) && !APR_HAS_LARGE_FILES 53 #define MP_LARGE_FILES_PERL_ONLY 54 #endif 55 56 /* apr largefile support is enabled, perl support is disabled */ 57 #if (!defined(USE_LARGE_FILES)) && APR_HAS_LARGE_FILES 58 #define MP_LARGE_FILES_APR_ONLY 59 #endif 60 61 /* conflict due to not have either both perl and apr 62 * support enabled or both disabled 63 */ 64 #if defined(MP_LARGE_FILES_APR_ONLY) || defined(MP_LARGE_FILES_PERL_ONLY) 65 #define MP_LARGE_FILES_CONFLICT 66 #endif 67 68 #ifdef MP_USE_GTOP 69 #include "modperl_gtop.h" 70 #endif 71 #include "modperl_time.h" 72 #include "modperl_types.h" 73 #include "modperl_util.h" 74 #include "modperl_config.h" 75 #include "modperl_cmd.h" 76 #include "modperl_handler.h" 77 #include "modperl_callback.h" 78 #include "modperl_tipool.h" 79 #include "modperl_interp.h" 80 #include "modperl_log.h" 81 #include "modperl_options.h" 82 #include "modperl_directives.h" 83 #include "modperl_io.h" 84 #include "modperl_io_apache.h" 85 #include "modperl_filter.h" 86 #include "modperl_bucket.h" 87 #include "modperl_pcw.h" 88 #include "modperl_mgv.h" 89 #include "modperl_global.h" 90 #include "modperl_env.h" 91 #include "modperl_cgi.h" 92 #include "modperl_perl.h" 93 #include "modperl_svptr_table.h" 94 #include "modperl_module.h" 95 #include "modperl_debug.h" 96 97 int modperl_threads_started(void); 98 int modperl_threaded_mpm(void); 99 int modperl_post_post_config_phase(void); 100 101 #define MP_CROAK_IF_THREADS_STARTED(what) \ 102 if (modperl_threads_started()) { \ 103 Perl_croak(aTHX_ "Can't run '%s' in the threaded " \ 104 "environment after server startup", what); \ 105 } 106 107 #define MP_CROAK_IF_THREADED_MPM(what) \ 108 if (modperl_threaded_mpm()) { \ 109 Perl_croak(aTHX_ "Can't run '%s' in a threaded mpm", \ 110 what); \ 111 } 112 113 #define MP_CROAK_IF_POST_POST_CONFIG_PHASE(what) \ 114 if (modperl_post_post_config_phase()) { \ 115 Perl_croak(aTHX_ "Can't run '%s' after server startup", \ 116 what); \ 117 } 118 119 int modperl_init_vhost(server_rec *s, apr_pool_t *p, 120 server_rec *base_server); 121 void modperl_init(server_rec *s, apr_pool_t *p); 122 void modperl_init_globals(server_rec *s, apr_pool_t *pconf); 123 int modperl_run(void); 124 int modperl_is_running(void); 125 int modperl_hook_init(apr_pool_t *pconf, apr_pool_t *plog, 126 apr_pool_t *ptemp, server_rec *s); 127 int modperl_hook_pre_config(apr_pool_t *p, apr_pool_t *plog, 128 apr_pool_t *ptemp); 129 void modperl_register_hooks(apr_pool_t *p); 130 apr_pool_t *modperl_server_pool(void); 131 apr_pool_t *modperl_server_user_pool(void); 132 PerlInterpreter *modperl_startup(server_rec *s, apr_pool_t *p); 133 int modperl_perl_destruct_level(void); 134 void xs_init(pTHX); 135 136 void modperl_response_init(request_rec *r); 137 apr_status_t modperl_response_finish(request_rec *r); 138 int modperl_response_handler(request_rec *r); 139 int modperl_response_handler_cgi(request_rec *r); 140 141 #define MgTypeExt(mg) (mg->mg_type == '~') 142 143 typedef void MP_FUNC_NONSTD_T(modperl_var_modify_t) (apr_table_t *, 144 apr_table_t *, 145 const char *, 146 const char *); 147 148 /* we need to hook a few internal things before APR_HOOK_REALLY_FIRST */ 149 #define MODPERL_HOOK_REALLY_REALLY_FIRST (-20) 150 151 #ifdef USE_ITHREADS 152 APR_DECLARE_OPTIONAL_FN(apr_status_t,modperl_interp_unselect,(void *)); 153 APR_DECLARE_OPTIONAL_FN(modperl_interp_t *,modperl_thx_interp_get,(PerlInterpreter *)); 154 #endif 155 156 /* 157 * perl context overriding and restoration is required when 158 * PerlOptions +Parent/+Clone is used in vhosts, and perl is used to 159 * at the server startup. So that
sections, PerlLoadModule, 160 * PerlModule and PerlRequire are all run using the right perl context 161 * and restore to the original context when they are done. 162 * 163 * As of perl-5.8.3 it's unfortunate that it uses PERL_GET_CONTEXT and 164 * doesn't rely on the passed pTHX internally. When and if perl is 165 * fixed to always use pTHX if available, this context switching mess 166 * can be removed. 167 */ 168 #ifdef USE_ITHREADS 169 170 #define MP_PERL_CONTEXT_DECLARE \ 171 PerlInterpreter *orig_perl = NULL; \ 172 pTHX; 173 174 #define MP_PERL_CONTEXT_STORE \ 175 orig_perl = PERL_GET_CONTEXT; 176 177 #define MP_PERL_CONTEXT_OVERRIDE(new_perl) \ 178 aTHX = new_perl; \ 179 PERL_SET_CONTEXT(aTHX); 180 181 #define MP_PERL_CONTEXT_STORE_OVERRIDE(new_perl) \ 182 MP_PERL_CONTEXT_STORE; \ 183 MP_PERL_CONTEXT_OVERRIDE(new_perl) 184 185 #define MP_PERL_CONTEXT_RESTORE \ 186 if (orig_perl) { \ 187 PERL_SET_CONTEXT(orig_perl); \ 188 } 189 190 #else /* #ifdef USE_ITHREADS */ 191 192 #define MP_PERL_CONTEXT_DECLARE 193 #define MP_PERL_CONTEXT_STORE 194 #define MP_PERL_CONTEXT_OVERRIDE(new_perl) 195 #define MP_PERL_CONTEXT_STORE_OVERRIDE(new_perl) 196 #define MP_PERL_CONTEXT_RESTORE 197 198 #endif /* end of #ifdef USE_ITHREADS */ 199 200 #endif /* MOD_PERL_H */ 201 202 /* 203 * Local Variables: 204 * c-basic-offset: 4 205 * indent-tabs-mode: nil 206 * End: 207 */
Contact us
|
About us
|
Term of use
|
Copyright © 2000-2025 MyWebUniversity.com ™