ap_config.h revision c3200c488bb3f941a88d5bed94abef0f46946bd3
6aada32e978e09cc60d52cb05ae4cee91b676da1slive/* ====================================================================
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * The Apache Software License, Version 1.1
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd * Copyright (c) 2000 The Apache Software Foundation. All rights
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * reserved.
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding * Redistribution and use in source and binary forms, with or without
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding * modification, are permitted provided that the following conditions
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding * 1. Redistributions of source code must retain the above copyright
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding * notice, this list of conditions and the following disclaimer.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * 2. Redistributions in binary form must reproduce the above copyright
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * notice, this list of conditions and the following disclaimer in
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * the documentation and/or other materials provided with the
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * distribution.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * 3. The end-user documentation included with the redistribution,
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * if any, must include the following acknowledgment:
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * "This product includes software developed by the
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * Apache Software Foundation (http://www.apache.org/)."
7db9f691a00ead175b03335457ca296a33ddf31bnd * Alternately, this acknowledgment may appear in the software itself,
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * if and wherever such third-party acknowledgments normally appear.
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * 4. The names "Apache" and "Apache Software Foundation" must
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * not be used to endorse or promote products derived from this
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * software without prior written permission. For written
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * permission, please contact apache@apache.org.
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * 5. Products derived from this software may not be called "Apache",
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * nor may "Apache" appear in their name, without prior written
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * permission of the Apache Software Foundation.
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
080b1313a70a1fc4b16d013c157fe17cf946def1wrowe * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
dce4ff5d881d942f1ba7822d432eecd39f5166d2nd * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
dce4ff5d881d942f1ba7822d432eecd39f5166d2nd * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * SUCH DAMAGE.
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * ====================================================================
dce4ff5d881d942f1ba7822d432eecd39f5166d2nd * This software consists of voluntary contributions made by many
dce4ff5d881d942f1ba7822d432eecd39f5166d2nd * individuals on behalf of the Apache Software Foundation. For more
dce4ff5d881d942f1ba7822d432eecd39f5166d2nd * information on the Apache Software Foundation, please see
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * Portions of this software are based upon public domain software
2df40fa998d3364133c4dd29eb395f5ae70dfc1fslive * originally written at the National Center for Supercomputing Applications,
dce4ff5d881d942f1ba7822d432eecd39f5166d2nd * University of Illinois, Urbana-Champaign.
6aada32e978e09cc60d52cb05ae4cee91b676da1sliveextern "C" {
6aada32e978e09cc60d52cb05ae4cee91b676da1slive#include "ap_ac_config.h" /* If we're using autoconf, go to the new
dce4ff5d881d942f1ba7822d432eecd39f5166d2nd ap_config.h replacement */
6aada32e978e09cc60d52cb05ae4cee91b676da1slive#else /* HAVE_CONFIG_H */
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * ap_config.h: system-dependant #defines and includes...
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * See PORTING for a listing of what they mean
dce4ff5d881d942f1ba7822d432eecd39f5166d2nd * Support for platform dependent autogenerated defines
dce4ff5d881d942f1ba7822d432eecd39f5166d2nd/* not available under WIN32, so provide important entries manually */
dce4ff5d881d942f1ba7822d432eecd39f5166d2nd/* Have to include sys/stat.h before ../os/win32/os.h so we can override
6aada32e978e09cc60d52cb05ae4cee91b676da1slivestat() properly */
6aada32e978e09cc60d52cb05ae4cee91b676da1slive/* So that we can use inline on some critical functions, and use
dce4ff5d881d942f1ba7822d432eecd39f5166d2nd * GNUC attributes (such as to get -Wall warnings for printf-like
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * functions). Only do this in gcc 2.7 or later ... it may work
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * on earlier stuff, but why chance it.
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * We've since discovered that the gcc shipped with NeXT systems
dce4ff5d881d942f1ba7822d432eecd39f5166d2nd * as "cc" is completely broken. It claims to be __GNUC__ and so
ba9f66695f8cfc60182e7e28b16ef4e2c420234dniq * on, but it doesn't implement half of the things that __GNUC__
ba9f66695f8cfc60182e7e28b16ef4e2c420234dniq * means. In particular it's missing inline and the __attribute__
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * stuff. So we hack around it. PR#1613. -djg
6aada32e978e09cc60d52cb05ae4cee91b676da1slive#define ENUM_BITFIELD(e,n,w) signed int n : w
dce4ff5d881d942f1ba7822d432eecd39f5166d2nd#define ENUM_BITFIELD(e,n,w) e n : w
dce4ff5d881d942f1ba7822d432eecd39f5166d2nd#include "../os/win32/os.h"
2df40fa998d3364133c4dd29eb395f5ae70dfc1fslive#if !defined(QNX) && !defined(MPE) && !defined(WIN32) && !defined(TPF)
2df40fa998d3364133c4dd29eb395f5ae70dfc1fslive/* #include <sys/param.h> */
b4dc2db16858150c14fddf184ee1b06358a97f3brbowen/* Define one of these according to your system. */
2df40fa998d3364133c4dd29eb395f5ae70dfc1fslive#if defined(MINT)
2df40fa998d3364133c4dd29eb395f5ae70dfc1fslivetypedef int rlim_t;
dce4ff5d881d942f1ba7822d432eecd39f5166d2ndint initgroups (char *, int);
bd6b02eddff1618ac8ead9201d8782790f52aaa2rbowenextern void GETPRIVMODE();
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jimextern void GETUSERMODE();
7d94bab0593be2d11cb273082e5748d317998916rbowenextern char *inet_ntoa();
bd6b02eddff1618ac8ead9201d8782790f52aaa2rbowentypedef int rlim_t;
d532243d6b832de8d4e1e3164f477d45003967efcovener#if !defined(USE_SYSVSEM_SERIALIZED_ACCEPT) && \
6aada32e978e09cc60d52cb05ae4cee91b676da1slive/* IRIX has killpg, but it's only in _BSD_COMPAT, so don't use it in case
6aada32e978e09cc60d52cb05ae4cee91b676da1slive * there's some weird conflict with non-BSD signals */
6aada32e978e09cc60d52cb05ae4cee91b676da1slive#if !defined(USE_FLOCK_SERIALIZED_ACCEPT) && \
103f414dc9a63f76c48bc1d81162ea6f3c5ef495slivetypedef int rlim_t;
6aada32e978e09cc60d52cb05ae4cee91b676da1slive/* feeling brave? want to try using POSIX mutexes? */
6aada32e978e09cc60d52cb05ae4cee91b676da1slive/* #define HAVE_MMAP */
6aada32e978e09cc60d52cb05ae4cee91b676da1slive/* #define USE_MMAP_SCOREBOARD */
6aada32e978e09cc60d52cb05ae4cee91b676da1slive/* #define USE_MMAP_FILES */
6aada32e978e09cc60d52cb05ae4cee91b676da1slive/* #define USE_PTHREAD_SERIALIZED_ACCEPT */
dce4ff5d881d942f1ba7822d432eecd39f5166d2nd/* Some versions of AIX support cross-process pthread mutexes; some don't. */
6aada32e978e09cc60d52cb05ae4cee91b676da1slive/* we don't want to use sys/resource.h under
dce4ff5d881d942f1ba7822d432eecd39f5166d2nd Ultrix although this header exists. */
6aada32e978e09cc60d52cb05ae4cee91b676da1slive/* If you have Ultrix 4.3, and are using cc, const is broken */
6aada32e978e09cc60d52cb05ae4cee91b676da1slive#ifndef __ultrix__ /* Hack to check for pre-Ultrix 4.4 cc */
080b1313a70a1fc4b16d013c157fe17cf946def1wrowe#define const /* Not implemented */
#define NO_LONG_DOUBLE
typedef int rlim_t;
typedef int rlim_t;
#define NO_GETTIMEOFDAY
#define NEED_STRCASECMP
#define NEED_STRNCASECMP
#define NET_SIZE_T int
typedef unsigned short mode_t;
#define NO_SETSID
#define NEED_STRDUP
#define NO_LINGCLOSE
#ifndef FD_CLOEXEC
#ifndef S_ISDIR
#ifndef S_ISREG
#ifndef S_IXUSR
#ifndef S_IRGRP
#ifndef S_IXGRP
#ifndef S_IROTH
#ifndef S_IXOTH
#ifndef S_IRUSR
#ifndef S_IWUSR
#ifndef S_IWGRP
#ifndef S_IWOTH
#define STDIN_FILENO 0
typedef int pid_t;
#define USE_LONGJMP
#define NO_USE_SIGACTION
#if defined(__DYNAMIC__)
#define HAVE_DYLD
#define DYLD_CANT_UNLOAD
#elif defined(MAC_OS) || defined(MAC_OS_X_SERVER) /* Mac OS (>= 10.0) and Mac OS X Server (<= 5.x) */
#ifdef MAC_OS_X_SERVER
#define HAVE_DYLD
#define HAVE_GMTOFF
#define HAVE_MMAP
#define USE_MMAP_FILES
#define USE_MMAP_SCOREBOARD
#ifdef MAC_OS_X_SERVER
#define MAP_TMPFILE
#define HAVE_RESOURCE
#define HAVE_SNPRINTF
#define USE_LONGJMP
#define USE_FLOCK_SERIALIZED_ACCEPT
#ifndef HTTPD_ROOT
#ifndef DOCUMENT_LOCATION
#ifndef DEFAULT_XFERLOG
#ifndef DEFAULT_ERRORLOG
#ifndef DEFAULT_PIDLOG
#ifndef DEFAULT_SCOREBOARD
#ifndef DEFAULT_LOCKFILE
#ifndef SERVER_CONFIG_FILE
#ifndef TYPES_CONFIG_FILE
#ifndef DEFAULT_USER_DIR
#ifndef DEFAULT_USER
#ifndef DEFAULT_GROUP
#ifndef DEFAULT_PATH
#include <features.h>
* all glibc based systems need crypt.h
#include <crypt.h>
#define USE_SHMGET_SCOREBOARD
#define USE_MMAP_FILES
#ifndef USE_FLOCK_SERIALIZED_ACCEPT
#define USE_FCNTL_SERIALIZED_ACCEPT
#define USE_FCNTL_SERIALIZED_ACCEPT
typedef int rlim_t;
#define NEED_INITGROUPS
#define NO_WRITEV
#define USE_FCNTL_SERIALIZED_ACCEPT
#define USE_MMAP_SCOREBOARD
#define USE_MMAP_FILES
#define SecureWare
/* Although SCO 5 defines these in <strings.h> (note the "s") they don't have
extern int strcasecmp(const char *, const char *);
extern int strncasecmp(const char *, const char *, unsigned);
extern int strcasecmp(const char *, const char *);
extern int strncasecmp(const char *, const char *, unsigned);
extern char *shmat();
extern int shmctl();
extern int shmget();
extern char *sbrk();
extern char *crypt();
#define NEED_STRDUP
#define USE_FLOCK_SERIALIZED_ACCEPT
#define USE_SHMGET_SCOREBOARD
#define NO_LINGCLOSE
#define NO_SLACK
#define NO_KILLPG
#ifndef MPRAS
#define NEED_STRCASECMP
#ifndef ENCORE
#define NEED_STRNCASECMP
#ifndef USE_SYSVSEM_SERIALIZED_ACCEPT
#define USE_FCNTL_SERIALIZED_ACCEPT
#define USE_SHMGET_SCOREBOARD
#define USE_FCNTL_SERIALIZED_ACCEPT
#define NO_LINGCLOSE
#define NO_KILLPG
#define NEED_STRCASECMP
#define NEED_STRNCASECMP
#define USE_MMAP_SCOREBOARD
#define USE_MMAP_FILES
#define _POSIX_SOURCE
#define NO_KILLPG
#ifdef _IX86_DG
#define NEED_STRCASECMP
#define NEED_STRNCASECMP
#define USE_FCNTL_SERIALIZED_ACCEPT
#ifndef DEFAULT_USER
#ifndef DEFAULT_GROUP
#define USE_MMAP_SCOREBOARD
#define USE_MMAP_FILES
#define USE_FLOCK_SERIALIZED_ACCEPT
#define NO_SETSID
#define NEED_WAITPID
#define STDIN_FILENO 0
#define USE_LONGJMP
#define NO_USE_SIGACTION
#define NEED_STRERROR
#define NEED_STRSTR
#define NEED_HASHBANG_EMUL
#define NDELAY_PIPE_RETURNS_ZERO
#if defined(__FreeBSD__)
#include <osreldate.h>
#define USE_MMAP_SCOREBOARD
#define USE_MMAP_FILES
#ifndef DEFAULT_USER
#ifndef DEFAULT_GROUP
#if defined(__bsdi__) || \
#define USE_FLOCK_SERIALIZED_ACCEPT
#ifndef crypt
#ifndef initgroups
int initgroups(char *, int);
#ifndef strncasecmp
#define NEED_INITGROUPS
#define NEED_SELECT_H
#define NEED_PROCESS_H
#include <unix.h>
#define USE_POSIX_SCOREBOARD
#define USE_FLOCK_SERIALIZED_ACCEPT
#define USE_LONGJMP
typedef int rlim_t;
#define NO_KILLPG
#define USE_FCNTL_SERIALIZED_ACCEPT
#define USE_MMAP_SCOREBOARD
#define USE_MMAP_FILES
#define NO_KILLPG
#define NEED_STRCASECMP
#define NEED_STRNCASECMP
#define NEED_PROCESS_H
#define NO_SETSID
#define NO_TIMES
#define CASE_BLIND_FILESYSTEM
#define USE_OS2_SCOREBOARD
#define NO_RELIABLE_PIPED_LOGS
#define USE_OS2SEM_SERIALIZED_ACCEPT
#define NO_SLACK
typedef int rlim_t;
#define NO_SETSID
#ifndef __MACHTEN_PPC__
#ifndef __MACHTEN_68K__
#define __MACHTEN_68K__
#define USE_FLOCK_SERIALIZED_ACCEPT
#define NO_USE_SIGACTION
#define USE_LONGJMP
#define USE_SHMGET_SCOREBOARD
#define USE_FCNTL_SERIALIZED_ACCEPT
#define USE_MMAP_SCOREBOARD
#define USE_MMAP_FILES
#define NO_TIMEZONE
#include <stdio.h>
typedef int rlim_t;
#define NO_KILLPG
#define USE_SHMGET_SCOREBOARD
#define USE_FCNTL_SERIALIZED_ACCEPT
#define USE_SHMGET_SCOREBOARD
#define USE_LONGJMP
#define NO_SETSID
#define NO_USE_SIGACTION
#define NEED_WAITPID
#include <stdlib.h>
typedef int pid_t;
typedef int rlim_t;
typedef int mode_t;
typedef int rlim_t;
#define NO_USE_SIGACTION
#define USE_LONGJMP
#define NEED_STRCASECMP
#define NEED_STRNCASECMP
#define NEED_STRDUP
#include <stddef.h>
#define NO_WRITEV
#define NO_KILLPG
#define NEED_INITGROUPS
#include <tpfeq.h>
#include <tpfio.h>
#include <sysapi.h>
#include <sysgtime.h>
#define HAVE_SHMGET
#define NEED_INITGROUPS
#define NEED_SIGNAL_INTERRUPT
#include <strings.h>
#ifndef __strings_h
#define NEED_STRCASECMP
#define NEED_STRNCASECMP
#define NEED_STRDUP
#define NO_DBM_REWRITEMAP
#define NO_GETTIMEOFDAY
#define NO_KILLPG
#define NO_LINGCLOSE
#define NO_MMAP
#define NO_RELIABLE_PIPED_LOGS
#define NO_SETSID
#define NO_SLACK
#define NO_TIMES
#define NO_USE_SIGACTION
#define NO_WRITEV
#define USE_LONGJMP
#define USE_TPF_ACCEPT
#define USE_TPF_CORE_SERIALIZED_ACCEPT
#define USE_TPF_SCOREBOARD
#define USE_TPF_SELECT
#define NO_WRITEV
#define NO_KILLPG
#define NEED_INITGROUPS
#define NO_SLACK
#ifdef BSD
#ifndef API_EXPORT
#ifndef API_EXPORT_NONSTD
#ifndef MODULE_VAR_EXPORT
#define MODULE_VAR_EXPORT
#ifndef API_VAR_EXPORT
#define API_VAR_EXPORT
#ifndef CORE_EXPORT
#ifndef CORE_EXPORT_NONSTD
#define ap_private_extern
* The particular directory style your system supports. If you have dirent.h
#include <stdarg.h>
#include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef __TANDEM
#include <strings.h>
#include "ap_ctype.h"
#ifndef WIN32
#ifdef HAVE_SYS_SELECT_H
#ifndef TPF
#include <netdb.h>
#include <pwd.h>
#include <grp.h>
#include <fcntl.h>
#ifndef O_BINARY
#define O_BINARY (0)
#include <limits.h>
#ifdef WIN32
#include <signal.h>
#include <errno.h>
#include <memory.h>
#ifdef NEED_PROCESS_H
#include <process.h>
#ifdef HAVE_SYS_RESOURCE_H
#ifdef SUNOS4
#ifdef USE_MMAP_SCOREBOARD
#ifndef LOGNAME_MAX
#ifdef ultrix
#define ULTRIX_BRAIN_DEATH
#ifndef S_ISLNK
#ifndef INADDR_NONE
#include <setjmp.h>
#if defined(USE_LONGJMP)
#ifndef JMP_BUF
#ifndef JMP_BUF
#define CHECK_FD_SETSIZE
#ifdef USE_TPF_SELECT
int ap_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
#ifdef NEED_SIGNAL_INTERRUPT
#define ap_check_signals()
#ifdef ULTRIX_BRAIN_DEATH
#ifndef ap_inet_addr
#ifndef HAS_OTHER_CHILD
#define NO_RELIABLE_PIPED_LOGS
#ifdef NEED_HASHBANG_EMUL
const char *envp[]);
#ifdef __STDC__
#ifdef CRAY2
#ifdef offsetof
#ifndef NET_SIZE_T
#define NET_SIZE_T int
#ifdef SUNOS_LIB_PROTOTYPES
int getopt(int, char **, char *);
int strcasecmp(const char *, const char *);
int strncasecmp(const char *, const char *, int);
int toupper(int);
int tolower(int);
int printf(char *,...);
int sscanf(char *, char *,...);
void perror(char *);
int initgroups(char *, int);
int flock(int, int);
#ifndef NO_KILLPG
int killpg(int, int);
int socket(int, int, int);
int setsockopt(int, int, int, const char *, int);
int listen(int, int);
int shutdown(int, int);
void syslog(int, char *,...);
char *mktemp(char *);
#ifndef HAVE_CONFIG_H
#define HAVE_KILLPG
#define HAVE_STRDUP
#define HAVE_STRCASECMP
#define HAVE_STRNCASECMP
#define HAVE_STRSTR
#define HAVE_INITGROUPS
#define HAVE_WAITPID
#define HAVE_STRERROR
#define HAVE_DIFFTIME
#define HAVE_GETTIMEOFDAY
#define HAVE_SETSID
#define HAVE_TIMES
#define HAVE_SYS_TIMES_H
#if !defined(NO_RELIABLE_PIPED_LOGS)
#define HAVE_RELIABLE_PIPED_LOGS
#ifndef HAVE_STRDUP
#ifndef HAVE_STRCASECMP
extern int strcasecmp (const char *a, const char *b);
#ifndef HAVE_STRNCASECMP
extern int strncasecmp (const char *a, const char *b, int n);
#ifndef HAVE_INITGROUPS
#ifndef HAVE_WAITPID
#ifndef HAVE_STRERROR
#ifndef HAVE_DIFFTIME
#ifndef ap_wait_t
#define ap_wait_t int
#ifdef PTHREAD_EVERYWHERE
#include <pthread.h>
#ifdef NO_SERIALIZED_ACCEPT
#ifdef __cplusplus