1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
|
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
#include <errno.h>
#include "apr.h"
#ifndef APR_ERRNO_H
#define APR_ERRNO_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* APR_OS_START_ERROR is where the APR specific error values should start.
* APR_OS_START_STATUS is where the APR specific status codes should start.
* APR_OS_START_USEERR are reserved for applications that use APR that
* layer their own error codes along with APR's.
* APR_OS_START_SYSERR should be used for system error values on
* each platform.
*/
#define APR_OS_START_ERROR 1000
#define APR_OS_START_STATUS (APR_OS_START_ERROR + 500)
#define APR_OS_START_USEERR (APR_OS_START_STATUS + 500)
#define APR_OS_START_CANONERR (APR_OS_START_USEERR + 500)
#define APR_OS_START_SYSERR (APR_OS_START_CANONERR + 500)
typedef int ap_status_t;
int ap_canonical_error(ap_status_t err);
const char *ap_strerror(ap_status_t err);
#define APR_SUCCESS 0
/* APR ERROR VALUES */
#define APR_ENOSTAT (APR_OS_START_ERROR + 1)
#define APR_ENOPOOL (APR_OS_START_ERROR + 2)
#define APR_ENOFILE (APR_OS_START_ERROR + 3)
#define APR_EBADDATE (APR_OS_START_ERROR + 4)
#define APR_ENOCONT (APR_OS_START_ERROR + 5)
#define APR_ENOPROC (APR_OS_START_ERROR + 6)
#define APR_ENOTIME (APR_OS_START_ERROR + 7)
#define APR_ENODIR (APR_OS_START_ERROR + 8)
#define APR_ENOLOCK (APR_OS_START_ERROR + 9)
#define APR_ENOPOLL (APR_OS_START_ERROR + 10)
#define APR_ENOSOCKET (APR_OS_START_ERROR + 11)
#define APR_ENOTHREAD (APR_OS_START_ERROR + 12)
#define APR_ENOTHDKEY (APR_OS_START_ERROR + 13)
#define APR_ENOTTHREADSAFE (APR_OS_START_ERROR + 14)
#define APR_ESHMLOCK (APR_OS_START_ERROR + 15)
#define APR_EFUNCNOTFOUND (APR_OS_START_ERROR + 16)
#define APR_ENOFUNCPOINTER (APR_OS_START_ERROR + 17)
#define APR_ENODSOHANDLE (APR_OS_START_ERROR + 18)
#define APR_EDSOOPEN (APR_OS_START_ERROR + 19)
#define APR_EBADARG (APR_OS_START_ERROR + 20)
/* APR STATUS VALUES */
#define APR_INCHILD (APR_OS_START_STATUS + 1)
#define APR_INPARENT (APR_OS_START_STATUS + 2)
#define APR_DETACH (APR_OS_START_STATUS + 3)
#define APR_NOTDETACH (APR_OS_START_STATUS + 4)
#define APR_CHILD_DONE (APR_OS_START_STATUS + 5)
#define APR_CHILD_NOTDONE (APR_OS_START_STATUS + 6)
#define APR_TIMEUP (APR_OS_START_STATUS + 7)
#define APR_INVALSOCK (APR_OS_START_STATUS + 8)
#define APR_ALLSTD (APR_OS_START_STATUS + 9)
#define APR_STDOUT (APR_OS_START_STATUS + 10)
#define APR_STDERR (APR_OS_START_STATUS + 11)
#define APR_BADCH (APR_OS_START_STATUS + 12)
#define APR_BADARG (APR_OS_START_STATUS + 13)
#define APR_EOF (APR_OS_START_STATUS + 14)
#define APR_NOTFOUND (APR_OS_START_STATUS + 15)
#define APR_LESS (APR_OS_START_STATUS + 16)
#define APR_EQUAL (APR_OS_START_STATUS + 17)
#define APR_MORE (APR_OS_START_STATUS + 18)
#define APR_ANONYMOUS (APR_OS_START_STATUS + 19)
#define APR_FILEBASED (APR_OS_START_STATUS + 20)
#define APR_KEYBASED (APR_OS_START_STATUS + 21)
/* A simple value to be used to initialze a status variable. */
#define APR_EINIT (APR_OS_START_STATUS + 16)
/* Not implemented either because we haven't gotten to it yet, or
* because it is not possible to do correctly.
*/
#define APR_ENOTIMPL (APR_OS_START_STATUS + 17)
/* Passwords do not match.
*/
#define APR_EMISMATCH (APR_OS_START_STATUS + 18)
#ifdef EACCES
#define APR_EACCES EACCES
#else
#define APR_EACCES (APR_OS_START_CANONERR + 1)
#endif
#ifdef EEXIST
#define APR_EEXIST EEXIST
#else
#define APR_EEXIST (APR_OS_START_CANONERR + 12)
#endif
#ifdef ENAMETOOLONG
#define APR_ENAMETOOLONG ENAMETOOLONG
#else
#define APR_ENAMETOOLONG (APR_OS_START_CANONERR + 13)
#endif
#ifdef ENOENT
#define APR_ENOENT ENOENT
#else
#define APR_ENOENT (APR_OS_START_CANONERR + 14)
#endif
#ifdef ENOTDIR
#define APR_ENOTDIR ENOTDIR
#else
#define APR_ENOTDIR (APR_OS_START_CANONERR + 15)
#endif
#ifdef ENOSPC
#define APR_ENOSPC ENOSPC
#else
#define APR_ENOSPC (APR_OS_START_CANONERR + 16)
#endif
#ifdef ENONOMEM
#define APR_ENOMEM ENOMEM
#else
#define APR_ENOMEM (APR_OS_START_CANONERR + 17)
#endif
#ifdef EMFILE
#define APR_EMFILE EMFILE
#else
#define APR_EMFILE (APR_OS_START_CANONERR + 18)
#endif
#ifdef ENFILE
#define APR_ENFILE ENFILE
#else
#define APR_ENFILE (APR_OS_START_CANONERR + 19)
#endif
#ifdef EBADF
#define APR_EBADF EBADF
#else
#define APR_EBADF (APR_OS_START_CANONERR + 110)
#endif
#ifdef EINVAL
#define APR_EINVAL EINVAL
#else
#define APR_EINVAL (APR_OS_START_CANONERR + 111)
#endif
#ifdef ESPIPE
#define APR_ESPIPE ESPIPE
#else
#define APR_ESPIPE (APR_OS_START_CANONERR + 112)
#endif
#ifdef EAGAIN
#define APR_EAGAIN EAGAIN
#else
#define APR_EAGAIN (APR_OS_START_CANONERR + 13)
#endif
#ifdef EINTR
#define APR_EINTR EINTR
#else
#define APR_EINTR (APR_OS_START_CANONERR + 14)
#endif
#ifdef ENOTSOCK
#define APR_ENOTSOCK ENOTSOCK
#else
#define APR_ENOTSOCK (APR_OS_START_CANONERR + 15)
#endif
#ifdef ECONNREFUSED
#define APR_ECONNREFUSED ECONNREFUSED
#else
#define APR_ECONNREFUSED (APR_OS_START_CANONERR + 16)
#endif
#ifdef EINPROGRESS
#define APR_EINPROGRESS EINPROGRESS
#else
#define APR_EINPROGRESS (APR_OS_START_CANONERR + 17)
#endif
#ifdef __cplusplus
}
#endif
#endif /* ! APR_ERRNO_H */
|