authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2021-05-01 11:03:59+02:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2021-05-01 11:03:59+02:00
log527053a4e40acb1403dcb3e1c8534fe0de07b3e3
treec307c262fac1ebc0879b3c327ff5d85b4c447e9a
parent51f80deaf6e7377f34c3fd4d68b8ad03b5de3bfb

std: Import correct errno defs for SPARC

Taken from Linux arch/sparc/include/uapi/asm/errno.h

3 files changed, 149 insertions(+), 0 deletions(-)

lib/std/os/bits/linux.zig+1
......@@ -10,6 +10,7 @@ usingnamespace @import("../bits.zig");
1010
1111pub usingnamespace switch (builtin.arch) {
1212 .mips, .mipsel => @import("linux/errno-mips.zig"),
13 .sparc, .sparcel, .sparcv9 => @import("linux/errno-sparc.zig"),
1314 else => @import("linux/errno-generic.zig"),
1415};
1516
lib/std/os/bits/linux/errno-mips.zig+4
......@@ -3,6 +3,9 @@
33// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
44// The MIT license requires this copyright notice to be included in all copies
55// and substantial portions of the software.
6
7// These are MIPS ABI compatible.
8
69pub const EPERM = 1;
710pub const ENOENT = 2;
811pub const ESRCH = 3;
......@@ -37,6 +40,7 @@ pub const EMLINK = 31;
3740pub const EPIPE = 32;
3841pub const EDOM = 33;
3942pub const ERANGE = 34;
43
4044pub const ENOMSG = 35;
4145pub const EIDRM = 36;
4246pub const ECHRNG = 37;
lib/std/os/bits/linux/errno-sparc.zig created+144
......@@ -0,0 +1,144 @@
1// SPDX-License-Identifier: MIT
2// Copyright (c) 2015-2021 Zig Contributors
3// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
4// The MIT license requires this copyright notice to be included in all copies
5// and substantial portions of the software.
6
7// These match the SunOS error numbering scheme.
8
9pub const EPERM = 1;
10pub const ENOENT = 2;
11pub const ESRCH = 3;
12pub const EINTR = 4;
13pub const EIO = 5;
14pub const ENXIO = 6;
15pub const E2BIG = 7;
16pub const ENOEXEC = 8;
17pub const EBADF = 9;
18pub const ECHILD = 10;
19pub const EAGAIN = 11;
20pub const ENOMEM = 12;
21pub const EACCES = 13;
22pub const EFAULT = 14;
23pub const ENOTBLK = 15;
24pub const EBUSY = 16;
25pub const EEXIST = 17;
26pub const EXDEV = 18;
27pub const ENODEV = 19;
28pub const ENOTDIR = 20;
29pub const EISDIR = 21;
30pub const EINVAL = 22;
31pub const ENFILE = 23;
32pub const EMFILE = 24;
33pub const ENOTTY = 25;
34pub const ETXTBSY = 26;
35pub const EFBIG = 27;
36pub const ENOSPC = 28;
37pub const ESPIPE = 29;
38pub const EROFS = 30;
39pub const EMLINK = 31;
40pub const EPIPE = 32;
41pub const EDOM = 33;
42pub const ERANGE = 34;
43
44pub const EWOULDBLOCK = EAGAIN;
45pub const EINPROGRESS = 36;
46pub const EALREADY = 37;
47pub const ENOTSOCK = 38;
48pub const EDESTADDRREQ = 39;
49pub const EMSGSIZE = 40;
50pub const EPROTOTYPE = 41;
51pub const ENOPROTOOPT = 42;
52pub const EPROTONOSUPPORT = 43;
53pub const ESOCKTNOSUPPORT = 44;
54pub const EOPNOTSUPP = 45;
55pub const EPFNOSUPPORT = 46;
56pub const EAFNOSUPPORT = 47;
57pub const EADDRINUSE = 48;
58pub const EADDRNOTAVAIL = 49;
59pub const ENETDOWN = 50;
60pub const ENETUNREACH = 51;
61pub const ENETRESET = 52;
62pub const ECONNABORTED = 53;
63pub const ECONNRESET = 54;
64pub const ENOBUFS = 55;
65pub const EISCONN = 56;
66pub const ENOTCONN = 57;
67pub const ESHUTDOWN = 58;
68pub const ETOOMANYREFS = 59;
69pub const ETIMEDOUT = 60;
70pub const ECONNREFUSED = 61;
71pub const ELOOP = 62;
72pub const ENAMETOOLONG = 63;
73pub const EHOSTDOWN = 64;
74pub const EHOSTUNREACH = 65;
75pub const ENOTEMPTY = 66;
76pub const EPROCLIM = 67;
77pub const EUSERS = 68;
78pub const EDQUOT = 69;
79pub const ESTALE = 70;
80pub const EREMOTE = 71;
81pub const ENOSTR = 72;
82pub const ETIME = 73;
83pub const ENOSR = 74;
84pub const ENOMSG = 75;
85pub const EBADMSG = 76;
86pub const EIDRM = 77;
87pub const EDEADLK = 78;
88pub const ENOLCK = 79;
89pub const ENONET = 80;
90pub const ERREMOTE = 81;
91pub const ENOLINK = 82;
92pub const EADV = 83;
93pub const ESRMNT = 84;
94pub const ECOMM = 85;
95pub const EPROTO = 86;
96pub const EMULTIHOP = 87;
97pub const EDOTDOT = 88;
98pub const EREMCHG = 89;
99pub const ENOSYS = 90;
100pub const ESTRPIPE = 91;
101pub const EOVERFLOW = 92;
102pub const EBADFD = 93;
103pub const ECHRNG = 94;
104pub const EL2NSYNC = 95;
105pub const EL3HLT = 96;
106pub const EL3RST = 97;
107pub const ELNRNG = 98;
108pub const EUNATCH = 99;
109pub const ENOCSI = 100;
110pub const EL2HLT = 101;
111pub const EBADE = 102;
112pub const EBADR = 103;
113pub const EXFULL = 104;
114pub const ENOANO = 105;
115pub const EBADRQC = 106;
116pub const EBADSLT = 107;
117pub const EDEADLOCK = 108;
118pub const EBFONT = 109;
119pub const ELIBEXEC = 110;
120pub const ENODATA = 111;
121pub const ELIBBAD = 112;
122pub const ENOPKG = 113;
123pub const ELIBACC = 114;
124pub const ENOTUNIQ = 115;
125pub const ERESTART = 116;
126pub const EUCLEAN = 117;
127pub const ENOTNAM = 118;
128pub const ENAVAIL = 119;
129pub const EISNAM = 120;
130pub const EREMOTEIO = 121;
131pub const EILSEQ = 122;
132pub const ELIBMAX = 123;
133pub const ELIBSCN = 124;
134pub const ENOMEDIUM = 125;
135pub const EMEDIUMTYPE = 126;
136pub const ECANCELED = 127;
137pub const ENOKEY = 128;
138pub const EKEYEXPIRED = 129;
139pub const EKEYREVOKED = 130;
140pub const EKEYREJECTED = 131;
141pub const EOWNERDEAD = 132;
142pub const ENOTRECOVERABLE = 133;
143pub const ERFKILL = 134;
144pub const EHWPOISON = 135;