|
Apache Portable Runtime
|
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 #ifndef APR_ERRNO_H 00018 #define APR_ERRNO_H 00019 00020 /** 00021 * @file apr_errno.h 00022 * @brief APR Error Codes 00023 */ 00024 00025 #include "apr.h" 00026 00027 #if APR_HAVE_ERRNO_H 00028 #include <errno.h> 00029 #endif 00030 00031 #ifdef __cplusplus 00032 extern "C" { 00033 #endif /* __cplusplus */ 00034 00035 /** 00036 * @defgroup apr_errno Error Codes 00037 * @ingroup APR 00038 * @{ 00039 */ 00040 00041 /** 00042 * Type for specifying an error or status code. 00043 */ 00044 typedef int apr_status_t; 00045 00046 /** 00047 * Return a human readable string describing the specified error. 00048 * @param statcode The error code the get a string for. 00049 * @param buf A buffer to hold the error string. 00050 * @param bufsize Size of the buffer to hold the string. 00051 */ 00052 APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf, 00053 apr_size_t bufsize); 00054 00055 #if defined(DOXYGEN) 00056 /** 00057 * @def APR_FROM_OS_ERROR(os_err_type syserr) 00058 * Fold a platform specific error into an apr_status_t code. 00059 * @return apr_status_t 00060 * @param e The platform os error code. 00061 * @warning macro implementation; the syserr argument may be evaluated 00062 * multiple times. 00063 */ 00064 #define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR) 00065 00066 /** 00067 * @def APR_TO_OS_ERROR(apr_status_t statcode) 00068 * @return os_err_type 00069 * Fold an apr_status_t code back to the native platform defined error. 00070 * @param e The apr_status_t folded platform os error code. 00071 * @warning macro implementation; the statcode argument may be evaluated 00072 * multiple times. If the statcode was not created by apr_get_os_error 00073 * or APR_FROM_OS_ERROR, the results are undefined. 00074 */ 00075 #define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR) 00076 00077 /** @def apr_get_os_error() 00078 * @return apr_status_t the last platform error, folded into apr_status_t, on most platforms 00079 * @remark This retrieves errno, or calls a GetLastError() style function, and 00080 * folds it with APR_FROM_OS_ERROR. Some platforms (such as OS2) have no 00081 * such mechanism, so this call may be unsupported. Do NOT use this 00082 * call for socket errors from socket, send, recv etc! 00083 */ 00084 00085 /** @def apr_set_os_error(e) 00086 * Reset the last platform error, unfolded from an apr_status_t, on some platforms 00087 * @param e The OS error folded in a prior call to APR_FROM_OS_ERROR() 00088 * @warning This is a macro implementation; the statcode argument may be evaluated 00089 * multiple times. If the statcode was not created by apr_get_os_error 00090 * or APR_FROM_OS_ERROR, the results are undefined. This macro sets 00091 * errno, or calls a SetLastError() style function, unfolding statcode 00092 * with APR_TO_OS_ERROR. Some platforms (such as OS2) have no such 00093 * mechanism, so this call may be unsupported. 00094 */ 00095 00096 /** @def apr_get_netos_error() 00097 * Return the last socket error, folded into apr_status_t, on all platforms 00098 * @remark This retrieves errno or calls a GetLastSocketError() style function, 00099 * and folds it with APR_FROM_OS_ERROR. 00100 */ 00101 00102 /** @def apr_set_netos_error(e) 00103 * Reset the last socket error, unfolded from an apr_status_t 00104 * @param e The socket error folded in a prior call to APR_FROM_OS_ERROR() 00105 * @warning This is a macro implementation; the statcode argument may be evaluated 00106 * multiple times. If the statcode was not created by apr_get_os_error 00107 * or APR_FROM_OS_ERROR, the results are undefined. This macro sets 00108 * errno, or calls a WSASetLastError() style function, unfolding 00109 * socketcode with APR_TO_OS_ERROR. 00110 */ 00111 00112 #endif /* defined(DOXYGEN) */ 00113 00114 /** 00115 * APR_OS_START_ERROR is where the APR specific error values start. 00116 */ 00117 #define APR_OS_START_ERROR 20000 00118 /** 00119 * APR_OS_ERRSPACE_SIZE is the maximum number of errors you can fit 00120 * into one of the error/status ranges below -- except for 00121 * APR_OS_START_USERERR, which see. 00122 */ 00123 #define APR_OS_ERRSPACE_SIZE 50000 00124 /** 00125 * APR_UTIL_ERRSPACE_SIZE is the size of the space that is reserved for 00126 * use within apr-util. This space is reserved above that used by APR 00127 * internally. 00128 * @note This number MUST be smaller than APR_OS_ERRSPACE_SIZE by a 00129 * large enough amount that APR has sufficient room for it's 00130 * codes. 00131 */ 00132 #define APR_UTIL_ERRSPACE_SIZE 20000 00133 /** 00134 * APR_OS_START_STATUS is where the APR specific status codes start. 00135 */ 00136 #define APR_OS_START_STATUS (APR_OS_START_ERROR + APR_OS_ERRSPACE_SIZE) 00137 /** 00138 * APR_UTIL_START_STATUS is where APR-Util starts defining it's 00139 * status codes. 00140 */ 00141 #define APR_UTIL_START_STATUS (APR_OS_START_STATUS + \ 00142 (APR_OS_ERRSPACE_SIZE - APR_UTIL_ERRSPACE_SIZE)) 00143 /** 00144 * APR_OS_START_USERERR are reserved for applications that use APR that 00145 * layer their own error codes along with APR's. Note that the 00146 * error immediately following this one is set ten times farther 00147 * away than usual, so that users of apr have a lot of room in 00148 * which to declare custom error codes. 00149 * 00150 * In general applications should try and create unique error codes. To try 00151 * and assist in finding suitable ranges of numbers to use, the following 00152 * ranges are known to be used by the listed applications. If your 00153 * application defines error codes please advise the range of numbers it 00154 * uses to dev@apr.apache.org for inclusion in this list. 00155 * 00156 * Ranges shown are in relation to APR_OS_START_USERERR 00157 * 00158 * Subversion - Defined ranges, of less than 100, at intervals of 5000 00159 * starting at an offset of 5000, e.g. 00160 * +5000 to 5100, +10000 to 10100 00161 */ 00162 #define APR_OS_START_USERERR (APR_OS_START_STATUS + APR_OS_ERRSPACE_SIZE) 00163 /** 00164 * APR_OS_START_USEERR is obsolete, defined for compatibility only. 00165 * Use APR_OS_START_USERERR instead. 00166 */ 00167 #define APR_OS_START_USEERR APR_OS_START_USERERR 00168 /** 00169 * APR_OS_START_CANONERR is where APR versions of errno values are defined 00170 * on systems which don't have the corresponding errno. 00171 */ 00172 #define APR_OS_START_CANONERR (APR_OS_START_USERERR \ 00173 + (APR_OS_ERRSPACE_SIZE * 10)) 00174 /** 00175 * APR_OS_START_EAIERR folds EAI_ error codes from getaddrinfo() into 00176 * apr_status_t values. 00177 */ 00178 #define APR_OS_START_EAIERR (APR_OS_START_CANONERR + APR_OS_ERRSPACE_SIZE) 00179 /** 00180 * APR_OS_START_SYSERR folds platform-specific system error values into 00181 * apr_status_t values. 00182 */ 00183 #define APR_OS_START_SYSERR (APR_OS_START_EAIERR + APR_OS_ERRSPACE_SIZE) 00184 00185 /** 00186 * @defgroup APR_ERROR_map APR Error Space 00187 * <PRE> 00188 * The following attempts to show the relation of the various constants 00189 * used for mapping APR Status codes. 00190 * 00191 * 0 00192 * 00193 * 20,000 APR_OS_START_ERROR 00194 * 00195 * + APR_OS_ERRSPACE_SIZE (50,000) 00196 * 00197 * 70,000 APR_OS_START_STATUS 00198 * 00199 * + APR_OS_ERRSPACE_SIZE - APR_UTIL_ERRSPACE_SIZE (30,000) 00200 * 00201 * 100,000 APR_UTIL_START_STATUS 00202 * 00203 * + APR_UTIL_ERRSPACE_SIZE (20,000) 00204 * 00205 * 120,000 APR_OS_START_USERERR 00206 * 00207 * + 10 x APR_OS_ERRSPACE_SIZE (50,000 * 10) 00208 * 00209 * 620,000 APR_OS_START_CANONERR 00210 * 00211 * + APR_OS_ERRSPACE_SIZE (50,000) 00212 * 00213 * 670,000 APR_OS_START_EAIERR 00214 * 00215 * + APR_OS_ERRSPACE_SIZE (50,000) 00216 * 00217 * 720,000 APR_OS_START_SYSERR 00218 * 00219 * </PRE> 00220 */ 00221 00222 /** no error. */ 00223 #define APR_SUCCESS 0 00224 00225 /** 00226 * @defgroup APR_Error APR Error Values 00227 * <PRE> 00228 * <b>APR ERROR VALUES</b> 00229 * APR_ENOSTAT APR was unable to perform a stat on the file 00230 * APR_ENOPOOL APR was not provided a pool with which to allocate memory 00231 * APR_EBADDATE APR was given an invalid date 00232 * APR_EINVALSOCK APR was given an invalid socket 00233 * APR_ENOPROC APR was not given a process structure 00234 * APR_ENOTIME APR was not given a time structure 00235 * APR_ENODIR APR was not given a directory structure 00236 * APR_ENOLOCK APR was not given a lock structure 00237 * APR_ENOPOLL APR was not given a poll structure 00238 * APR_ENOSOCKET APR was not given a socket 00239 * APR_ENOTHREAD APR was not given a thread structure 00240 * APR_ENOTHDKEY APR was not given a thread key structure 00241 * APR_ENOSHMAVAIL There is no more shared memory available 00242 * APR_EDSOOPEN APR was unable to open the dso object. For more 00243 * information call apr_dso_error(). 00244 * APR_EGENERAL General failure (specific information not available) 00245 * APR_EBADIP The specified IP address is invalid 00246 * APR_EBADMASK The specified netmask is invalid 00247 * APR_ESYMNOTFOUND Could not find the requested symbol 00248 * APR_ENOTENOUGHENTROPY Not enough entropy to continue 00249 * </PRE> 00250 * 00251 * <PRE> 00252 * <b>APR STATUS VALUES</b> 00253 * APR_INCHILD Program is currently executing in the child 00254 * APR_INPARENT Program is currently executing in the parent 00255 * APR_DETACH The thread is detached 00256 * APR_NOTDETACH The thread is not detached 00257 * APR_CHILD_DONE The child has finished executing 00258 * APR_CHILD_NOTDONE The child has not finished executing 00259 * APR_TIMEUP The operation did not finish before the timeout 00260 * APR_INCOMPLETE The operation was incomplete although some processing 00261 * was performed and the results are partially valid 00262 * APR_BADCH Getopt found an option not in the option string 00263 * APR_BADARG Getopt found an option that is missing an argument 00264 * and an argument was specified in the option string 00265 * APR_EOF APR has encountered the end of the file 00266 * APR_NOTFOUND APR was unable to find the socket in the poll structure 00267 * APR_ANONYMOUS APR is using anonymous shared memory 00268 * APR_FILEBASED APR is using a file name as the key to the shared memory 00269 * APR_KEYBASED APR is using a shared key as the key to the shared memory 00270 * APR_EINIT Ininitalizer value. If no option has been found, but 00271 * the status variable requires a value, this should be used 00272 * APR_ENOTIMPL The APR function has not been implemented on this 00273 * platform, either because nobody has gotten to it yet, 00274 * or the function is impossible on this platform. 00275 * APR_EMISMATCH Two passwords do not match. 00276 * APR_EABSOLUTE The given path was absolute. 00277 * APR_ERELATIVE The given path was relative. 00278 * APR_EINCOMPLETE The given path was neither relative nor absolute. 00279 * APR_EABOVEROOT The given path was above the root path. 00280 * APR_EBUSY The given lock was busy. 00281 * APR_EPROC_UNKNOWN The given process wasn't recognized by APR 00282 * </PRE> 00283 * @{ 00284 */ 00285 /** @see APR_STATUS_IS_ENOSTAT */ 00286 #define APR_ENOSTAT (APR_OS_START_ERROR + 1) 00287 /** @see APR_STATUS_IS_ENOPOOL */ 00288 #define APR_ENOPOOL (APR_OS_START_ERROR + 2) 00289 /* empty slot: +3 */ 00290 /** @see APR_STATUS_IS_EBADDATE */ 00291 #define APR_EBADDATE (APR_OS_START_ERROR + 4) 00292 /** @see APR_STATUS_IS_EINVALSOCK */ 00293 #define APR_EINVALSOCK (APR_OS_START_ERROR + 5) 00294 /** @see APR_STATUS_IS_ENOPROC */ 00295 #define APR_ENOPROC (APR_OS_START_ERROR + 6) 00296 /** @see APR_STATUS_IS_ENOTIME */ 00297 #define APR_ENOTIME (APR_OS_START_ERROR + 7) 00298 /** @see APR_STATUS_IS_ENODIR */ 00299 #define APR_ENODIR (APR_OS_START_ERROR + 8) 00300 /** @see APR_STATUS_IS_ENOLOCK */ 00301 #define APR_ENOLOCK (APR_OS_START_ERROR + 9) 00302 /** @see APR_STATUS_IS_ENOPOLL */ 00303 #define APR_ENOPOLL (APR_OS_START_ERROR + 10) 00304 /** @see APR_STATUS_IS_ENOSOCKET */ 00305 #define APR_ENOSOCKET (APR_OS_START_ERROR + 11) 00306 /** @see APR_STATUS_IS_ENOTHREAD */ 00307 #define APR_ENOTHREAD (APR_OS_START_ERROR + 12) 00308 /** @see APR_STATUS_IS_ENOTHDKEY */ 00309 #define APR_ENOTHDKEY (APR_OS_START_ERROR + 13) 00310 /** @see APR_STATUS_IS_EGENERAL */ 00311 #define APR_EGENERAL (APR_OS_START_ERROR + 14) 00312 /** @see APR_STATUS_IS_ENOSHMAVAIL */ 00313 #define APR_ENOSHMAVAIL (APR_OS_START_ERROR + 15) 00314 /** @see APR_STATUS_IS_EBADIP */ 00315 #define APR_EBADIP (APR_OS_START_ERROR + 16) 00316 /** @see APR_STATUS_IS_EBADMASK */ 00317 #define APR_EBADMASK (APR_OS_START_ERROR + 17) 00318 /* empty slot: +18 */ 00319 /** @see APR_STATUS_IS_EDSOPEN */ 00320 #define APR_EDSOOPEN (APR_OS_START_ERROR + 19) 00321 /** @see APR_STATUS_IS_EABSOLUTE */ 00322 #define APR_EABSOLUTE (APR_OS_START_ERROR + 20) 00323 /** @see APR_STATUS_IS_ERELATIVE */ 00324 #define APR_ERELATIVE (APR_OS_START_ERROR + 21) 00325 /** @see APR_STATUS_IS_EINCOMPLETE */ 00326 #define APR_EINCOMPLETE (APR_OS_START_ERROR + 22) 00327 /** @see APR_STATUS_IS_EABOVEROOT */ 00328 #define APR_EABOVEROOT (APR_OS_START_ERROR + 23) 00329 /** @see APR_STATUS_IS_EBADPATH */ 00330 #define APR_EBADPATH (APR_OS_START_ERROR + 24) 00331 /** @see APR_STATUS_IS_EPATHWILD */ 00332 #define APR_EPATHWILD (APR_OS_START_ERROR + 25) 00333 /** @see APR_STATUS_IS_ESYMNOTFOUND */ 00334 #define APR_ESYMNOTFOUND (APR_OS_START_ERROR + 26) 00335 /** @see APR_STATUS_IS_EPROC_UNKNOWN */ 00336 #define APR_EPROC_UNKNOWN (APR_OS_START_ERROR + 27) 00337 /** @see APR_STATUS_IS_ENOTENOUGHENTROPY */ 00338 #define APR_ENOTENOUGHENTROPY (APR_OS_START_ERROR + 28) 00339 /** @} */ 00340 00341 /** 00342 * @defgroup APR_STATUS_IS Status Value Tests 00343 * @warning For any particular error condition, more than one of these tests 00344 * may match. This is because platform-specific error codes may not 00345 * always match the semantics of the POSIX codes these tests (and the 00346 * corresponding APR error codes) are named after. A notable example 00347 * are the APR_STATUS_IS_ENOENT and APR_STATUS_IS_ENOTDIR tests on 00348 * Win32 platforms. The programmer should always be aware of this and 00349 * adjust the order of the tests accordingly. 00350 * @{ 00351 */ 00352 /** 00353 * APR was unable to perform a stat on the file 00354 * @warning always use this test, as platform-specific variances may meet this 00355 * more than one error code 00356 */ 00357 #define APR_STATUS_IS_ENOSTAT(s) ((s) == APR_ENOSTAT) 00358 /** 00359 * APR was not provided a pool with which to allocate memory 00360 * @warning always use this test, as platform-specific variances may meet this 00361 * more than one error code 00362 */ 00363 #define APR_STATUS_IS_ENOPOOL(s) ((s) == APR_ENOPOOL) 00364 /** APR was given an invalid date */ 00365 #define APR_STATUS_IS_EBADDATE(s) ((s) == APR_EBADDATE) 00366 /** APR was given an invalid socket */ 00367 #define APR_STATUS_IS_EINVALSOCK(s) ((s) == APR_EINVALSOCK) 00368 /** APR was not given a process structure */ 00369 #define APR_STATUS_IS_ENOPROC(s) ((s) == APR_ENOPROC) 00370 /** APR was not given a time structure */ 00371 #define APR_STATUS_IS_ENOTIME(s) ((s) == APR_ENOTIME) 00372 /** APR was not given a directory structure */ 00373 #define APR_STATUS_IS_ENODIR(s) ((s) == APR_ENODIR) 00374 /** APR was not given a lock structure */ 00375 #define APR_STATUS_IS_ENOLOCK(s) ((s) == APR_ENOLOCK) 00376 /** APR was not given a poll structure */ 00377 #define APR_STATUS_IS_ENOPOLL(s) ((s) == APR_ENOPOLL) 00378 /** APR was not given a socket */ 00379 #define APR_STATUS_IS_ENOSOCKET(s) ((s) == APR_ENOSOCKET) 00380 /** APR was not given a thread structure */ 00381 #define APR_STATUS_IS_ENOTHREAD(s) ((s) == APR_ENOTHREAD) 00382 /** APR was not given a thread key structure */ 00383 #define APR_STATUS_IS_ENOTHDKEY(s) ((s) == APR_ENOTHDKEY) 00384 /** Generic Error which can not be put into another spot */ 00385 #define APR_STATUS_IS_EGENERAL(s) ((s) == APR_EGENERAL) 00386 /** There is no more shared memory available */ 00387 #define APR_STATUS_IS_ENOSHMAVAIL(s) ((s) == APR_ENOSHMAVAIL) 00388 /** The specified IP address is invalid */ 00389 #define APR_STATUS_IS_EBADIP(s) ((s) == APR_EBADIP) 00390 /** The specified netmask is invalid */ 00391 #define APR_STATUS_IS_EBADMASK(s) ((s) == APR_EBADMASK) 00392 /* empty slot: +18 */ 00393 /** 00394 * APR was unable to open the dso object. 00395 * For more information call apr_dso_error(). 00396 */ 00397 #if defined(WIN32) 00398 #define APR_STATUS_IS_EDSOOPEN(s) ((s) == APR_EDSOOPEN \ 00399 || APR_TO_OS_ERROR(s) == ERROR_MOD_NOT_FOUND) 00400 #elif defined(OS2) 00401 #define APR_STATUS_IS_EDSOOPEN(s) ((s) == APR_EDSOOPEN \ 00402 || APR_TO_OS_ERROR(s) == ERROR_FILE_NOT_FOUND) 00403 #else 00404 #define APR_STATUS_IS_EDSOOPEN(s) ((s) == APR_EDSOOPEN) 00405 #endif 00406 /** The given path was absolute. */ 00407 #define APR_STATUS_IS_EABSOLUTE(s) ((s) == APR_EABSOLUTE) 00408 /** The given path was relative. */ 00409 #define APR_STATUS_IS_ERELATIVE(s) ((s) == APR_ERELATIVE) 00410 /** The given path was neither relative nor absolute. */ 00411 #define APR_STATUS_IS_EINCOMPLETE(s) ((s) == APR_EINCOMPLETE) 00412 /** The given path was above the root path. */ 00413 #define APR_STATUS_IS_EABOVEROOT(s) ((s) == APR_EABOVEROOT) 00414 /** The given path was bad. */ 00415 #define APR_STATUS_IS_EBADPATH(s) ((s) == APR_EBADPATH) 00416 /** The given path contained wildcards. */ 00417 #define APR_STATUS_IS_EPATHWILD(s) ((s) == APR_EPATHWILD) 00418 /** Could not find the requested symbol. 00419 * For more information call apr_dso_error(). 00420 */ 00421 #if defined(WIN32) 00422 #define APR_STATUS_IS_ESYMNOTFOUND(s) ((s) == APR_ESYMNOTFOUND \ 00423 || APR_TO_OS_ERROR(s) == ERROR_PROC_NOT_FOUND) 00424 #elif defined(OS2) 00425 #define APR_STATUS_IS_ESYMNOTFOUND(s) ((s) == APR_ESYMNOTFOUND \ 00426 || APR_TO_OS_ERROR(s) == ERROR_INVALID_NAME) 00427 #else 00428 #define APR_STATUS_IS_ESYMNOTFOUND(s) ((s) == APR_ESYMNOTFOUND) 00429 #endif 00430 /** The given process was not recognized by APR. */ 00431 #define APR_STATUS_IS_EPROC_UNKNOWN(s) ((s) == APR_EPROC_UNKNOWN) 00432 /** APR could not gather enough entropy to continue. */ 00433 #define APR_STATUS_IS_ENOTENOUGHENTROPY(s) ((s) == APR_ENOTENOUGHENTROPY) 00434 00435 /** @} */ 00436 00437 /** 00438 * @addtogroup APR_Error 00439 * @{ 00440 */ 00441 /** @see APR_STATUS_IS_INCHILD */ 00442 #define APR_INCHILD (APR_OS_START_STATUS + 1) 00443 /** @see APR_STATUS_IS_INPARENT */ 00444 #define APR_INPARENT (APR_OS_START_STATUS + 2) 00445 /** @see APR_STATUS_IS_DETACH */ 00446 #define APR_DETACH (APR_OS_START_STATUS + 3) 00447 /** @see APR_STATUS_IS_NOTDETACH */ 00448 #define APR_NOTDETACH (APR_OS_START_STATUS + 4) 00449 /** @see APR_STATUS_IS_CHILD_DONE */ 00450 #define APR_CHILD_DONE (APR_OS_START_STATUS + 5) 00451 /** @see APR_STATUS_IS_CHILD_NOTDONE */ 00452 #define APR_CHILD_NOTDONE (APR_OS_START_STATUS + 6) 00453 /** @see APR_STATUS_IS_TIMEUP */ 00454 #define APR_TIMEUP (APR_OS_START_STATUS + 7) 00455 /** @see APR_STATUS_IS_INCOMPLETE */ 00456 #define APR_INCOMPLETE (APR_OS_START_STATUS + 8) 00457 /* empty slot: +9 */ 00458 /* empty slot: +10 */ 00459 /* empty slot: +11 */ 00460 /** @see APR_STATUS_IS_BADCH */ 00461 #define APR_BADCH (APR_OS_START_STATUS + 12) 00462 /** @see APR_STATUS_IS_BADARG */ 00463 #define APR_BADARG (APR_OS_START_STATUS + 13) 00464 /** @see APR_STATUS_IS_EOF */ 00465 #define APR_EOF (APR_OS_START_STATUS + 14) 00466 /** @see APR_STATUS_IS_NOTFOUND */ 00467 #define APR_NOTFOUND (APR_OS_START_STATUS + 15) 00468 /* empty slot: +16 */ 00469 /* empty slot: +17 */ 00470 /* empty slot: +18 */ 00471 /** @see APR_STATUS_IS_ANONYMOUS */ 00472 #define APR_ANONYMOUS (APR_OS_START_STATUS + 19) 00473 /** @see APR_STATUS_IS_FILEBASED */ 00474 #define APR_FILEBASED (APR_OS_START_STATUS + 20) 00475 /** @see APR_STATUS_IS_KEYBASED */ 00476 #define APR_KEYBASED (APR_OS_START_STATUS + 21) 00477 /** @see APR_STATUS_IS_EINIT */ 00478 #define APR_EINIT (APR_OS_START_STATUS + 22) 00479 /** @see APR_STATUS_IS_ENOTIMPL */ 00480 #define APR_ENOTIMPL (APR_OS_START_STATUS + 23) 00481 /** @see APR_STATUS_IS_EMISMATCH */ 00482 #define APR_EMISMATCH (APR_OS_START_STATUS + 24) 00483 /** @see APR_STATUS_IS_EBUSY */ 00484 #define APR_EBUSY (APR_OS_START_STATUS + 25) 00485 /** @} */ 00486 00487 /** 00488 * @addtogroup APR_STATUS_IS 00489 * @{ 00490 */ 00491 /** 00492 * Program is currently executing in the child 00493 * @warning 00494 * always use this test, as platform-specific variances may meet this 00495 * more than one error code */ 00496 #define APR_STATUS_IS_INCHILD(s) ((s) == APR_INCHILD) 00497 /** 00498 * Program is currently executing in the parent 00499 * @warning 00500 * always use this test, as platform-specific variances may meet this 00501 * more than one error code 00502 */ 00503 #define APR_STATUS_IS_INPARENT(s) ((s) == APR_INPARENT) 00504 /** 00505 * The thread is detached 00506 * @warning 00507 * always use this test, as platform-specific variances may meet this 00508 * more than one error code 00509 */ 00510 #define APR_STATUS_IS_DETACH(s) ((s) == APR_DETACH) 00511 /** 00512 * The thread is not detached 00513 * @warning 00514 * always use this test, as platform-specific variances may meet this 00515 * more than one error code 00516 */ 00517 #define APR_STATUS_IS_NOTDETACH(s) ((s) == APR_NOTDETACH) 00518 /** 00519 * The child has finished executing 00520 * @warning 00521 * always use this test, as platform-specific variances may meet this 00522 * more than one error code 00523 */ 00524 #define APR_STATUS_IS_CHILD_DONE(s) ((s) == APR_CHILD_DONE) 00525 /** 00526 * The child has not finished executing 00527 * @warning 00528 * always use this test, as platform-specific variances may meet this 00529 * more than one error code 00530 */ 00531 #define APR_STATUS_IS_CHILD_NOTDONE(s) ((s) == APR_CHILD_NOTDONE) 00532 /** 00533 * The operation did not finish before the timeout 00534 * @warning 00535 * always use this test, as platform-specific variances may meet this 00536 * more than one error code 00537 */ 00538 #define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP) 00539 /** 00540 * The operation was incomplete although some processing was performed 00541 * and the results are partially valid. 00542 * @warning 00543 * always use this test, as platform-specific variances may meet this 00544 * more than one error code 00545 */ 00546 #define APR_STATUS_IS_INCOMPLETE(s) ((s) == APR_INCOMPLETE) 00547 /* empty slot: +9 */ 00548 /* empty slot: +10 */ 00549 /* empty slot: +11 */ 00550 /** 00551 * Getopt found an option not in the option string 00552 * @warning 00553 * always use this test, as platform-specific variances may meet this 00554 * more than one error code 00555 */ 00556 #define APR_STATUS_IS_BADCH(s) ((s) == APR_BADCH) 00557 /** 00558 * Getopt found an option not in the option string and an argument was 00559 * specified in the option string 00560 * @warning 00561 * always use this test, as platform-specific variances may meet this 00562 * more than one error code 00563 */ 00564 #define APR_STATUS_IS_BADARG(s) ((s) == APR_BADARG) 00565 /** 00566 * APR has encountered the end of the file 00567 * @warning 00568 * always use this test, as platform-specific variances may meet this 00569 * more than one error code 00570 */ 00571 #define APR_STATUS_IS_EOF(s) ((s) == APR_EOF) 00572 /** 00573 * APR was unable to find the socket in the poll structure 00574 * @warning 00575 * always use this test, as platform-specific variances may meet this 00576 * more than one error code 00577 */ 00578 #define APR_STATUS_IS_NOTFOUND(s) ((s) == APR_NOTFOUND) 00579 /* empty slot: +16 */ 00580 /* empty slot: +17 */ 00581 /* empty slot: +18 */ 00582 /** 00583 * APR is using anonymous shared memory 00584 * @warning 00585 * always use this test, as platform-specific variances may meet this 00586 * more than one error code 00587 */ 00588 #define APR_STATUS_IS_ANONYMOUS(s) ((s) == APR_ANONYMOUS) 00589 /** 00590 * APR is using a file name as the key to the shared memory 00591 * @warning 00592 * always use this test, as platform-specific variances may meet this 00593 * more than one error code 00594 */ 00595 #define APR_STATUS_IS_FILEBASED(s) ((s) == APR_FILEBASED) 00596 /** 00597 * APR is using a shared key as the key to the shared memory 00598 * @warning 00599 * always use this test, as platform-specific variances may meet this 00600 * more than one error code 00601 */ 00602 #define APR_STATUS_IS_KEYBASED(s) ((s) == APR_KEYBASED) 00603 /** 00604 * Ininitalizer value. If no option has been found, but 00605 * the status variable requires a value, this should be used 00606 * @warning 00607 * always use this test, as platform-specific variances may meet this 00608 * more than one error code 00609 */ 00610 #define APR_STATUS_IS_EINIT(s) ((s) == APR_EINIT) 00611 /** 00612 * The APR function has not been implemented on this 00613 * platform, either because nobody has gotten to it yet, 00614 * or the function is impossible on this platform. 00615 * @warning 00616 * always use this test, as platform-specific variances may meet this 00617 * more than one error code 00618 */ 00619 #define APR_STATUS_IS_ENOTIMPL(s) ((s) == APR_ENOTIMPL) 00620 /** 00621 * Two passwords do not match. 00622 * @warning 00623 * always use this test, as platform-specific variances may meet this 00624 * more than one error code 00625 */ 00626 #define APR_STATUS_IS_EMISMATCH(s) ((s) == APR_EMISMATCH) 00627 /** 00628 * The given lock was busy 00629 * @warning always use this test, as platform-specific variances may meet this 00630 * more than one error code 00631 */ 00632 #define APR_STATUS_IS_EBUSY(s) ((s) == APR_EBUSY) 00633 00634 /** @} */ 00635 00636 /** 00637 * @addtogroup APR_Error APR Error Values 00638 * @{ 00639 */ 00640 /* APR CANONICAL ERROR VALUES */ 00641 /** @see APR_STATUS_IS_EACCES */ 00642 #ifdef EACCES 00643 #define APR_EACCES EACCES 00644 #else 00645 #define APR_EACCES (APR_OS_START_CANONERR + 1) 00646 #endif 00647 00648 /** @see APR_STATUS_IS_EEXIST */ 00649 #ifdef EEXIST 00650 #define APR_EEXIST EEXIST 00651 #else 00652 #define APR_EEXIST (APR_OS_START_CANONERR + 2) 00653 #endif 00654 00655 /** @see APR_STATUS_IS_ENAMETOOLONG */ 00656 #ifdef ENAMETOOLONG 00657 #define APR_ENAMETOOLONG ENAMETOOLONG 00658 #else 00659 #define APR_ENAMETOOLONG (APR_OS_START_CANONERR + 3) 00660 #endif 00661 00662 /** @see APR_STATUS_IS_ENOENT */ 00663 #ifdef ENOENT 00664 #define APR_ENOENT ENOENT 00665 #else 00666 #define APR_ENOENT (APR_OS_START_CANONERR + 4) 00667 #endif 00668 00669 /** @see APR_STATUS_IS_ENOTDIR */ 00670 #ifdef ENOTDIR 00671 #define APR_ENOTDIR ENOTDIR 00672 #else 00673 #define APR_ENOTDIR (APR_OS_START_CANONERR + 5) 00674 #endif 00675 00676 /** @see APR_STATUS_IS_ENOSPC */ 00677 #ifdef ENOSPC 00678 #define APR_ENOSPC ENOSPC 00679 #else 00680 #define APR_ENOSPC (APR_OS_START_CANONERR + 6) 00681 #endif 00682 00683 /** @see APR_STATUS_IS_ENOMEM */ 00684 #ifdef ENOMEM 00685 #define APR_ENOMEM ENOMEM 00686 #else 00687 #define APR_ENOMEM (APR_OS_START_CANONERR + 7) 00688 #endif 00689 00690 /** @see APR_STATUS_IS_EMFILE */ 00691 #ifdef EMFILE 00692 #define APR_EMFILE EMFILE 00693 #else 00694 #define APR_EMFILE (APR_OS_START_CANONERR + 8) 00695 #endif 00696 00697 /** @see APR_STATUS_IS_ENFILE */ 00698 #ifdef ENFILE 00699 #define APR_ENFILE ENFILE 00700 #else 00701 #define APR_ENFILE (APR_OS_START_CANONERR + 9) 00702 #endif 00703 00704 /** @see APR_STATUS_IS_EBADF */ 00705 #ifdef EBADF 00706 #define APR_EBADF EBADF 00707 #else 00708 #define APR_EBADF (APR_OS_START_CANONERR + 10) 00709 #endif 00710 00711 /** @see APR_STATUS_IS_EINVAL */ 00712 #ifdef EINVAL 00713 #define APR_EINVAL EINVAL 00714 #else 00715 #define APR_EINVAL (APR_OS_START_CANONERR + 11) 00716 #endif 00717 00718 /** @see APR_STATUS_IS_ESPIPE */ 00719 #ifdef ESPIPE 00720 #define APR_ESPIPE ESPIPE 00721 #else 00722 #define APR_ESPIPE (APR_OS_START_CANONERR + 12) 00723 #endif 00724 00725 /** 00726 * @see APR_STATUS_IS_EAGAIN 00727 * @warning use APR_STATUS_IS_EAGAIN instead of just testing this value 00728 */ 00729 #ifdef EAGAIN 00730 #define APR_EAGAIN EAGAIN 00731 #elif defined(EWOULDBLOCK) 00732 #define APR_EAGAIN EWOULDBLOCK 00733 #else 00734 #define APR_EAGAIN (APR_OS_START_CANONERR + 13) 00735 #endif 00736 00737 /** @see APR_STATUS_IS_EINTR */ 00738 #ifdef EINTR 00739 #define APR_EINTR EINTR 00740 #else 00741 #define APR_EINTR (APR_OS_START_CANONERR + 14) 00742 #endif 00743 00744 /** @see APR_STATUS_IS_ENOTSOCK */ 00745 #ifdef ENOTSOCK 00746 #define APR_ENOTSOCK ENOTSOCK 00747 #else 00748 #define APR_ENOTSOCK (APR_OS_START_CANONERR + 15) 00749 #endif 00750 00751 /** @see APR_STATUS_IS_ECONNREFUSED */ 00752 #ifdef ECONNREFUSED 00753 #define APR_ECONNREFUSED ECONNREFUSED 00754 #else 00755 #define APR_ECONNREFUSED (APR_OS_START_CANONERR + 16) 00756 #endif 00757 00758 /** @see APR_STATUS_IS_EINPROGRESS */ 00759 #ifdef EINPROGRESS 00760 #define APR_EINPROGRESS EINPROGRESS 00761 #else 00762 #define APR_EINPROGRESS (APR_OS_START_CANONERR + 17) 00763 #endif 00764 00765 /** 00766 * @see APR_STATUS_IS_ECONNABORTED 00767 * @warning use APR_STATUS_IS_ECONNABORTED instead of just testing this value 00768 */ 00769 00770 #ifdef ECONNABORTED 00771 #define APR_ECONNABORTED ECONNABORTED 00772 #else 00773 #define APR_ECONNABORTED (APR_OS_START_CANONERR + 18) 00774 #endif 00775 00776 /** @see APR_STATUS_IS_ECONNRESET */ 00777 #ifdef ECONNRESET 00778 #define APR_ECONNRESET ECONNRESET 00779 #else 00780 #define APR_ECONNRESET (APR_OS_START_CANONERR + 19) 00781 #endif 00782 00783 /** @see APR_STATUS_IS_ETIMEDOUT 00784 * @deprecated */ 00785 #ifdef ETIMEDOUT 00786 #define APR_ETIMEDOUT ETIMEDOUT 00787 #else 00788 #define APR_ETIMEDOUT (APR_OS_START_CANONERR + 20) 00789 #endif 00790 00791 /** @see APR_STATUS_IS_EHOSTUNREACH */ 00792 #ifdef EHOSTUNREACH 00793 #define APR_EHOSTUNREACH EHOSTUNREACH 00794 #else 00795 #define APR_EHOSTUNREACH (APR_OS_START_CANONERR + 21) 00796 #endif 00797 00798 /** @see APR_STATUS_IS_ENETUNREACH */ 00799 #ifdef ENETUNREACH 00800 #define APR_ENETUNREACH ENETUNREACH 00801 #else 00802 #define APR_ENETUNREACH (APR_OS_START_CANONERR + 22) 00803 #endif 00804 00805 /** @see APR_STATUS_IS_EFTYPE */ 00806 #ifdef EFTYPE 00807 #define APR_EFTYPE EFTYPE 00808 #else 00809 #define APR_EFTYPE (APR_OS_START_CANONERR + 23) 00810 #endif 00811 00812 /** @see APR_STATUS_IS_EPIPE */ 00813 #ifdef EPIPE 00814 #define APR_EPIPE EPIPE 00815 #else 00816 #define APR_EPIPE (APR_OS_START_CANONERR + 24) 00817 #endif 00818 00819 /** @see APR_STATUS_IS_EXDEV */ 00820 #ifdef EXDEV 00821 #define APR_EXDEV EXDEV 00822 #else 00823 #define APR_EXDEV (APR_OS_START_CANONERR + 25) 00824 #endif 00825 00826 /** @see APR_STATUS_IS_ENOTEMPTY */ 00827 #ifdef ENOTEMPTY 00828 #define APR_ENOTEMPTY ENOTEMPTY 00829 #else 00830 #define APR_ENOTEMPTY (APR_OS_START_CANONERR + 26) 00831 #endif 00832 00833 /** @see APR_STATUS_IS_EAFNOSUPPORT */ 00834 #ifdef EAFNOSUPPORT 00835 #define APR_EAFNOSUPPORT EAFNOSUPPORT 00836 #else 00837 #define APR_EAFNOSUPPORT (APR_OS_START_CANONERR + 27) 00838 #endif 00839 00840 /** @} */ 00841 00842 #if defined(OS2) && !defined(DOXYGEN) 00843 00844 #define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR) 00845 #define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR) 00846 00847 #define INCL_DOSERRORS 00848 #define INCL_DOS 00849 00850 /* Leave these undefined. 00851 * OS2 doesn't rely on the errno concept. 00852 * The API calls always return a result codes which 00853 * should be filtered through APR_FROM_OS_ERROR(). 00854 * 00855 * #define apr_get_os_error() (APR_FROM_OS_ERROR(GetLastError())) 00856 * #define apr_set_os_error(e) (SetLastError(APR_TO_OS_ERROR(e))) 00857 */ 00858 00859 /* A special case, only socket calls require this; 00860 */ 00861 #define apr_get_netos_error() (APR_FROM_OS_ERROR(errno)) 00862 #define apr_set_netos_error(e) (errno = APR_TO_OS_ERROR(e)) 00863 00864 /* These can't sit in a private header, so in spite of the extra size, 00865 * they need to be made available here. 00866 */ 00867 #define SOCBASEERR 10000 00868 #define SOCEPERM (SOCBASEERR+1) /* Not owner */ 00869 #define SOCESRCH (SOCBASEERR+3) /* No such process */ 00870 #define SOCEINTR (SOCBASEERR+4) /* Interrupted system call */ 00871 #define SOCENXIO (SOCBASEERR+6) /* No such device or address */ 00872 #define SOCEBADF (SOCBASEERR+9) /* Bad file number */ 00873 #define SOCEACCES (SOCBASEERR+13) /* Permission denied */ 00874 #define SOCEFAULT (SOCBASEERR+14) /* Bad address */ 00875 #define SOCEINVAL (SOCBASEERR+22) /* Invalid argument */ 00876 #define SOCEMFILE (SOCBASEERR+24) /* Too many open files */ 00877 #define SOCEPIPE (SOCBASEERR+32) /* Broken pipe */ 00878 #define SOCEOS2ERR (SOCBASEERR+100) /* OS/2 Error */ 00879 #define SOCEWOULDBLOCK (SOCBASEERR+35) /* Operation would block */ 00880 #define SOCEINPROGRESS (SOCBASEERR+36) /* Operation now in progress */ 00881 #define SOCEALREADY (SOCBASEERR+37) /* Operation already in progress */ 00882 #define SOCENOTSOCK (SOCBASEERR+38) /* Socket operation on non-socket */ 00883 #define SOCEDESTADDRREQ (SOCBASEERR+39) /* Destination address required */ 00884 #define SOCEMSGSIZE (SOCBASEERR+40) /* Message too long */ 00885 #define SOCEPROTOTYPE (SOCBASEERR+41) /* Protocol wrong type for socket */ 00886 #define SOCENOPROTOOPT (SOCBASEERR+42) /* Protocol not available */ 00887 #define SOCEPROTONOSUPPORT (SOCBASEERR+43) /* Protocol not supported */ 00888 #define SOCESOCKTNOSUPPORT (SOCBASEERR+44) /* Socket type not supported */ 00889 #define SOCEOPNOTSUPP (SOCBASEERR+45) /* Operation not supported on socket */ 00890 #define SOCEPFNOSUPPORT (SOCBASEERR+46) /* Protocol family not supported */ 00891 #define SOCEAFNOSUPPORT (SOCBASEERR+47) /* Address family not supported by protocol family */ 00892 #define SOCEADDRINUSE (SOCBASEERR+48) /* Address already in use */ 00893 #define SOCEADDRNOTAVAIL (SOCBASEERR+49) /* Can't assign requested address */ 00894 #define SOCENETDOWN (SOCBASEERR+50) /* Network is down */ 00895 #define SOCENETUNREACH (SOCBASEERR+51) /* Network is unreachable */ 00896 #define SOCENETRESET (SOCBASEERR+52) /* Network dropped connection on reset */ 00897 #define SOCECONNABORTED (SOCBASEERR+53) /* Software caused connection abort */ 00898 #define SOCECONNRESET (SOCBASEERR+54) /* Connection reset by peer */ 00899 #define SOCENOBUFS (SOCBASEERR+55) /* No buffer space available */ 00900 #define SOCEISCONN (SOCBASEERR+56) /* Socket is already connected */ 00901 #define SOCENOTCONN (SOCBASEERR+57) /* Socket is not connected */ 00902 #define SOCESHUTDOWN (SOCBASEERR+58) /* Can't send after socket shutdown */ 00903 #define SOCETOOMANYREFS (SOCBASEERR+59) /* Too many references: can't splice */ 00904 #define SOCETIMEDOUT (SOCBASEERR+60) /* Connection timed out */ 00905 #define SOCECONNREFUSED (SOCBASEERR+61) /* Connection refused */ 00906 #define SOCELOOP (SOCBASEERR+62) /* Too many levels of symbolic links */ 00907 #define SOCENAMETOOLONG (SOCBASEERR+63) /* File name too long */ 00908 #define SOCEHOSTDOWN (SOCBASEERR+64) /* Host is down */ 00909 #define SOCEHOSTUNREACH (SOCBASEERR+65) /* No route to host */ 00910 #define SOCENOTEMPTY (SOCBASEERR+66) /* Directory not empty */ 00911 00912 /* APR CANONICAL ERROR TESTS */ 00913 #define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES \ 00914 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED \ 00915 || (s) == APR_OS_START_SYSERR + ERROR_SHARING_VIOLATION) 00916 #define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST \ 00917 || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED \ 00918 || (s) == APR_OS_START_SYSERR + ERROR_FILE_EXISTS \ 00919 || (s) == APR_OS_START_SYSERR + ERROR_ALREADY_EXISTS \ 00920 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED) 00921 #define APR_STATUS_IS_ENAMETOOLONG(s) ((s) == APR_ENAMETOOLONG \ 00922 || (s) == APR_OS_START_SYSERR + ERROR_FILENAME_EXCED_RANGE \ 00923 || (s) == APR_OS_START_SYSERR + SOCENAMETOOLONG) 00924 #define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT \ 00925 || (s) == APR_OS_START_SYSERR + ERROR_FILE_NOT_FOUND \ 00926 || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \ 00927 || (s) == APR_OS_START_SYSERR + ERROR_NO_MORE_FILES \ 00928 || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED) 00929 #define APR_STATUS_IS_ENOTDIR(s) ((s) == APR_ENOTDIR) 00930 #define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC \ 00931 || (s) == APR_OS_START_SYSERR + ERROR_DISK_FULL) 00932 #define APR_STATUS_IS_ENOMEM(s) ((s) == APR_ENOMEM) 00933 #define APR_STATUS_IS_EMFILE(s) ((s) == APR_EMFILE \ 00934 || (s) == APR_OS_START_SYSERR + ERROR_TOO_MANY_OPEN_FILES) 00935 #define APR_STATUS_IS_ENFILE(s) ((s) == APR_ENFILE) 00936 #define APR_STATUS_IS_EBADF(s) ((s) == APR_EBADF \ 00937 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE) 00938 #define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL \ 00939 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_PARAMETER \ 00940 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_FUNCTION) 00941 #define APR_STATUS_IS_ESPIPE(s) ((s) == APR_ESPIPE \ 00942 || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK) 00943 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \ 00944 || (s) == APR_OS_START_SYSERR + ERROR_NO_DATA \ 00945 || (s) == APR_OS_START_SYSERR + SOCEWOULDBLOCK \ 00946 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION) 00947 #define APR_STATUS_IS_EINTR(s) ((s) == APR_EINTR \ 00948 || (s) == APR_OS_START_SYSERR + SOCEINTR) 00949 #define APR_STATUS_IS_ENOTSOCK(s) ((s) == APR_ENOTSOCK \ 00950 || (s) == APR_OS_START_SYSERR + SOCENOTSOCK) 00951 #define APR_STATUS_IS_ECONNREFUSED(s) ((s) == APR_ECONNREFUSED \ 00952 || (s) == APR_OS_START_SYSERR + SOCECONNREFUSED) 00953 #define APR_STATUS_IS_EINPROGRESS(s) ((s) == APR_EINPROGRESS \ 00954 || (s) == APR_OS_START_SYSERR + SOCEINPROGRESS) 00955 #define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \ 00956 || (s) == APR_OS_START_SYSERR + SOCECONNABORTED) 00957 #define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET \ 00958 || (s) == APR_OS_START_SYSERR + SOCECONNRESET) 00959 /* XXX deprecated */ 00960 #define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \ 00961 || (s) == APR_OS_START_SYSERR + SOCETIMEDOUT) 00962 #undef APR_STATUS_IS_TIMEUP 00963 #define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP \ 00964 || (s) == APR_OS_START_SYSERR + SOCETIMEDOUT) 00965 #define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH \ 00966 || (s) == APR_OS_START_SYSERR + SOCEHOSTUNREACH) 00967 #define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH \ 00968 || (s) == APR_OS_START_SYSERR + SOCENETUNREACH) 00969 #define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE) 00970 #define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE \ 00971 || (s) == APR_OS_START_SYSERR + ERROR_BROKEN_PIPE \ 00972 || (s) == APR_OS_START_SYSERR + SOCEPIPE) 00973 #define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV \ 00974 || (s) == APR_OS_START_SYSERR + ERROR_NOT_SAME_DEVICE) 00975 #define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY \ 00976 || (s) == APR_OS_START_SYSERR + ERROR_DIR_NOT_EMPTY \ 00977 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED) 00978 #define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_AFNOSUPPORT \ 00979 || (s) == APR_OS_START_SYSERR + SOCEAFNOSUPPORT) 00980 00981 /* 00982 Sorry, too tired to wrap this up for OS2... feel free to 00983 fit the following into their best matches. 00984 00985 { ERROR_NO_SIGNAL_SENT, ESRCH }, 00986 { SOCEALREADY, EALREADY }, 00987 { SOCEDESTADDRREQ, EDESTADDRREQ }, 00988 { SOCEMSGSIZE, EMSGSIZE }, 00989 { SOCEPROTOTYPE, EPROTOTYPE }, 00990 { SOCENOPROTOOPT, ENOPROTOOPT }, 00991 { SOCEPROTONOSUPPORT, EPROTONOSUPPORT }, 00992 { SOCESOCKTNOSUPPORT, ESOCKTNOSUPPORT }, 00993 { SOCEOPNOTSUPP, EOPNOTSUPP }, 00994 { SOCEPFNOSUPPORT, EPFNOSUPPORT }, 00995 { SOCEADDRINUSE, EADDRINUSE }, 00996 { SOCEADDRNOTAVAIL, EADDRNOTAVAIL }, 00997 { SOCENETDOWN, ENETDOWN }, 00998 { SOCENETRESET, ENETRESET }, 00999 { SOCENOBUFS, ENOBUFS }, 01000 { SOCEISCONN, EISCONN }, 01001 { SOCENOTCONN, ENOTCONN }, 01002 { SOCESHUTDOWN, ESHUTDOWN }, 01003 { SOCETOOMANYREFS, ETOOMANYREFS }, 01004 { SOCELOOP, ELOOP }, 01005 { SOCEHOSTDOWN, EHOSTDOWN }, 01006 { SOCENOTEMPTY, ENOTEMPTY }, 01007 { SOCEPIPE, EPIPE } 01008 */ 01009 01010 #elif defined(WIN32) && !defined(DOXYGEN) /* !defined(OS2) */ 01011 01012 #define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR) 01013 #define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR) 01014 01015 #define apr_get_os_error() (APR_FROM_OS_ERROR(GetLastError())) 01016 #define apr_set_os_error(e) (SetLastError(APR_TO_OS_ERROR(e))) 01017 01018 /* A special case, only socket calls require this: 01019 */ 01020 #define apr_get_netos_error() (APR_FROM_OS_ERROR(WSAGetLastError())) 01021 #define apr_set_netos_error(e) (WSASetLastError(APR_TO_OS_ERROR(e))) 01022 01023 /* APR CANONICAL ERROR TESTS */ 01024 #define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES \ 01025 || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED \ 01026 || (s) == APR_OS_START_SYSERR + ERROR_CANNOT_MAKE \ 01027 || (s) == APR_OS_START_SYSERR + ERROR_CURRENT_DIRECTORY \ 01028 || (s) == APR_OS_START_SYSERR + ERROR_DRIVE_LOCKED \ 01029 || (s) == APR_OS_START_SYSERR + ERROR_FAIL_I24 \ 01030 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION \ 01031 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_FAILED \ 01032 || (s) == APR_OS_START_SYSERR + ERROR_NOT_LOCKED \ 01033 || (s) == APR_OS_START_SYSERR + ERROR_NETWORK_ACCESS_DENIED \ 01034 || (s) == APR_OS_START_SYSERR + ERROR_SHARING_VIOLATION) 01035 #define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST \ 01036 || (s) == APR_OS_START_SYSERR + ERROR_FILE_EXISTS \ 01037 || (s) == APR_OS_START_SYSERR + ERROR_ALREADY_EXISTS) 01038 #define APR_STATUS_IS_ENAMETOOLONG(s) ((s) == APR_ENAMETOOLONG \ 01039 || (s) == APR_OS_START_SYSERR + ERROR_FILENAME_EXCED_RANGE \ 01040 || (s) == APR_OS_START_SYSERR + WSAENAMETOOLONG) 01041 #define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT \ 01042 || (s) == APR_OS_START_SYSERR + ERROR_FILE_NOT_FOUND \ 01043 || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \ 01044 || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED \ 01045 || (s) == APR_OS_START_SYSERR + ERROR_NO_MORE_FILES) 01046 #define APR_STATUS_IS_ENOTDIR(s) ((s) == APR_ENOTDIR \ 01047 || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \ 01048 || (s) == APR_OS_START_SYSERR + ERROR_BAD_NETPATH \ 01049 || (s) == APR_OS_START_SYSERR + ERROR_BAD_NET_NAME \ 01050 || (s) == APR_OS_START_SYSERR + ERROR_BAD_PATHNAME \ 01051 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DRIVE \ 01052 || (s) == APR_OS_START_SYSERR + ERROR_DIRECTORY) 01053 #define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC \ 01054 || (s) == APR_OS_START_SYSERR + ERROR_DISK_FULL) 01055 #define APR_STATUS_IS_ENOMEM(s) ((s) == APR_ENOMEM \ 01056 || (s) == APR_OS_START_SYSERR + ERROR_ARENA_TRASHED \ 01057 || (s) == APR_OS_START_SYSERR + ERROR_NOT_ENOUGH_MEMORY \ 01058 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_BLOCK \ 01059 || (s) == APR_OS_START_SYSERR + ERROR_NOT_ENOUGH_QUOTA \ 01060 || (s) == APR_OS_START_SYSERR + ERROR_OUTOFMEMORY) 01061 #define APR_STATUS_IS_EMFILE(s) ((s) == APR_EMFILE \ 01062 || (s) == APR_OS_START_SYSERR + ERROR_TOO_MANY_OPEN_FILES) 01063 #define APR_STATUS_IS_ENFILE(s) ((s) == APR_ENFILE) 01064 #define APR_STATUS_IS_EBADF(s) ((s) == APR_EBADF \ 01065 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE \ 01066 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_TARGET_HANDLE) 01067 #define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL \ 01068 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_ACCESS \ 01069 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DATA \ 01070 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_FUNCTION \ 01071 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE \ 01072 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_PARAMETER \ 01073 || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK) 01074 #define APR_STATUS_IS_ESPIPE(s) ((s) == APR_ESPIPE \ 01075 || (s) == APR_OS_START_SYSERR + ERROR_SEEK_ON_DEVICE \ 01076 || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK) 01077 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \ 01078 || (s) == APR_OS_START_SYSERR + ERROR_NO_DATA \ 01079 || (s) == APR_OS_START_SYSERR + ERROR_NO_PROC_SLOTS \ 01080 || (s) == APR_OS_START_SYSERR + ERROR_NESTING_NOT_ALLOWED \ 01081 || (s) == APR_OS_START_SYSERR + ERROR_MAX_THRDS_REACHED \ 01082 || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION \ 01083 || (s) == APR_OS_START_SYSERR + WSAEWOULDBLOCK) 01084 #define APR_STATUS_IS_EINTR(s) ((s) == APR_EINTR \ 01085 || (s) == APR_OS_START_SYSERR + WSAEINTR) 01086 #define APR_STATUS_IS_ENOTSOCK(s) ((s) == APR_ENOTSOCK \ 01087 || (s) == APR_OS_START_SYSERR + WSAENOTSOCK) 01088 #define APR_STATUS_IS_ECONNREFUSED(s) ((s) == APR_ECONNREFUSED \ 01089 || (s) == APR_OS_START_SYSERR + WSAECONNREFUSED) 01090 #define APR_STATUS_IS_EINPROGRESS(s) ((s) == APR_EINPROGRESS \ 01091 || (s) == APR_OS_START_SYSERR + WSAEINPROGRESS) 01092 #define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \ 01093 || (s) == APR_OS_START_SYSERR + WSAECONNABORTED) 01094 #define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET \ 01095 || (s) == APR_OS_START_SYSERR + ERROR_NETNAME_DELETED \ 01096 || (s) == APR_OS_START_SYSERR + WSAECONNRESET) 01097 /* XXX deprecated */ 01098 #define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \ 01099 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \ 01100 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT) 01101 #undef APR_STATUS_IS_TIMEUP 01102 #define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP \ 01103 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \ 01104 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT) 01105 #define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH \ 01106 || (s) == APR_OS_START_SYSERR + WSAEHOSTUNREACH) 01107 #define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH \ 01108 || (s) == APR_OS_START_SYSERR + WSAENETUNREACH) 01109 #define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE \ 01110 || (s) == APR_OS_START_SYSERR + ERROR_EXE_MACHINE_TYPE_MISMATCH \ 01111 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DLL \ 01112 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_MODULETYPE \ 01113 || (s) == APR_OS_START_SYSERR + ERROR_BAD_EXE_FORMAT \ 01114 || (s) == APR_OS_START_SYSERR + ERROR_INVALID_EXE_SIGNATURE \ 01115 || (s) == APR_OS_START_SYSERR + ERROR_FILE_CORRUPT \ 01116 || (s) == APR_OS_START_SYSERR + ERROR_BAD_FORMAT) 01117 #define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE \ 01118 || (s) == APR_OS_START_SYSERR + ERROR_BROKEN_PIPE) 01119 #define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV \ 01120 || (s) == APR_OS_START_SYSERR + ERROR_NOT_SAME_DEVICE) 01121 #define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY \ 01122 || (s) == APR_OS_START_SYSERR + ERROR_DIR_NOT_EMPTY) 01123 #define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_EAFNOSUPPORT \ 01124 || (s) == APR_OS_START_SYSERR + WSAEAFNOSUPPORT) 01125 01126 #elif defined(NETWARE) && defined(USE_WINSOCK) && !defined(DOXYGEN) /* !defined(OS2) && !defined(WIN32) */ 01127 01128 #define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR) 01129 #define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR) 01130 01131 #define apr_get_os_error() (errno) 01132 #define apr_set_os_error(e) (errno = (e)) 01133 01134 /* A special case, only socket calls require this: */ 01135 #define apr_get_netos_error() (APR_FROM_OS_ERROR(WSAGetLastError())) 01136 #define apr_set_netos_error(e) (WSASetLastError(APR_TO_OS_ERROR(e))) 01137 01138 /* APR CANONICAL ERROR TESTS */ 01139 #define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES) 01140 #define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST) 01141 #define APR_STATUS_IS_ENAMETOOLONG(s) ((s) == APR_ENAMETOOLONG) 01142 #define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT) 01143 #define APR_STATUS_IS_ENOTDIR(s) ((s) == APR_ENOTDIR) 01144 #define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC) 01145 #define APR_STATUS_IS_ENOMEM(s) ((s) == APR_ENOMEM) 01146 #define APR_STATUS_IS_EMFILE(s) ((s) == APR_EMFILE) 01147 #define APR_STATUS_IS_ENFILE(s) ((s) == APR_ENFILE) 01148 #define APR_STATUS_IS_EBADF(s) ((s) == APR_EBADF) 01149 #define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL) 01150 #define APR_STATUS_IS_ESPIPE(s) ((s) == APR_ESPIPE) 01151 01152 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \ 01153 || (s) == EWOULDBLOCK \ 01154 || (s) == APR_OS_START_SYSERR + WSAEWOULDBLOCK) 01155 #define APR_STATUS_IS_EINTR(s) ((s) == APR_EINTR \ 01156 || (s) == APR_OS_START_SYSERR + WSAEINTR) 01157 #define APR_STATUS_IS_ENOTSOCK(s) ((s) == APR_ENOTSOCK \ 01158 || (s) == APR_OS_START_SYSERR + WSAENOTSOCK) 01159 #define APR_STATUS_IS_ECONNREFUSED(s) ((s) == APR_ECONNREFUSED \ 01160 || (s) == APR_OS_START_SYSERR + WSAECONNREFUSED) 01161 #define APR_STATUS_IS_EINPROGRESS(s) ((s) == APR_EINPROGRESS \ 01162 || (s) == APR_OS_START_SYSERR + WSAEINPROGRESS) 01163 #define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \ 01164 || (s) == APR_OS_START_SYSERR + WSAECONNABORTED) 01165 #define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET \ 01166 || (s) == APR_OS_START_SYSERR + WSAECONNRESET) 01167 /* XXX deprecated */ 01168 #define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT \ 01169 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \ 01170 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT) 01171 #undef APR_STATUS_IS_TIMEUP 01172 #define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP \ 01173 || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \ 01174 || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT) 01175 #define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH \ 01176 || (s) == APR_OS_START_SYSERR + WSAEHOSTUNREACH) 01177 #define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH \ 01178 || (s) == APR_OS_START_SYSERR + WSAENETUNREACH) 01179 #define APR_STATUS_IS_ENETDOWN(s) ((s) == APR_OS_START_SYSERR + WSAENETDOWN) 01180 #define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE) 01181 #define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE) 01182 #define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV) 01183 #define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY) 01184 #define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_EAFNOSUPPORT \ 01185 || (s) == APR_OS_START_SYSERR + WSAEAFNOSUPPORT) 01186 01187 #else /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */ 01188 01189 /* 01190 * os error codes are clib error codes 01191 */ 01192 #define APR_FROM_OS_ERROR(e) (e) 01193 #define APR_TO_OS_ERROR(e) (e) 01194 01195 #define apr_get_os_error() (errno) 01196 #define apr_set_os_error(e) (errno = (e)) 01197 01198 /* A special case, only socket calls require this: 01199 */ 01200 #define apr_get_netos_error() (errno) 01201 #define apr_set_netos_error(e) (errno = (e)) 01202 01203 /** 01204 * @addtogroup APR_STATUS_IS 01205 * @{ 01206 */ 01207 01208 /** permission denied */ 01209 #define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES) 01210 /** file exists */ 01211 #define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST) 01212 /** path name is too long */ 01213 #define APR_STATUS_IS_ENAMETOOLONG(s) ((s) == APR_ENAMETOOLONG) 01214 /** 01215 * no such file or directory 01216 * @remark 01217 * EMVSCATLG can be returned by the automounter on z/OS for 01218 * paths which do not exist. 01219 */ 01220 #ifdef EMVSCATLG 01221 #define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT \ 01222 || (s) == EMVSCATLG) 01223 #else 01224 #define APR_STATUS_IS_ENOENT(s) ((s) == APR_ENOENT) 01225 #endif 01226 /** not a directory */ 01227 #define APR_STATUS_IS_ENOTDIR(s) ((s) == APR_ENOTDIR) 01228 /** no space left on device */ 01229 #ifdef EDQUOT 01230 #define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC \ 01231 || (s) == EDQUOT) 01232 #else 01233 #define APR_STATUS_IS_ENOSPC(s) ((s) == APR_ENOSPC) 01234 #endif 01235 /** not enough memory */ 01236 #define APR_STATUS_IS_ENOMEM(s) ((s) == APR_ENOMEM) 01237 /** too many open files */ 01238 #define APR_STATUS_IS_EMFILE(s) ((s) == APR_EMFILE) 01239 /** file table overflow */ 01240 #define APR_STATUS_IS_ENFILE(s) ((s) == APR_ENFILE) 01241 /** bad file # */ 01242 #define APR_STATUS_IS_EBADF(s) ((s) == APR_EBADF) 01243 /** invalid argument */ 01244 #define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL) 01245 /** illegal seek */ 01246 #define APR_STATUS_IS_ESPIPE(s) ((s) == APR_ESPIPE) 01247 01248 /** operation would block */ 01249 #if !defined(EWOULDBLOCK) || !defined(EAGAIN) 01250 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN) 01251 #elif (EWOULDBLOCK == EAGAIN) 01252 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN) 01253 #else 01254 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN \ 01255 || (s) == EWOULDBLOCK) 01256 #endif 01257 01258 /** interrupted system call */ 01259 #define APR_STATUS_IS_EINTR(s) ((s) == APR_EINTR) 01260 /** socket operation on a non-socket */ 01261 #define APR_STATUS_IS_ENOTSOCK(s) ((s) == APR_ENOTSOCK) 01262 /** Connection Refused */ 01263 #define APR_STATUS_IS_ECONNREFUSED(s) ((s) == APR_ECONNREFUSED) 01264 /** operation now in progress */ 01265 #define APR_STATUS_IS_EINPROGRESS(s) ((s) == APR_EINPROGRESS) 01266 01267 /** 01268 * Software caused connection abort 01269 * @remark 01270 * EPROTO on certain older kernels really means ECONNABORTED, so we need to 01271 * ignore it for them. See discussion in new-httpd archives nh.9701 & nh.9603 01272 * 01273 * There is potentially a bug in Solaris 2.x x<6, and other boxes that 01274 * implement tcp sockets in userland (i.e. on top of STREAMS). On these 01275 * systems, EPROTO can actually result in a fatal loop. See PR#981 for 01276 * example. It's hard to handle both uses of EPROTO. 01277 */ 01278 #ifdef EPROTO 01279 #define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED \ 01280 || (s) == EPROTO) 01281 #else 01282 #define APR_STATUS_IS_ECONNABORTED(s) ((s) == APR_ECONNABORTED) 01283 #endif 01284 01285 /** Connection Reset by peer */ 01286 #define APR_STATUS_IS_ECONNRESET(s) ((s) == APR_ECONNRESET) 01287 /** Operation timed out 01288 * @deprecated */ 01289 #define APR_STATUS_IS_ETIMEDOUT(s) ((s) == APR_ETIMEDOUT) 01290 /** no route to host */ 01291 #define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH) 01292 /** network is unreachable */ 01293 #define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH) 01294 /** inappropiate file type or format */ 01295 #define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE) 01296 /** broken pipe */ 01297 #define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE) 01298 /** cross device link */ 01299 #define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV) 01300 /** Directory Not Empty */ 01301 #define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY || \ 01302 (s) == APR_EEXIST) 01303 /** Address Family not supported */ 01304 #define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_EAFNOSUPPORT) 01305 /** @} */ 01306 01307 #endif /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */ 01308 01309 /** @} */ 01310 01311 #ifdef __cplusplus 01312 } 01313 #endif 01314 01315 #endif /* ! APR_ERRNO_H */
1.7.5