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.
18 #include "apr_strings.h"
19 #include "apr_getopt.h"
20 #include "apr_general.h"
24 #include "apr_version.h"
25 #include "apu_version.h"
27 #define APR_WANT_STDIO
28 #define APR_WANT_STRFUNC
31 #include "ap_config.h"
33 #include "http_main.h"
35 #include "http_config.h"
36 #include "http_core.h"
37 #include "http_request.h"
38 #include "http_vhost.h"
40 #include "util_ebcdic.h"
48 #include <netinet/in.h>
50 #if HAVE_ARPA_NAMESER_H
51 #include <arpa/nameser.h>
57 /* WARNING: Win32 binds http_main.c dynamically to the server. Please place
58 * extern functions and global data in another appropriate module.
60 * Most significant main() global data can be found in http_config.c
63 static void show_mpm_settings(void)
68 printf("Server MPM: %s\n", ap_show_mpm());
70 retval = ap_mpm_query(AP_MPMQ_IS_THREADED, &mpm_query_info);
72 if (retval == APR_SUCCESS) {
73 printf(" threaded: ");
75 if (mpm_query_info == AP_MPMQ_DYNAMIC) {
76 printf("yes (variable thread count)\n");
78 else if (mpm_query_info == AP_MPMQ_STATIC) {
79 printf("yes (fixed thread count)\n");
86 retval = ap_mpm_query(AP_MPMQ_IS_FORKED, &mpm_query_info);
88 if (retval == APR_SUCCESS) {
91 if (mpm_query_info == AP_MPMQ_DYNAMIC) {
92 printf("yes (variable process count)\n");
94 else if (mpm_query_info == AP_MPMQ_STATIC) {
95 printf("yes (fixed process count)\n");
103 static void show_compile_settings(void)
105 printf("Server version: %s\n", ap_get_server_description());
106 printf("Server built: %s\n", ap_get_server_built());
107 printf("Server's Module Magic Number: %u:%u\n",
108 MODULE_MAGIC_NUMBER_MAJOR, MODULE_MAGIC_NUMBER_MINOR);
109 #if APR_MAJOR_VERSION >= 2
110 printf("Server loaded: APR %s\n", apr_version_string());
111 printf("Compiled using: APR %s\n", APR_VERSION_STRING);
113 printf("Server loaded: APR %s, APR-UTIL %s\n",
114 apr_version_string(), apu_version_string());
115 printf("Compiled using: APR %s, APR-UTIL %s\n",
116 APR_VERSION_STRING, APU_VERSION_STRING);
118 /* sizeof(foo) is long on some platforms so we might as well
119 * make it long everywhere to keep the printf format
122 printf("Architecture: %ld-bit\n", 8 * (long)sizeof(void *));
126 printf("Server compiled with....\n");
127 #ifdef BIG_SECURITY_HOLE
128 printf(" -D BIG_SECURITY_HOLE\n");
131 #ifdef SECURITY_HOLE_PASS_AUTHORIZATION
132 printf(" -D SECURITY_HOLE_PASS_AUTHORIZATION\n");
136 printf(" -D OS=\"" OS "\"\n");
140 printf(" -D HAVE_SHMGET\n");
143 #if APR_FILE_BASED_SHM
144 printf(" -D APR_FILE_BASED_SHM\n");
148 printf(" -D APR_HAS_SENDFILE\n");
152 printf(" -D APR_HAS_MMAP\n");
156 printf(" -D NO_WRITEV\n");
160 printf(" -D NO_LINGCLOSE\n");
164 printf(" -D APR_HAVE_IPV6 (IPv4-mapped addresses ");
165 #ifdef AP_ENABLE_V4_MAPPED
166 printf("enabled)\n");
168 printf("disabled)\n");
172 #if APR_USE_FLOCK_SERIALIZE
173 printf(" -D APR_USE_FLOCK_SERIALIZE\n");
176 #if APR_USE_SYSVSEM_SERIALIZE
177 printf(" -D APR_USE_SYSVSEM_SERIALIZE\n");
180 #if APR_USE_POSIXSEM_SERIALIZE
181 printf(" -D APR_USE_POSIXSEM_SERIALIZE\n");
184 #if APR_USE_FCNTL_SERIALIZE
185 printf(" -D APR_USE_FCNTL_SERIALIZE\n");
188 #if APR_USE_PROC_PTHREAD_SERIALIZE
189 printf(" -D APR_USE_PROC_PTHREAD_SERIALIZE\n");
192 #if APR_USE_PTHREAD_SERIALIZE
193 printf(" -D APR_USE_PTHREAD_SERIALIZE\n");
196 #if APR_PROCESS_LOCK_IS_GLOBAL
197 printf(" -D APR_PROCESS_LOCK_IS_GLOBAL\n");
200 #ifdef SINGLE_LISTEN_UNSERIALIZED_ACCEPT
201 printf(" -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT\n");
204 #if APR_HAS_OTHER_CHILD
205 printf(" -D APR_HAS_OTHER_CHILD\n");
208 #ifdef AP_HAVE_RELIABLE_PIPED_LOGS
209 printf(" -D AP_HAVE_RELIABLE_PIPED_LOGS\n");
213 printf(" -D BUFFERED_LOGS\n");
215 printf(" -D PIPE_BUF=%ld\n",(long)PIPE_BUF);
219 printf(" -D DYNAMIC_MODULE_LIMIT=%ld\n",(long)DYNAMIC_MODULE_LIMIT);
221 #if APR_CHARSET_EBCDIC
222 printf(" -D APR_CHARSET_EBCDIC\n");
225 #ifdef NEED_HASHBANG_EMUL
226 printf(" -D NEED_HASHBANG_EMUL\n");
229 /* This list displays the compiled in default paths: */
231 printf(" -D HTTPD_ROOT=\"" HTTPD_ROOT "\"\n");
235 printf(" -D SUEXEC_BIN=\"" SUEXEC_BIN "\"\n");
238 #ifdef DEFAULT_PIDLOG
239 printf(" -D DEFAULT_PIDLOG=\"" DEFAULT_PIDLOG "\"\n");
242 #ifdef DEFAULT_SCOREBOARD
243 printf(" -D DEFAULT_SCOREBOARD=\"" DEFAULT_SCOREBOARD "\"\n");
246 #ifdef DEFAULT_ERRORLOG
247 printf(" -D DEFAULT_ERRORLOG=\"" DEFAULT_ERRORLOG "\"\n");
250 #ifdef AP_TYPES_CONFIG_FILE
251 printf(" -D AP_TYPES_CONFIG_FILE=\"" AP_TYPES_CONFIG_FILE "\"\n");
254 #ifdef SERVER_CONFIG_FILE
255 printf(" -D SERVER_CONFIG_FILE=\"" SERVER_CONFIG_FILE "\"\n");
259 #define TASK_SWITCH_SLEEP 10000
261 static void destroy_and_exit_process(process_rec *process,
262 int process_exit_value)
265 * Sleep for TASK_SWITCH_SLEEP micro seconds to cause a task switch on
266 * OS layer and thus give possibly started piped loggers a chance to
267 * process their input. Otherwise it is possible that they get killed
268 * by us before they can do so. In this case maybe valueable log messages
271 apr_sleep(TASK_SWITCH_SLEEP);
272 apr_pool_destroy(process->pool); /* and destroy all descendent pools */
274 exit(process_exit_value);
277 #define OOM_MESSAGE "[crit] Memory allocation failed, " \
278 "aborting process." APR_EOL_STR
280 /* APR callback invoked if allocation fails. */
281 static int abort_on_oom(int retcode)
283 write(STDERR_FILENO, OOM_MESSAGE, strlen(OOM_MESSAGE));
285 return retcode; /* unreachable, hopefully. */
288 static process_rec *init_process(int *argc, const char * const * *argv)
290 process_rec *process;
293 const char *failed = "apr_app_initialize()";
295 stat = apr_app_initialize(argc, argv, NULL);
296 if (stat == APR_SUCCESS) {
297 failed = "apr_pool_create()";
298 stat = apr_pool_create(&cntx, NULL);
301 if (stat != APR_SUCCESS) {
302 /* For all intents and purposes, this is impossibly unlikely,
303 * but APR doesn't exist yet, we can't use it for reporting
304 * these earliest two failures;
306 * XXX: Note the apr_ctime() and apr_time_now() calls. These
307 * work, today, against an uninitialized APR, but in the future
308 * (if they relied on global pools or mutexes, for example) then
309 * the datestamp logic will need to be replaced.
311 char ctimebuff[APR_CTIME_LEN];
312 apr_ctime(ctimebuff, apr_time_now());
313 fprintf(stderr, "[%s] [crit] (%d) %s: %s failed "
314 "to initial context, exiting\n",
315 ctimebuff, stat, (*argv)[0], failed);
320 apr_pool_abort_set(abort_on_oom, cntx);
321 apr_pool_tag(cntx, "process");
322 ap_open_stderr_log(cntx);
324 /* Now we have initialized apr and our logger, no more
325 * exceptional error reporting required for the lifetime
326 * of this server process.
329 process = apr_palloc(cntx, sizeof(process_rec));
330 process->pool = cntx;
332 apr_pool_create(&process->pconf, process->pool);
333 apr_pool_tag(process->pconf, "pconf");
334 process->argc = *argc;
335 process->argv = *argv;
336 process->short_name = apr_filepath_name_get((*argv)[0]);
340 static void usage(process_rec *process)
342 const char *bin = process->argv[0];
343 int pad_len = strlen(bin);
345 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
346 "Usage: %s [-D name] [-d directory] [-f file]", bin);
348 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
349 " %*s [-C \"directive\"] [-c \"directive\"]", pad_len, " ");
352 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
353 " %*s [-w] [-k start|restart|stop|shutdown] [-n service_name]",
355 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
356 " %*s [-k install|config|uninstall] [-n service_name]",
359 /* XXX not all MPMs support signalling the server in general or graceful-stop
362 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
363 " %*s [-k start|restart|graceful|graceful-stop|stop]",
366 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
367 " %*s [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]",
369 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
372 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
373 " -D name : define a name for use in "
374 "<IfDefine name> directives");
375 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
376 " -d directory : specify an alternate initial "
378 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
379 " -f file : specify an alternate ServerConfigFile");
380 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
381 " -C \"directive\" : process directive before reading "
383 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
384 " -c \"directive\" : process directive after reading "
388 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
389 " -n name : set screen name");
392 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
393 " -n name : set service name and use its "
394 "ServerConfigFile and ServerRoot");
395 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
396 " -k start : tell Apache to start");
397 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
398 " -k restart : tell running Apache to do a graceful "
400 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
401 " -k stop|shutdown : tell running Apache to shutdown");
402 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
403 " -k install : install an Apache service");
404 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
405 " -k config : change startup Options of an Apache "
407 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
408 " -k uninstall : uninstall an Apache service");
409 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
410 " -w : hold open the console window on error");
413 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
414 " -e level : show startup errors of level "
416 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
417 " -E file : log startup errors to file");
418 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
419 " -v : show version number");
420 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
421 " -V : show compile settings");
422 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
423 " -h : list available command line options "
425 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
426 " -l : list compiled in modules");
427 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
428 " -L : list available configuration "
430 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
431 " -t -D DUMP_VHOSTS : show parsed settings (currently only "
433 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
434 " -S : a synonym for -t -D DUMP_VHOSTS");
435 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
436 " -t -D DUMP_MODULES : show all loaded modules ");
437 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
438 " -M : a synonym for -t -D DUMP_MODULES");
439 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
440 " -t : run syntax check for config files");
441 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
442 " -T : start without DocumentRoot(s) check");
443 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
444 " -X : debug mode (only one worker, do not detach)");
446 destroy_and_exit_process(process, 1);
449 int main(int argc, const char * const argv[])
452 int configtestonly = 0, showcompile = 0;
453 const char *confname = SERVER_CONFIG_FILE;
454 const char *def_server_root = HTTPD_ROOT;
455 const char *temp_error_log = NULL;
457 process_rec *process;
459 apr_pool_t *plog; /* Pool of log streams, reset _after_ each read of conf */
460 apr_pool_t *ptemp; /* Pool for temporary config stuff, reset often */
461 apr_pool_t *pcommands; /* Pool for -D, -C and -c switches */
466 APR_OPTIONAL_FN_TYPE(ap_signal_server) *signal_server;
468 AP_MONCONTROL(0); /* turn off profiling of startup */
470 process = init_process(&argc, &argv);
471 ap_pglobal = process->pool;
472 pconf = process->pconf;
473 ap_server_argv0 = process->short_name;
475 /* Set up the OOM callback in the global pool, so all pools should
476 * by default inherit it. */
477 apr_pool_abort_set(abort_on_oom, apr_pool_parent_get(process->pool));
479 #if APR_CHARSET_EBCDIC
480 if (ap_init_ebcdic(ap_pglobal) != APR_SUCCESS) {
481 destroy_and_exit_process(process, 1);
485 apr_pool_create(&pcommands, ap_pglobal);
486 apr_pool_tag(pcommands, "pcommands");
487 ap_server_pre_read_config = apr_array_make(pcommands, 1, sizeof(char *));
488 ap_server_post_read_config = apr_array_make(pcommands, 1, sizeof(char *));
489 ap_server_config_defines = apr_array_make(pcommands, 1, sizeof(char *));
491 error = ap_setup_prelinked_modules(process);
493 ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_EMERG, 0, NULL, "%s: %s",
494 ap_server_argv0, error);
495 destroy_and_exit_process(process, 1);
498 ap_run_rewrite_args(process);
500 /* Maintain AP_SERVER_BASEARGS list in http_main.h to allow the MPM
501 * to safely pass on our args from its rewrite_args() handler.
503 apr_getopt_init(&opt, pcommands, process->argc, process->argv);
505 while ((rv = apr_getopt(opt, AP_SERVER_BASEARGS, &c, &opt_arg))
511 new = (char **)apr_array_push(ap_server_post_read_config);
512 *new = apr_pstrdup(pcommands, opt_arg);
516 new = (char **)apr_array_push(ap_server_pre_read_config);
517 *new = apr_pstrdup(pcommands, opt_arg);
521 def_server_root = opt_arg;
525 new = (char **)apr_array_push(ap_server_config_defines);
526 *new = apr_pstrdup(pcommands, opt_arg);
527 /* Setting -D DUMP_VHOSTS is equivalent to setting -S */
528 if (strcmp(opt_arg, "DUMP_VHOSTS") == 0)
530 /* Setting -D DUMP_MODULES is equivalent to setting -M */
531 if (strcmp(opt_arg, "DUMP_MODULES") == 0)
536 if (ap_parse_log_level(opt_arg, &ap_default_loglevel) != NULL)
541 temp_error_log = apr_pstrdup(process->pool, opt_arg);
545 new = (char **)apr_array_push(ap_server_config_defines);
554 printf("Server version: %s\n", ap_get_server_description());
555 printf("Server built: %s\n", ap_get_server_built());
556 destroy_and_exit_process(process, 0);
559 if (strcmp(ap_show_mpm(), "")) { /* MPM built-in? */
560 show_compile_settings();
561 destroy_and_exit_process(process, 0);
570 destroy_and_exit_process(process, 0);
573 ap_show_directives();
574 destroy_and_exit_process(process, 0);
581 ap_document_root_check = 0;
586 new = (char **)apr_array_push(ap_server_config_defines);
587 *new = "DUMP_VHOSTS";
592 new = (char **)apr_array_push(ap_server_config_defines);
593 *new = "DUMP_MODULES";
602 /* bad cmdline option? then we die */
603 if (rv != APR_EOF || opt->ind < opt->argc) {
607 apr_pool_create(&plog, ap_pglobal);
608 apr_pool_tag(plog, "plog");
609 apr_pool_create(&ptemp, pconf);
610 apr_pool_tag(ptemp, "ptemp");
612 /* Note that we preflight the config file once
613 * before reading it _again_ in the main loop.
614 * This allows things, log files configuration
615 * for example, to settle down.
618 ap_server_root = def_server_root;
619 if (temp_error_log) {
620 ap_replace_stderr_log(process->pool, temp_error_log);
622 ap_server_conf = ap_read_config(process, ptemp, confname, &ap_conftree);
623 if (!ap_server_conf) {
624 destroy_and_exit_process(process, 1);
628 if (ap_run_pre_config(pconf, plog, ptemp) != OK) {
629 ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0,
630 NULL, "Pre-configuration failed");
631 destroy_and_exit_process(process, 1);
634 rv = ap_process_config_tree(ap_server_conf, ap_conftree,
635 process->pconf, ptemp);
637 ap_fixup_virtual_hosts(pconf, ap_server_conf);
638 ap_fini_vhost_config(pconf, ap_server_conf);
640 if (ap_run_check_config(pconf, plog, ptemp, ap_server_conf) != OK) {
641 ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0,
642 NULL, "Configuration check failed");
643 destroy_and_exit_process(process, 1);
646 if (configtestonly) {
647 ap_run_test_config(pconf, ap_server_conf);
648 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Syntax OK");
649 destroy_and_exit_process(process, 0);
651 else if (showcompile) { /* deferred due to dynamically loaded MPM */
652 show_compile_settings();
653 destroy_and_exit_process(process, 0);
657 signal_server = APR_RETRIEVE_OPTIONAL_FN(ap_signal_server);
661 if (signal_server(&exit_status, pconf) != 0) {
662 destroy_and_exit_process(process, exit_status);
666 /* If our config failed, deal with that here. */
668 destroy_and_exit_process(process, 1);
671 apr_pool_clear(plog);
673 if ( ap_run_open_logs(pconf, plog, ptemp, ap_server_conf) != OK) {
674 ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR,
675 0, NULL, "Unable to open logs");
676 destroy_and_exit_process(process, 1);
679 if ( ap_run_post_config(pconf, plog, ptemp, ap_server_conf) != OK) {
680 ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0,
681 NULL, "Configuration Failed");
682 destroy_and_exit_process(process, 1);
685 apr_pool_destroy(ptemp);
688 apr_hook_deregister_all();
689 apr_pool_clear(pconf);
690 ap_clear_auth_internal();
692 /* glibc has __res_init that is #defined to res_init */
693 #if HAVE_RES_INIT || HAVE___RES_INIT
695 * resolv.conf may have changed, so this will read/reread it.
697 if (res_init() == -1) {
698 ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
699 "Resolver initialization failed.");
703 for (mod = ap_prelinked_modules; *mod != NULL; mod++) {
704 ap_register_hooks(*mod, pconf);
707 /* This is a hack until we finish the code so that it only reads
708 * the config file once and just operates on the tree already in
712 apr_pool_create(&ptemp, pconf);
713 apr_pool_tag(ptemp, "ptemp");
714 ap_server_root = def_server_root;
715 ap_server_conf = ap_read_config(process, ptemp, confname, &ap_conftree);
716 if (!ap_server_conf) {
717 destroy_and_exit_process(process, 1);
721 if (ap_run_pre_config(pconf, plog, ptemp) != OK) {
722 ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR,
723 0, NULL, "Pre-configuration failed");
724 destroy_and_exit_process(process, 1);
727 if (ap_process_config_tree(ap_server_conf, ap_conftree, process->pconf,
729 destroy_and_exit_process(process, 1);
731 ap_fixup_virtual_hosts(pconf, ap_server_conf);
732 ap_fini_vhost_config(pconf, ap_server_conf);
734 if (ap_run_check_config(pconf, plog, ptemp, ap_server_conf) != OK) {
735 ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0,
736 NULL, "Configuration check failed");
737 destroy_and_exit_process(process, 1);
740 apr_pool_clear(plog);
741 if (ap_run_open_logs(pconf, plog, ptemp, ap_server_conf) != OK) {
742 ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR,
743 0, NULL, "Unable to open logs");
744 destroy_and_exit_process(process, 1);
747 if (ap_run_post_config(pconf, plog, ptemp, ap_server_conf) != OK) {
748 ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR,
749 0, NULL, "Configuration Failed");
750 destroy_and_exit_process(process, 1);
753 apr_pool_destroy(ptemp);
754 apr_pool_lock(pconf, 1);
756 ap_run_optional_fn_retrieve();
758 if (ap_run_mpm(pconf, plog, ap_server_conf) != OK)
761 apr_pool_lock(pconf, 0);
764 apr_pool_lock(pconf, 0);
765 destroy_and_exit_process(process, 0);
767 return 0; /* Termination 'ok' */
770 #ifdef AP_USING_AUTOCONF
771 /* This ugly little hack pulls any function referenced in exports.c into
772 * the web server. exports.c is generated during the build, and it
773 * has all of the APR functions specified by the apr/apr.exports and
774 * apr-util/aprutil.exports files.
776 const void *ap_suck_in_APR(void);
777 const void *ap_suck_in_APR(void)
779 extern const void *ap_ugly_hack;