ap_config.h revision 1d1d0a8384626213f99cf5b7e12aad81145c96b6
08cb74ca432a8c24e39f17dedce527e6a47b8001jerenkrantz/* Licensed to the Apache Software Foundation (ASF) under one or more
08cb74ca432a8c24e39f17dedce527e6a47b8001jerenkrantz * contributor license agreements. See the NOTICE file distributed with
f062ed7bd262a37a909dd77ce5fc23b446818823fielding * this work for additional information regarding copyright ownership.
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * The ASF licenses this file to You under the Apache License, Version 2.0
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * (the "License"); you may not use this file except in compliance with
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * the License. You may obtain a copy of the License at
2d2eda71267231c2526be701fe655db125852c1ffielding *
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * http://www.apache.org/licenses/LICENSE-2.0
2d2eda71267231c2526be701fe655db125852c1ffielding *
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * Unless required by applicable law or agreed to in writing, software
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * distributed under the License is distributed on an "AS IS" BASIS,
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * See the License for the specific language governing permissions and
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * limitations under the License.
2d2eda71267231c2526be701fe655db125852c1ffielding */
2d2eda71267231c2526be701fe655db125852c1ffielding
2d2eda71267231c2526be701fe655db125852c1ffielding/**
2d2eda71267231c2526be701fe655db125852c1ffielding * @file ap_config.h
2d2eda71267231c2526be701fe655db125852c1ffielding * @brief Symbol export macros and hook functions
759f4a24d09e28c4eaca9f97311b497fc15cb5c7ben */
0432a26b69eedfb9ca5f34fba590236378a24851ben
0432a26b69eedfb9ca5f34fba590236378a24851ben#ifndef AP_CONFIG_H
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_CONFIG_H
2d2eda71267231c2526be701fe655db125852c1ffielding
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb#include "apr.h"
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb#include "apr_hooks.h"
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb#include "apr_optional_hooks.h"
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb
2d2eda71267231c2526be701fe655db125852c1ffielding/* Although this file doesn't declare any hooks, declare the hook group here */
30c289e6bc6d28d210b21edd800ab2cfc78a8381wrowe/**
cccd31fa4a72fe23cc3249c06db181b274a55a69gstein * @defgroup hooks Apache Hooks
cccd31fa4a72fe23cc3249c06db181b274a55a69gstein * @ingroup APACHE_CORE
cd39d2139743ca0ef899953c6496dcf99e9c791atrawick */
cccd31fa4a72fe23cc3249c06db181b274a55a69gstein
b627048681b27fe30f979ba471b523be3a6a22adrbb#ifdef DOXYGEN
cccd31fa4a72fe23cc3249c06db181b274a55a69gstein/* define these just so doxygen documents them */
cccd31fa4a72fe23cc3249c06db181b274a55a69gstein
44c46ef733836b32585d135d2d90856e7cfd9929rbb/**
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * AP_DECLARE_STATIC is defined when including Apache's Core headers,
e6cc28a5eb3371ba0c38e941855e71ff0054f50erbb * to provide static linkage when the dynamic library may be unavailable.
d9039a9aaeaa1359c1147af66c09aeac56ae3ee0pquerna *
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * @see AP_DECLARE_EXPORT
9cfc48b742c224c1fbc2c26a4119a3266192c7d2wrowe *
9cfc48b742c224c1fbc2c26a4119a3266192c7d2wrowe * AP_DECLARE_STATIC and AP_DECLARE_EXPORT are left undefined when
ef5650b61a8e35f3cc93ec07e73efc17ea329894jorton * including Apache's Core headers, to import and link the symbols from the
7c7372abe2484e7fcf81937b93496d1246e5b816gstein * dynamic Apache Core library and assure appropriate indirection and calling
7c7372abe2484e7fcf81937b93496d1246e5b816gstein * conventions at compile time.
7c7372abe2484e7fcf81937b93496d1246e5b816gstein */
7c7372abe2484e7fcf81937b93496d1246e5b816gstein# define AP_DECLARE_STATIC
7c7372abe2484e7fcf81937b93496d1246e5b816gstein/**
7c7372abe2484e7fcf81937b93496d1246e5b816gstein * AP_DECLARE_EXPORT is defined when building the Apache Core dynamic
7c7372abe2484e7fcf81937b93496d1246e5b816gstein * library, so that all public symbols are exported.
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb *
2d2eda71267231c2526be701fe655db125852c1ffielding * @see AP_DECLARE_STATIC
2d2eda71267231c2526be701fe655db125852c1ffielding */
2d2eda71267231c2526be701fe655db125852c1ffielding# define AP_DECLARE_EXPORT
2d2eda71267231c2526be701fe655db125852c1ffielding
2d2eda71267231c2526be701fe655db125852c1ffielding#endif /* def DOXYGEN */
2d2eda71267231c2526be701fe655db125852c1ffielding
2d2eda71267231c2526be701fe655db125852c1ffielding#if !defined(WIN32)
2d2eda71267231c2526be701fe655db125852c1ffielding/**
2d2eda71267231c2526be701fe655db125852c1ffielding * Apache Core dso functions are declared with AP_DECLARE(), so they may
2d2eda71267231c2526be701fe655db125852c1ffielding * use the most appropriate calling convention. Hook functions and other
2d2eda71267231c2526be701fe655db125852c1ffielding * Core functions with variable arguments must use AP_DECLARE_NONSTD().
2d2eda71267231c2526be701fe655db125852c1ffielding * @code
2d2eda71267231c2526be701fe655db125852c1ffielding * AP_DECLARE(rettype) ap_func(args)
2e123e8beedc9f921448c113e2d6823a92fd5261fielding * @endcode
2e123e8beedc9f921448c113e2d6823a92fd5261fielding */
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_DECLARE(type) type
dd5cbadf2df719db2f3c769d03ec847da25854e6bnicholes
dd5cbadf2df719db2f3c769d03ec847da25854e6bnicholes/**
dd5cbadf2df719db2f3c769d03ec847da25854e6bnicholes * Apache Core dso variable argument and hook functions are declared with
2d2eda71267231c2526be701fe655db125852c1ffielding * AP_DECLARE_NONSTD(), as they must use the C language calling convention.
2d2eda71267231c2526be701fe655db125852c1ffielding * @see AP_DECLARE
2d2eda71267231c2526be701fe655db125852c1ffielding * @code
2d2eda71267231c2526be701fe655db125852c1ffielding * AP_DECLARE_NONSTD(rettype) ap_func(args [...])
2d2eda71267231c2526be701fe655db125852c1ffielding * @endcode
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb */
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb#define AP_DECLARE_NONSTD(type) type
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb/**
72a4ef8eac1adef882246c5bfb9b8bbd82d613c4coar * Apache Core dso variables are declared with AP_MODULE_DECLARE_DATA.
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * This assures the appropriate indirection is invoked at compile time.
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb *
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * @note AP_DECLARE_DATA extern type apr_variable; syntax is required for
2d2eda71267231c2526be701fe655db125852c1ffielding * declarations within headers to properly import the variable.
2d2eda71267231c2526be701fe655db125852c1ffielding * @code
2d2eda71267231c2526be701fe655db125852c1ffielding * AP_DECLARE_DATA type apr_variable
2d2eda71267231c2526be701fe655db125852c1ffielding * @endcode
2d2eda71267231c2526be701fe655db125852c1ffielding */
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_DECLARE_DATA
2d2eda71267231c2526be701fe655db125852c1ffielding
2d2eda71267231c2526be701fe655db125852c1ffielding#elif defined(AP_DECLARE_STATIC)
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_DECLARE(type) type __stdcall
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_DECLARE_NONSTD(type) type
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_DECLARE_DATA
2d2eda71267231c2526be701fe655db125852c1ffielding#elif defined(AP_DECLARE_EXPORT)
57edbe3cb9356a0b599c7b07f3aae0e721ee57e2coar#define AP_DECLARE(type) __declspec(dllexport) type __stdcall
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_DECLARE_NONSTD(type) __declspec(dllexport) type
a77c6787a1ea7dd88cb6cf8e4ad968b235af2a20jorton#define AP_DECLARE_DATA __declspec(dllexport)
2d2eda71267231c2526be701fe655db125852c1ffielding#else
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_DECLARE(type) __declspec(dllimport) type __stdcall
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_DECLARE_NONSTD(type) __declspec(dllimport) type
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_DECLARE_DATA __declspec(dllimport)
2d2eda71267231c2526be701fe655db125852c1ffielding#endif
2d2eda71267231c2526be701fe655db125852c1ffielding
2d2eda71267231c2526be701fe655db125852c1ffielding#if !defined(WIN32) || defined(AP_MODULE_DECLARE_STATIC)
2d2eda71267231c2526be701fe655db125852c1ffielding/**
2d2eda71267231c2526be701fe655db125852c1ffielding * Declare a dso module's exported module structure as AP_MODULE_DECLARE_DATA.
2d2eda71267231c2526be701fe655db125852c1ffielding *
2d2eda71267231c2526be701fe655db125852c1ffielding * Unless AP_MODULE_DECLARE_STATIC is defined at compile time, symbols
2d2eda71267231c2526be701fe655db125852c1ffielding * declared with AP_MODULE_DECLARE_DATA are always exported.
2d2eda71267231c2526be701fe655db125852c1ffielding * @code
2d2eda71267231c2526be701fe655db125852c1ffielding * module AP_MODULE_DECLARE_DATA mod_tag
2d2eda71267231c2526be701fe655db125852c1ffielding * @endcode
2d2eda71267231c2526be701fe655db125852c1ffielding */
2d2eda71267231c2526be701fe655db125852c1ffielding#if defined(WIN32)
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_MODULE_DECLARE(type) type __stdcall
2d2eda71267231c2526be701fe655db125852c1ffielding#else
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_MODULE_DECLARE(type) type
2d2eda71267231c2526be701fe655db125852c1ffielding#endif
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_MODULE_DECLARE_NONSTD(type) type
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_MODULE_DECLARE_DATA
2d2eda71267231c2526be701fe655db125852c1ffielding#else
2d2eda71267231c2526be701fe655db125852c1ffielding/**
2d2eda71267231c2526be701fe655db125852c1ffielding * AP_MODULE_DECLARE_EXPORT is a no-op. Unless contradicted by the
2d2eda71267231c2526be701fe655db125852c1ffielding * AP_MODULE_DECLARE_STATIC compile-time symbol, it is assumed and defined.
2d2eda71267231c2526be701fe655db125852c1ffielding *
2d2eda71267231c2526be701fe655db125852c1ffielding * The old SHARED_MODULE compile-time symbol is now the default behavior,
2d2eda71267231c2526be701fe655db125852c1ffielding * so it is no longer referenced anywhere with Apache 2.0.
2d2eda71267231c2526be701fe655db125852c1ffielding */
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_MODULE_DECLARE_EXPORT
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_MODULE_DECLARE(type) __declspec(dllexport) type __stdcall
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_MODULE_DECLARE_NONSTD(type) __declspec(dllexport) type
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_MODULE_DECLARE_DATA __declspec(dllexport)
2d2eda71267231c2526be701fe655db125852c1ffielding#endif
dbbf1b4183ae16353011a5269b37899f02b97d81gregames
2d2eda71267231c2526be701fe655db125852c1ffielding/**
2d2eda71267231c2526be701fe655db125852c1ffielding * Declare a hook function
2d2eda71267231c2526be701fe655db125852c1ffielding * @param ret The return type of the hook
2d2eda71267231c2526be701fe655db125852c1ffielding * @param name The hook's name (as a literal)
e44e11f9fece12c783f18d033923bfc0d6b4289aake * @param args The arguments the hook function takes, in brackets.
2d2eda71267231c2526be701fe655db125852c1ffielding */
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_DECLARE_HOOK(ret,name,args) \
2d2eda71267231c2526be701fe655db125852c1ffielding APR_DECLARE_EXTERNAL_HOOK(ap,AP,ret,name,args)
2d2eda71267231c2526be701fe655db125852c1ffielding
e44e11f9fece12c783f18d033923bfc0d6b4289aake/** @internal */
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_IMPLEMENT_HOOK_BASE(name) \
2d2eda71267231c2526be701fe655db125852c1ffielding APR_IMPLEMENT_EXTERNAL_HOOK_BASE(ap,AP,name)
2d2eda71267231c2526be701fe655db125852c1ffielding
2d2eda71267231c2526be701fe655db125852c1ffielding/**
2d2eda71267231c2526be701fe655db125852c1ffielding * Implement an Apache core hook that has no return code, and
2d2eda71267231c2526be701fe655db125852c1ffielding * therefore runs all of the registered functions. The implementation
2d2eda71267231c2526be701fe655db125852c1ffielding * is called ap_run_<i>name</i>.
2d2eda71267231c2526be701fe655db125852c1ffielding *
2d2eda71267231c2526be701fe655db125852c1ffielding * @param name The name of the hook
2d2eda71267231c2526be701fe655db125852c1ffielding * @param args_decl The declaration of the arguments for the hook, for example
2d2eda71267231c2526be701fe655db125852c1ffielding * "(int x,void *y)"
2d2eda71267231c2526be701fe655db125852c1ffielding * @param args_use The arguments for the hook as used in a call, for example
2d2eda71267231c2526be701fe655db125852c1ffielding * "(x,y)"
2d2eda71267231c2526be701fe655db125852c1ffielding * @note If IMPLEMENTing a hook that is not linked into the Apache core,
2d2eda71267231c2526be701fe655db125852c1ffielding * (e.g. within a dso) see APR_IMPLEMENT_EXTERNAL_HOOK_VOID.
2d2eda71267231c2526be701fe655db125852c1ffielding */
2d2eda71267231c2526be701fe655db125852c1ffielding#define AP_IMPLEMENT_HOOK_VOID(name,args_decl,args_use) \
2d2eda71267231c2526be701fe655db125852c1ffielding APR_IMPLEMENT_EXTERNAL_HOOK_VOID(ap,AP,name,args_decl,args_use)
2d2eda71267231c2526be701fe655db125852c1ffielding
2d2eda71267231c2526be701fe655db125852c1ffielding/**
2d2eda71267231c2526be701fe655db125852c1ffielding * Implement an Apache core hook that runs until one of the functions
2d2eda71267231c2526be701fe655db125852c1ffielding * returns something other than ok or decline. That return value is
2d2eda71267231c2526be701fe655db125852c1ffielding * then returned from the hook runner. If the hooks run to completion,
2d2eda71267231c2526be701fe655db125852c1ffielding * then ok is returned. Note that if no hook runs it would probably be
2d2eda71267231c2526be701fe655db125852c1ffielding * more correct to return decline, but this currently does not do
2d2eda71267231c2526be701fe655db125852c1ffielding * so. The implementation is called ap_run_<i>name</i>.
2d2eda71267231c2526be701fe655db125852c1ffielding *
2d2eda71267231c2526be701fe655db125852c1ffielding * @param ret The return type of the hook (and the hook runner)
2d2eda71267231c2526be701fe655db125852c1ffielding * @param name The name of the hook
2d2eda71267231c2526be701fe655db125852c1ffielding * @param args_decl The declaration of the arguments for the hook, for example
2d2eda71267231c2526be701fe655db125852c1ffielding * "(int x,void *y)"
2d2eda71267231c2526be701fe655db125852c1ffielding * @param args_use The arguments for the hook as used in a call, for example
2d2eda71267231c2526be701fe655db125852c1ffielding * "(x,y)"
2efb935ae8fe12d5192a3bf2c52c28461b6c68afdgaudet * @param ok The "ok" return value
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh * @param decline The "decline" return value
2efb935ae8fe12d5192a3bf2c52c28461b6c68afdgaudet * @return ok, decline or an error.
2efb935ae8fe12d5192a3bf2c52c28461b6c68afdgaudet * @note If IMPLEMENTing a hook that is not linked into the Apache core,
2efb935ae8fe12d5192a3bf2c52c28461b6c68afdgaudet * (e.g. within a dso) see APR_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL.
2efb935ae8fe12d5192a3bf2c52c28461b6c68afdgaudet */
2efb935ae8fe12d5192a3bf2c52c28461b6c68afdgaudet#define AP_IMPLEMENT_HOOK_RUN_ALL(ret,name,args_decl,args_use,ok,decline) \
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb APR_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL(ap,AP,ret,name,args_decl, \
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb args_use,ok,decline)
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb/**
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * Implement a hook that runs until a function returns something other than
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * decline. If all functions return decline, the hook runner returns decline.
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * The implementation is called ap_run_<i>name</i>.
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb *
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh * @param ret The return type of the hook (and the hook runner)
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * @param name The name of the hook
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * @param args_decl The declaration of the arguments for the hook, for example
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * "(int x,void *y)"
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * @param args_use The arguments for the hook as used in a call, for example
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * "(x,y)"
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh * @param decline The "decline" return value
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh * @return decline or an error.
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh * @note If IMPLEMENTing a hook that is not linked into the Apache core
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh * (e.g. within a dso) see APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST.
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh */
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb#define AP_IMPLEMENT_HOOK_RUN_FIRST(ret,name,args_decl,args_use,decline) \
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(ap,AP,ret,name,args_decl, \
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb args_use,decline)
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh/* Note that the other optional hook implementations are straightforward but
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * have not yet been needed
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb */
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb/**
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * Implement an optional hook. This is exactly the same as a standard hook
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * implementation, except the hook is optional.
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * @see AP_IMPLEMENT_HOOK_RUN_ALL
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh */
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb#define AP_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ret,name,args_decl,args_use,ok, \
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb decline) \
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ap,AP,ret,name,args_decl, \
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb args_use,ok,decline)
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh/**
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * Hook an optional hook. Unlike static hooks, this uses a macro instead of a
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb * function.
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb */
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh#define AP_OPTIONAL_HOOK(name,fn,pre,succ,order) \
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb APR_OPTIONAL_HOOK(ap,name,fn,pre,succ,order)
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb#include "os.h"
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh#if (!defined(WIN32) && !defined(NETWARE)) || defined(__MINGW32__)
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb#include "ap_config_auto.h"
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb#include "ap_config_layout.h"
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb#endif
99d6d3207e24ba1f8eba77ef903948d738886cf5nd#if defined(NETWARE)
99d6d3207e24ba1f8eba77ef903948d738886cf5nd#define AP_NONBLOCK_WHEN_MULTI_LISTEN 1
99d6d3207e24ba1f8eba77ef903948d738886cf5nd#endif
99d6d3207e24ba1f8eba77ef903948d738886cf5nd
99d6d3207e24ba1f8eba77ef903948d738886cf5nd#if AP_ENABLE_DTRACE && HAVE_SYS_SDT_H
99d6d3207e24ba1f8eba77ef903948d738886cf5nd#include <sys/sdt.h>
99d6d3207e24ba1f8eba77ef903948d738886cf5nd#else
99d6d3207e24ba1f8eba77ef903948d738886cf5nd#undef _DTRACE_VERSION
99d6d3207e24ba1f8eba77ef903948d738886cf5nd#endif
99d6d3207e24ba1f8eba77ef903948d738886cf5nd
99d6d3207e24ba1f8eba77ef903948d738886cf5nd#ifdef _DTRACE_VERSION
99d6d3207e24ba1f8eba77ef903948d738886cf5nd#include "apache_probes.h"
99d6d3207e24ba1f8eba77ef903948d738886cf5nd#else
99d6d3207e24ba1f8eba77ef903948d738886cf5nd#include "apache_noprobes.h"
99d6d3207e24ba1f8eba77ef903948d738886cf5nd#endif
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh/* TODO - We need to put OS detection back to make all the following work */
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb#if defined(SUNOS4) || defined(IRIX) || defined(NEXT) || defined(AUX3) \
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh || defined (UW) || defined(LYNXOS) || defined(TPF)
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb/* These systems don't do well with any lingering close code; I don't know
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh * why -- manoj */
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb#define NO_LINGCLOSE
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb#endif
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb/* If APR has OTHER_CHILD logic, use reliable piped logs. */
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh#if APR_HAS_OTHER_CHILD
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb#define AP_HAVE_RELIABLE_PIPED_LOGS TRUE
3d0bdf16bc410722e6c42aa2ceb0677b0ae29b90ianh#endif
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb
759f4a24d09e28c4eaca9f97311b497fc15cb5c7ben/* Presume that the compiler supports C99-style designated
759f4a24d09e28c4eaca9f97311b497fc15cb5c7ben * initializers if using GCC (but not G++), or for any other compiler
759f4a24d09e28c4eaca9f97311b497fc15cb5c7ben * which claims C99 support. */
759f4a24d09e28c4eaca9f97311b497fc15cb5c7ben#if (defined(__GNUC__) && !defined(__cplusplus)) \
759f4a24d09e28c4eaca9f97311b497fc15cb5c7ben || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
759f4a24d09e28c4eaca9f97311b497fc15cb5c7ben#define AP_HAVE_DESIGNATED_INITIALIZER
b0f20a4a26bcfa85724b1c2e5ec6a077f12ef44crbb#endif
759f4a24d09e28c4eaca9f97311b497fc15cb5c7ben
759f4a24d09e28c4eaca9f97311b497fc15cb5c7ben#endif /* AP_CONFIG_H */
759f4a24d09e28c4eaca9f97311b497fc15cb5c7ben