17 #include "apr_arch_misc.h" 43 return "Could not perform a stat on the file.";
45 return "A new pool could not be created.";
47 return "An invalid date has been provided";
49 return "An invalid socket was returned";
51 return "No process was provided and one was required.";
53 return "No time was provided and one was required.";
55 return "No directory was provided and one was required.";
57 return "No lock was provided and one was required.";
59 return "No poll structure was provided and one was required.";
61 return "No socket was provided and one was required.";
63 return "No thread was provided and one was required.";
65 return "No thread key structure was provided and one was required.";
67 return "No shared memory is currently available";
69 #if APR_HAS_DSO && defined(HAVE_LIBDL) 72 return "DSO load failed";
75 return "The specified IP address is invalid.";
77 return "The specified network mask is invalid.";
79 return "Could not find the requested symbol.";
81 return "Not enough entropy to continue.";
84 "Your code just forked, and you are currently executing in the " 88 "Your code just forked, and you are currently executing in the " 91 return "The specified thread is detached";
93 return "The specified thread is not detached";
95 return "The specified child process is done executing";
97 return "The specified child process is not done executing";
99 return "The timeout specified has expired";
101 return "Partial results are valid but processing is incomplete";
103 return "Bad character specified on command line";
105 return "Missing parameter for the specified command line option";
107 return "End of file found";
109 return "Could not find specified socket in poll list.";
111 return "Shared memory is implemented anonymously";
113 return "Shared memory is implemented using files";
115 return "Shared memory is implemented using a key system";
118 "There is no error, this value signifies an initialized " 121 return "This function has not been implemented on this platform";
123 return "passwords do not match";
125 return "The given path is absolute";
127 return "The given path is relative";
129 return "The given path is incomplete";
131 return "The given path was above the root path";
133 return "The given path is misformatted or contained invalid characters";
135 return "The given path contained wildcard characters";
137 return "The given lock was busy.";
139 return "The process is not recognized.";
141 return "Internal error (specific information not available)";
143 return "Error string not specified yet";
161 if (
err >= 10000 &&
err < 12000) {
166 "OSO001.MSG", &
len) == 0) {
193 #elif defined(WIN32) || (defined(NETWARE) && defined(USE_WINSOCK)) 195 static const struct {
199 {WSAEINTR,
"Interrupted system call"},
200 {WSAEBADF,
"Bad file number"},
201 {WSAEACCES,
"Permission denied"},
202 {WSAEFAULT,
"Bad address"},
203 {WSAEINVAL,
"Invalid argument"},
204 {WSAEMFILE,
"Too many open sockets"},
205 {WSAEWOULDBLOCK,
"Operation would block"},
206 {WSAEINPROGRESS,
"Operation now in progress"},
207 {WSAEALREADY,
"Operation already in progress"},
208 {WSAENOTSOCK,
"Socket operation on non-socket"},
209 {WSAEDESTADDRREQ,
"Destination address required"},
210 {WSAEMSGSIZE,
"Message too long"},
211 {WSAEPROTOTYPE,
"Protocol wrong type for socket"},
212 {WSAENOPROTOOPT,
"Bad protocol option"},
213 {WSAEPROTONOSUPPORT,
"Protocol not supported"},
214 {WSAESOCKTNOSUPPORT,
"Socket type not supported"},
215 {WSAEOPNOTSUPP,
"Operation not supported on socket"},
216 {WSAEPFNOSUPPORT,
"Protocol family not supported"},
217 {WSAEAFNOSUPPORT,
"Address family not supported"},
218 {WSAEADDRINUSE,
"Address already in use"},
219 {WSAEADDRNOTAVAIL,
"Can't assign requested address"},
220 {WSAENETDOWN,
"Network is down"},
221 {WSAENETUNREACH,
"Network is unreachable"},
222 {WSAENETRESET,
"Net connection reset"},
223 {WSAECONNABORTED,
"Software caused connection abort"},
224 {WSAECONNRESET,
"Connection reset by peer"},
225 {WSAENOBUFS,
"No buffer space available"},
226 {WSAEISCONN,
"Socket is already connected"},
227 {WSAENOTCONN,
"Socket is not connected"},
228 {WSAESHUTDOWN,
"Can't send after socket shutdown"},
229 {WSAETOOMANYREFS,
"Too many references, can't splice"},
230 {WSAETIMEDOUT,
"Connection timed out"},
231 {WSAECONNREFUSED,
"Connection refused"},
232 {WSAELOOP,
"Too many levels of symbolic links"},
233 {WSAENAMETOOLONG,
"File name too long"},
234 {WSAEHOSTDOWN,
"Host is down"},
235 {WSAEHOSTUNREACH,
"No route to host"},
236 {WSAENOTEMPTY,
"Directory not empty"},
237 {WSAEPROCLIM,
"Too many processes"},
238 {WSAEUSERS,
"Too many users"},
239 {WSAEDQUOT,
"Disc quota exceeded"},
240 {WSAESTALE,
"Stale NFS file handle"},
241 {WSAEREMOTE,
"Too many levels of remote in path"},
242 {WSASYSNOTREADY,
"Network system is unavailable"},
243 {WSAVERNOTSUPPORTED,
"Winsock version out of range"},
244 {WSANOTINITIALISED,
"WSAStartup not yet called"},
245 {WSAEDISCON,
"Graceful shutdown in progress"},
246 {WSAHOST_NOT_FOUND,
"Host not found"},
247 {WSANO_DATA,
"No host data of that type was found"},
258 len = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM
259 | FORMAT_MESSAGE_IGNORE_INSERTS,
262 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
267 LPTSTR msg = (LPTSTR)
buf;
268 len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM
269 | FORMAT_MESSAGE_IGNORE_INSERTS,
272 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
277 for(i = 0; i <=
len; i++) {
278 if (msg[i] < 0x80 && msg[i] >= 0) {
279 buf[i] = (char) msg[i];
288 for (i = 0; gaErrorList[i].msg; ++i) {
289 if (gaErrorList[i].code == errcode) {
290 apr_cpystrn(
buf, gaErrorList[i].msg,
bufsize);
307 if ((
buf[i] ==
'\r') || (
buf[i] ==
'\n'))
314 apr_snprintf(
buf,
bufsize,
"Unrecognized Win32 error code %d", errcode);
326 #ifdef HAVE_HSTRERROR 333 msg =
"Unknown host";
337 #if defined(NO_ADDRESS) && (NO_DATA != NO_ADDRESS) 340 msg =
"No address for host";
342 #elif defined(NO_ADDRESS) 344 msg =
"No address for host";
348 msg =
"Unrecognized resolver error";
355 #if defined(HAVE_STRERROR_R) && defined(STRERROR_R_RC_INT) && !defined(BEOS) 362 "APR does not understand this error code");
368 #elif defined(HAVE_STRERROR_R) 376 const char *strerror_r(
apr_status_t,
char *, apr_size_t);
386 if (
buf[0] ==
'\0') {
402 sprintf(
err,
"Native Error #%d", statcode);
405 const char *
err = strerror(statcode);
410 "APR does not understand this error code");
429 #if defined(HAVE_GAI_STRERROR) 431 #if defined(NEGATIVE_EAI) 432 statcode = -statcode;