| OLD | NEW |
| 1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 part of os; | 5 part of os; |
| 6 | 6 |
| 7 final Errnos errnos = _getErrnos(); | 7 final Errnos errnos = _getErrnos(); |
| 8 | 8 |
| 9 Errnos _getErrnos() { | 9 Errnos _getErrnos() { |
| 10 switch (Foreign.platform) { | 10 switch (Foreign.platform) { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 int get ENOSPC => 28; | 94 int get ENOSPC => 28; |
| 95 int get ESPIPE => 29; | 95 int get ESPIPE => 29; |
| 96 int get EROFS => 30; | 96 int get EROFS => 30; |
| 97 int get EMLINK => 31; | 97 int get EMLINK => 31; |
| 98 int get EPIPE => 32; | 98 int get EPIPE => 32; |
| 99 int get EDOM => 33; | 99 int get EDOM => 33; |
| 100 int get ERANGE => 34; | 100 int get ERANGE => 34; |
| 101 } | 101 } |
| 102 | 102 |
| 103 class _LinuxErrnos extends _PosixErrnos { | 103 class _LinuxErrnos extends _PosixErrnos { |
| 104 int get EADDRNOTAVAIL => 99; | 104 static final bool isMips = sys.info().machine == 'mips'; |
| 105 int get EINPROGRESS => 115; | 105 int get EADDRNOTAVAIL => isMips ? 126 : 99; |
| 106 int get EINPROGRESS => isMips ? 150 : 115; |
| 106 } | 107 } |
| 107 | 108 |
| 108 class _MacOSErrnos extends _PosixErrnos { | 109 class _MacOSErrnos extends _PosixErrnos { |
| 109 int get EADDRNOTAVAIL => 49; | 110 int get EADDRNOTAVAIL => 49; |
| 110 int get EINPROGRESS => 36; | 111 int get EINPROGRESS => 36; |
| 111 } | 112 } |
| OLD | NEW |