GME  13
apr_private.h
Go to the documentation of this file.
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 /*
00018  * Note: 
00019  * This is the windows specific autoconf-like config file
00020  * which unix would create at build time.
00021  */
00022 
00023 #ifdef WIN32
00024 
00025 #ifndef APR_PRIVATE_H
00026 #define APR_PRIVATE_H
00027 
00028 /* Include the public APR symbols, include our idea of the 'right'
00029  * subset of the Windows.h header.  This saves us repetition.
00030  */
00031 #include "apr.h"
00032 
00033 /* 
00034  * Add a _very_few_ declarations missing from the restricted set of headers
00035  * (If this list becomes extensive, re-enable the required headers above!)
00036  * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now
00037  */
00038 #ifndef SW_HIDE
00039 #define SW_HIDE             0
00040 #endif
00041 
00042 /* For the misc.h late-loaded dynamic symbols, we need some obscure types 
00043  * Avoid dragging in wtypes.h unless it's absolutely necessary [generally
00044  * not with APR itself, until some GUI-related security is introduced.]
00045  */
00046 #ifndef _WIN32_WCE
00047 #define HAVE_ACLAPI 1
00048 #ifdef __wtypes_h__
00049 #include <accctrl.h>
00050 #else
00051 #define __wtypes_h__
00052 #include <accctrl.h>
00053 #undef __wtypes_h__
00054 #endif
00055 #else
00056 #define HAVE_ACLAPI 0
00057 #endif
00058 
00059 #if APR_HAVE_SYS_TYPES_H
00060 #include <sys/types.h>
00061 #endif
00062 #if APR_HAVE_STDDEF_H
00063 #include <stddef.h>
00064 #endif
00065 #include <stdio.h>
00066 #if APR_HAVE_TIME_H
00067 #include <time.h>
00068 #endif
00069 
00070 /* Use this section to define all of the HAVE_FOO_H
00071  * that are required to build properly.
00072  */
00073 #define HAVE_LIMITS_H 1
00074 #define HAVE_MALLOC_H 1
00075 #define HAVE_SIGNAL_H 1
00076 /* #define HAVE_STDDEF_H 1 why not? */
00077 #define HAVE_STDLIB_H 1
00078 
00079 #define HAVE_STRICMP  1
00080 #define HAVE_STRNICMP 1
00081 #define HAVE_STRDUP   1
00082 #define HAVE_STRSTR   1
00083 #define HAVE_MEMCHR   1
00084 
00085 #define SIGHUP     1
00086 /* 2 is used for SIGINT on windows */
00087 #define SIGQUIT    3
00088 /* 4 is used for SIGILL on windows */
00089 #define SIGTRAP    5
00090 #define SIGIOT     6
00091 #define SIGBUS     7
00092 /* 8 is used for SIGFPE on windows */
00093 #define SIGKILL    9
00094 #define SIGUSR1    10
00095 /* 11 is used for SIGSEGV on windows */
00096 #define SIGUSR2    12
00097 #define SIGPIPE    13
00098 #define SIGALRM    14
00099 /* 15 is used for SIGTERM on windows */
00100 #define SIGSTKFLT  16
00101 #define SIGCHLD    17 
00102 #define SIGCONT    18
00103 #define SIGSTOP    19
00104 #define SIGTSTP    20
00105 /* 21 is used for SIGBREAK on windows */
00106 /* 22 is used for SIGABRT on windows */
00107 #define SIGTTIN    23
00108 #define SIGTTOU    24
00109 #define SIGURG     25
00110 #define SIGXCPU    26
00111 #define SIGXFSZ    27
00112 #define SIGVTALRM  28
00113 #define SIGPROF    29
00114 #define SIGWINCH   30
00115 #define SIGIO      31
00116 
00117 /* APR COMPATABILITY FUNCTIONS
00118  * This section should be used to define functions and
00119  * macros which are need to make Windows features look
00120  * like POSIX features.
00121  */
00122 typedef void (Sigfunc)(int);
00123 
00124 #define sleep(t)                 Sleep((t) * 1000)
00125 
00126 #define SIZEOF_SHORT           2
00127 #define SIZEOF_INT             4
00128 #define SIZEOF_LONGLONG        8
00129 #define SIZEOF_CHAR            1
00130 #define SIZEOF_SSIZE_T         SIZEOF_INT
00131 
00132 unsigned __stdcall SignalHandling(void *);
00133 int thread_ready(void);
00134 
00135 #if !APR_HAVE_ERRNO_H
00136 APR_DECLARE_DATA int errno;
00137 #define ENOSPC 1
00138 #endif
00139 
00140 #if APR_HAVE_IPV6
00141 #define HAVE_GETADDRINFO 1
00142 #define HAVE_GETNAMEINFO 1
00143 #endif
00144 
00145 /* MSVC 7.0 introduced _strtoi64 */
00146 #if _MSC_VER >= 1300 && _INTEGRAL_MAX_BITS >= 64 && !defined(_WIN32_WCE)
00147 #define APR_INT64_STRFN       _strtoi64
00148 #endif
00149 
00150 #if APR_HAS_LARGE_FILES
00151 #ifdef APR_INT64_STRFN
00152 #define APR_OFF_T_STRFN         APR_INT64_STRFN
00153 #else
00154 #define APR_OFF_T_STRFN         apr_strtoi64
00155 #endif
00156 #else
00157 #if defined(_WIN32_WCE)
00158 #define APR_OFF_T_STRFN         strtol
00159 #else
00160 #define APR_OFF_T_STRFN         strtoi
00161 #endif
00162 #endif
00163 
00164 /* used to check for DWORD overflow in 64bit compiles */
00165 #define APR_DWORD_MAX 0xFFFFFFFFUL
00166 
00167 /*
00168  * Include common private declarations.
00169  */
00170 #include "../apr_private_common.h"
00171 
00172 #endif  /*APR_PRIVATE_H*/
00173 #endif  /*WIN32*/