Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: pkg/os/lib/src/errno.dart

Issue 2203023002: Make arch-specific constants dependent on sys.info().machine (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Minor modifications. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/os/lib/src/system_linux.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/os/lib/src/system_linux.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698