ap_config.h revision e3fa50db72fc32912af7ad832397d52499d24400
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd/* ====================================================================
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * The Apache Software License, Version 1.1
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * Copyright (c) 2000 The Apache Software Foundation. All rights
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * reserved.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * Redistribution and use in source and binary forms, with or without
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * modification, are permitted provided that the following conditions
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * are met:
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * 1. Redistributions of source code must retain the above copyright
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * notice, this list of conditions and the following disclaimer.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * 2. Redistributions in binary form must reproduce the above copyright
27e52281f1522522b170cafc76b08b58aa70ccaand * notice, this list of conditions and the following disclaimer in
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * the documentation and/or other materials provided with the
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * distribution.
4b5981e276e93df97c34e4da05ca5cf8bbd937dand * 3. The end-user documentation included with the redistribution,
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * if any, must include the following acknowledgment:
9472e4d3c410be3b3f1addbf3b1db1769f64e765nd * "This product includes software developed by the
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * Apache Software Foundation (http://www.apache.org/)."
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * Alternately, this acknowledgment may appear in the software itself,
1c8f2418892d98febb00a06b9a4f45f8bcfd80a3nd * if and wherever such third-party acknowledgments normally appear.
fac8c35bfb158112226ab43ddf84d59daca5dc30nd * 4. The names "Apache" and "Apache Software Foundation" must
fac8c35bfb158112226ab43ddf84d59daca5dc30nd * not be used to endorse or promote products derived from this
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * software without prior written permission. For written
9bcfc3697a91b5215893a7d0206865b13fc72148nd * permission, please contact apache@apache.org.
9bcfc3697a91b5215893a7d0206865b13fc72148nd * 5. Products derived from this software may not be called "Apache",
9bcfc3697a91b5215893a7d0206865b13fc72148nd * nor may "Apache" appear in their name, without prior written
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * permission of the Apache Software Foundation.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * SUCH DAMAGE.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * ====================================================================
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * This software consists of voluntary contributions made by many
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * individuals on behalf of the Apache Software Foundation. For more
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * information on the Apache Software Foundation, please see
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * AP_DECLARE_EXPORT is defined when building the Apache Core dynamic
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * library, so that all public symbols are exported.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * AP_DECLARE_STATIC is defined when including Apache's Core headers,
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * to provide static linkage when the dynamic library may be unavailable.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * AP_DECLARE_STATIC and AP_DECLARE_EXPORT are left undefined when
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * including Apache's Core headers, to import and link the symbols from the
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * dynamic Apache Core library and assure appropriate indirection and calling
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * conventions at compile time.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd#if !defined(WIN32)
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * Apache Core dso functions are declared with AP_DECLARE(), so they may
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * use the most appropriate calling convention. Hook functions and other
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * Core functions with variable arguments must use AP_DECLARE_NONSTD().
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * @deffunc AP_DECLARE(rettype) ap_func(args);
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * Apache Core dso variable argument and hook functions are declared with
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * AP_DECLARE(), as they must use the C language calling convention.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * @deffunc AP_DECLARE_NONSTD(rettype) ap_func(args [...]);
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * Apache Core dso variables are declared with AP_MODULE_DECLARE_DATA.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * This assures the appropriate indirection is invoked at compile time.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * @deffunc AP_DECLARE_DATA type apr_variable;
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * @tip extern AP_DECLARE_DATA type apr_variable; syntax is required for
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * declarations within headers to properly import the variable.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd#define AP_DECLARE(type) __declspec(dllexport) type __stdcall
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd#define AP_DECLARE_NONSTD(type) __declspec(dllexport) type
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd#define AP_DECLARE(type) __declspec(dllimport) type __stdcall
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd#define AP_DECLARE_NONSTD(type) __declspec(dllimport) type
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * Declare a dso module's exported module structure as AP_MODULE_DECLARE_DATA.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * Unless AP_MODULE_DECLARE_STATIC is defined at compile time, symbols
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * declared with AP_MODULE_DECLARE_DATA are always exported.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * @deffunc module AP_MODULE_DECLARE_DATA mod_tag
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * AP_MODULE_DECLARE_EXPORT is a no-op. Unless contradicted by the
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * AP_MODULE_DECLARE_STATIC compile-time symbol, it is assumed and defined.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * The old SHARED_MODULE compile-time symbol is now the default behavior,
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * so it is no longer referenced anywhere with Apache 2.0.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd/* XXX: Must go away, perhaps into compat, maybe not even there.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * Implement an Apache core hook that has no return code, and therefore
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * runs all of the registered functions
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * @param name The name of the hook
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * @param args_decl The declaration of the arguments for the hook
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * @param args_used The names for the arguments for the hook
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * @deffunc void AP_IMPLEMENT_HOOK_VOID(name, args_decl, args_use)
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * @tip If IMPLEMENTing a hook that is not linked into the Apache core,
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * (e.g. within a dso) see AP_IMPLEMENT_EXTERNAL_HOOK_HOOK_VOID.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndAP_IMPLEMENT_EXTERNAL_HOOK_VOID(AP,name,args_decl,args_use)
9472e4d3c410be3b3f1addbf3b1db1769f64e765nd * Implement an Apache core hook that runs until one of the functions
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * returns something other than OK or DECLINE
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * @param name The name of the hook
1c8f2418892d98febb00a06b9a4f45f8bcfd80a3nd * @param args_decl The declaration of the arguments for the hook
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * @param args_used The names for the arguments for the hook
fac8c35bfb158112226ab43ddf84d59daca5dc30nd * @deffunc int AP_IMPLEMENT_HOOK_RUN_ALL(name, args_decl, args_use)
fac8c35bfb158112226ab43ddf84d59daca5dc30nd * @tip If IMPLEMENTing a hook that is not linked into the Apache core,
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * (e.g. within a dso) see AP_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd#define AP_IMPLEMENT_HOOK_RUN_ALL(ret,name,args_decl,args_use,ok,decline) \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndAP_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL(AP,ret,name,args_decl,args_use,ok,decline)
#ifdef WIN32
#include "os.h"
#include "ap_config_auto.h"
#include "ap_config_path.h"
#include "os.h"
#include "apr.h"
#ifdef STDC_HEADERS
#include <stdlib.h>
#include <string.h>
#ifdef SIGWAIT_TAKES_ONE_ARG
#define NO_LINGCLOSE
#ifdef SCO5
#define SecureWare
#if APR_HAS_MMAP
#define AP_USE_FILE_BASED_SCOREBOARD
#define AP_USE_MEM_BASED_SCOREBOARD
#if (APR_HAS_OTHER_CHILD)
#define APACHE_XLATE