Apache2
apr_private.h
Go to the documentation of this file.
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 
17 /*
18  * Note:
19  * This is the win32-specific autoconf-like config file
20  * which unix creates at ./configure time.
21  */
22 
23 #ifndef APR_PRIVATE_H
24 #define APR_PRIVATE_H
25 
26 /* Pick up publicly advertised headers and symbols before the
27  * APR internal private headers and symbols
28  */
29 #include <apr.h>
30 
31 /*
32  * Add a _very_few_ declarations missing from the restricted set of headers
33  * (If this list becomes extensive, re-enable the required headers in apr.hw!)
34  * ACL headers were excluded by default, so include them now.
35  */
36 #ifndef SW_HIDE
37 #define SW_HIDE 0
38 #endif
39 
40 /* For the misc.h late-loaded dynamic symbols, we need some obscure types
41  * Avoid dragging in wtypes.h unless it's absolutely necessary [generally
42  * not with APR itself, until some GUI-related security is introduced.]
43  */
44 #define HAVE_ACLAPI 1
45 #ifdef __wtypes_h__
46 #include <accctrl.h>
47 #else
48 #define __wtypes_h__
49 #include <accctrl.h>
50 #undef __wtypes_h__
51 #endif
52 
53 /* Use this section to define all of the HAVE_FOO_H
54  * that are required to build properly.
55  */
56 #define HAVE_LIMITS_H 1
57 #define HAVE_MALLOC_H 1
58 #define HAVE_PROCESS_H 1
59 #define HAVE_SIGNAL_H 1
60 #define HAVE_STDDEF_H 1
61 #define HAVE_STDLIB_H 1
62 
63 #define HAVE_STRICMP 1
64 #define HAVE_STRNICMP 1
65 #define HAVE_STRDUP 1
66 #define HAVE_STRSTR 1
67 #define HAVE_MEMCHR 1
68 
69 #ifndef __WATCOMC__
70 #define SIGHUP 1
71 /* 2 is used for SIGINT on windows */
72 #define SIGQUIT 3
73 /* 4 is used for SIGILL on windows */
74 #define SIGTRAP 5
75 #define SIGIOT 6
76 #define SIGBUS 7
77 /* 8 is used for SIGFPE on windows */
78 #define SIGKILL 9
79 #define SIGUSR1 10
80 /* 11 is used for SIGSEGV on windows */
81 #define SIGUSR2 12
82 #endif
83 #define SIGPIPE 13
84 #define SIGALRM 14
85 /* 15 is used for SIGTERM on windows */
86 #define SIGSTKFLT 16
87 #define SIGCHLD 17
88 #define SIGCONT 18
89 #define SIGSTOP 19
90 #define SIGTSTP 20
91 /* 21 is used for SIGBREAK on windows */
92 /* 22 is used for SIGABRT on windows */
93 #define SIGTTIN 23
94 #define SIGTTOU 24
95 #define SIGURG 25
96 #define SIGXCPU 26
97 #define SIGXFSZ 27
98 #define SIGVTALRM 28
99 #define SIGPROF 29
100 #define SIGWINCH 30
101 #define SIGIO 31
102 
103 /* APR COMPATABILITY FUNCTIONS
104  * This section should be used to define functions and
105  * macros which are need to make Windows features look
106  * like POSIX features.
107  */
108 typedef void (Sigfunc)(int);
109 
110 #define sleep(t) Sleep((t) * 1000)
111 /* For now workaround for Watcom'S lack of _commit() */
112 #ifdef __WATCOMC__
113 #define _commit fsync
114 #endif
115 
116 #define SIZEOF_SHORT 2
117 #define SIZEOF_INT 4
118 #define SIZEOF_LONGLONG 8
119 #define SIZEOF_CHAR 1
120 #define SIZEOF_SSIZE_T SIZEOF_INT
121 
122 unsigned __stdcall SignalHandling(void *);
123 int thread_ready(void);
124 
125 #if !APR_HAVE_ERRNO_H
127 #define ENOSPC 1
128 #endif
129 
130 #if APR_HAVE_IPV6
131 #define HAVE_GETADDRINFO 1
132 #define HAVE_GETNAMEINFO 1
133 #define HAVE_IF_INDEXTONAME 1
134 #define HAVE_IF_NAMETOINDEX 1
135 #endif
136 
137 /* MSVC 7.0 introduced _strtoi64 */
138 #if _MSC_VER >= 1300 && _INTEGRAL_MAX_BITS >= 64
139 #define APR_INT64_STRFN _strtoi64
140 #endif
141 
142 #if APR_HAS_LARGE_FILES
143 #ifdef APR_INT64_STRFN
144 #define APR_OFF_T_STRFN APR_INT64_STRFN
145 #else
146 #define APR_OFF_T_STRFN apr_strtoi64
147 #endif
148 #else
149 #define APR_OFF_T_STRFN strtoi
150 #endif
151 
152 /* used to check for DWORD overflow in 64bit compiles */
153 #define APR_DWORD_MAX 0xFFFFFFFFUL
154 
155 /* Compile win32 with DSO support for .dll builds
156  * Pair the static xml build for static apr-2.lib
157  */
158 #ifdef APR_DECLARE_STATIC
159 #define APU_DSO_BUILD 0
160 #define XML_STATIC 1
161 #else
162 #define APU_DSO_BUILD 1
163 #endif
164 
165 /* Presume a standard, modern (5.x) mysql sdk */
166 #define HAVE_MY_GLOBAL_H 1
167 
168 /* my_sys.h is broken on VC/Win32, and apparently not required */
169 /* #undef HAVE_MY_SYS_H 0 */
170 
171 /* Windows ODBC sql.h is always present */
172 #define HAVE_SQL_H 1
173 
174 #define HAVE_ICONV_H APR_HAVE_ICONV
175 
176 /*
177  * Windows does not have GDBM, and we always use the bundled (new) Expat
178  */
179 
180 /* Define if you have the gdbm library (-lgdbm). */
181 /* #undef HAVE_LIBGDBM */
182 
183 /* define if Expat 1.0 or 1.1 was found */
184 /* #undef APR_HAVE_OLD_EXPAT */
185 
186 #ifdef HAVE_PROCESS_H
187 #include <process.h>
188 #endif
189 
190 #endif /*APR_PRIVATE_H*/
APR Platform Definitions.
int
Definition: mod_proxy.h:674
#define APR_DECLARE_DATA
Definition: macros.h:17
APR_DECLARE_DATA int errno
Definition: apr_private.h:126
int thread_ready(void)
void() Sigfunc(int)
Definition: apr_private.h:108
unsigned __stdcall SignalHandling(void *)