OLD | NEW |
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 /* This Source Code Form is subject to the terms of the Mozilla Public | 2 /* This Source Code Form is subject to the terms of the Mozilla Public |
3 * License, v. 2.0. If a copy of the MPL was not distributed with this | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 | 5 |
6 #include "primpl.h" | 6 #include "primpl.h" |
7 #if defined(_PR_POLL_AVAILABLE) | 7 #if defined(_PR_POLL_AVAILABLE) |
8 #include <poll.h> | 8 #include <poll.h> |
9 #endif | 9 #endif |
10 #include <errno.h> | 10 #include <errno.h> |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 case EEXIST: | 73 case EEXIST: |
74 prError = PR_FILE_EXISTS_ERROR; | 74 prError = PR_FILE_EXISTS_ERROR; |
75 break; | 75 break; |
76 case EFAULT: | 76 case EFAULT: |
77 prError = PR_ACCESS_FAULT_ERROR; | 77 prError = PR_ACCESS_FAULT_ERROR; |
78 break; | 78 break; |
79 case EFBIG: | 79 case EFBIG: |
80 prError = PR_FILE_TOO_BIG_ERROR; | 80 prError = PR_FILE_TOO_BIG_ERROR; |
81 break; | 81 break; |
82 case EHOSTUNREACH: | 82 case EHOSTUNREACH: |
| 83 case EHOSTDOWN: |
83 prError = PR_HOST_UNREACHABLE_ERROR; | 84 prError = PR_HOST_UNREACHABLE_ERROR; |
84 break; | 85 break; |
85 case EINPROGRESS: | 86 case EINPROGRESS: |
86 prError = PR_IN_PROGRESS_ERROR; | 87 prError = PR_IN_PROGRESS_ERROR; |
87 break; | 88 break; |
88 case EINTR: | 89 case EINTR: |
89 prError = PR_PENDING_INTERRUPT_ERROR; | 90 prError = PR_PENDING_INTERRUPT_ERROR; |
90 break; | 91 break; |
91 case EINVAL: | 92 case EINVAL: |
92 prError = PR_INVALID_ARGUMENT_ERROR; | 93 prError = PR_INVALID_ARGUMENT_ERROR; |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 } | 524 } |
524 | 525 |
525 void _MD_unix_map_connect_error(int err) | 526 void _MD_unix_map_connect_error(int err) |
526 { | 527 { |
527 PRErrorCode prError; | 528 PRErrorCode prError; |
528 | 529 |
529 switch (err) { | 530 switch (err) { |
530 case EACCES: | 531 case EACCES: |
531 prError = PR_ADDRESS_NOT_SUPPORTED_ERROR; | 532 prError = PR_ADDRESS_NOT_SUPPORTED_ERROR; |
532 break; | 533 break; |
533 #if defined(UNIXWARE) || defined(SNI) || defined(NEC) | 534 #if defined(UNIXWARE) |
534 /* | 535 /* |
535 * On some platforms, if we connect to a port on the local host | 536 * On some platforms, if we connect to a port on the local host |
536 * (the loopback address) that no process is listening on, we get | 537 * (the loopback address) that no process is listening on, we get |
537 * EIO instead of ECONNREFUSED. | 538 * EIO instead of ECONNREFUSED. |
538 */ | 539 */ |
539 case EIO: | 540 case EIO: |
540 prError = PR_CONNECT_REFUSED_ERROR; | 541 prError = PR_CONNECT_REFUSED_ERROR; |
541 break; | 542 break; |
542 #endif | 543 #endif |
543 case ELOOP: | 544 case ELOOP: |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 PR_SetError(prError, err); | 840 PR_SetError(prError, err); |
840 } | 841 } |
841 #endif /* SOLARIS */ | 842 #endif /* SOLARIS */ |
842 | 843 |
843 #ifdef LINUX | 844 #ifdef LINUX |
844 void _MD_linux_map_sendfile_error(int err) | 845 void _MD_linux_map_sendfile_error(int err) |
845 { | 846 { |
846 _MD_unix_map_default_error(err) ; | 847 _MD_unix_map_default_error(err) ; |
847 } | 848 } |
848 #endif /* LINUX */ | 849 #endif /* LINUX */ |
OLD | NEW |