1 /* Target errno mappings for newlib/libgloss environment. 2 Copyright 1995-2023 Free Software Foundation, Inc. 3 Contributed by Mike Frysinger. 4 5 This file is part of simulators. 6 7 This program is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 3 of the License, or 10 (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 19 20 /* This must come before any other includes. */ 21 #include "defs.h" 22 23 #include <errno.h> 24 25 #include "sim/callback.h" 26 27 /* This file is kept up-to-date via the gennltvals.py script. Do not edit 28 anything between the START & END comment blocks below. */ 29 30 CB_TARGET_DEFS_MAP cb_init_errno_map[] = { 31 /* gennltvals: START */ 32 #ifdef E2BIG 33 { "E2BIG", E2BIG, 7 }, 34 #endif 35 #ifdef EACCES 36 { "EACCES", EACCES, 13 }, 37 #endif 38 #ifdef EADDRINUSE 39 { "EADDRINUSE", EADDRINUSE, 112 }, 40 #endif 41 #ifdef EADDRNOTAVAIL 42 { "EADDRNOTAVAIL", EADDRNOTAVAIL, 125 }, 43 #endif 44 #ifdef EAFNOSUPPORT 45 { "EAFNOSUPPORT", EAFNOSUPPORT, 106 }, 46 #endif 47 #ifdef EAGAIN 48 { "EAGAIN", EAGAIN, 11 }, 49 #endif 50 #ifdef EALREADY 51 { "EALREADY", EALREADY, 120 }, 52 #endif 53 #ifdef EBADF 54 { "EBADF", EBADF, 9 }, 55 #endif 56 #ifdef EBADMSG 57 { "EBADMSG", EBADMSG, 77 }, 58 #endif 59 #ifdef EBUSY 60 { "EBUSY", EBUSY, 16 }, 61 #endif 62 #ifdef ECANCELED 63 { "ECANCELED", ECANCELED, 140 }, 64 #endif 65 #ifdef ECHILD 66 { "ECHILD", ECHILD, 10 }, 67 #endif 68 #ifdef ECONNABORTED 69 { "ECONNABORTED", ECONNABORTED, 113 }, 70 #endif 71 #ifdef ECONNREFUSED 72 { "ECONNREFUSED", ECONNREFUSED, 111 }, 73 #endif 74 #ifdef ECONNRESET 75 { "ECONNRESET", ECONNRESET, 104 }, 76 #endif 77 #ifdef EDEADLK 78 { "EDEADLK", EDEADLK, 45 }, 79 #endif 80 #ifdef EDESTADDRREQ 81 { "EDESTADDRREQ", EDESTADDRREQ, 121 }, 82 #endif 83 #ifdef EDOM 84 { "EDOM", EDOM, 33 }, 85 #endif 86 #ifdef EDQUOT 87 { "EDQUOT", EDQUOT, 132 }, 88 #endif 89 #ifdef EEXIST 90 { "EEXIST", EEXIST, 17 }, 91 #endif 92 #ifdef EFAULT 93 { "EFAULT", EFAULT, 14 }, 94 #endif 95 #ifdef EFBIG 96 { "EFBIG", EFBIG, 27 }, 97 #endif 98 #ifdef EFTYPE 99 { "EFTYPE", EFTYPE, 79 }, 100 #endif 101 #ifdef EHOSTDOWN 102 { "EHOSTDOWN", EHOSTDOWN, 117 }, 103 #endif 104 #ifdef EHOSTUNREACH 105 { "EHOSTUNREACH", EHOSTUNREACH, 118 }, 106 #endif 107 #ifdef EIDRM 108 { "EIDRM", EIDRM, 36 }, 109 #endif 110 #ifdef EILSEQ 111 { "EILSEQ", EILSEQ, 138 }, 112 #endif 113 #ifdef EINPROGRESS 114 { "EINPROGRESS", EINPROGRESS, 119 }, 115 #endif 116 #ifdef EINTR 117 { "EINTR", EINTR, 4 }, 118 #endif 119 #ifdef EINVAL 120 { "EINVAL", EINVAL, 22 }, 121 #endif 122 #ifdef EIO 123 { "EIO", EIO, 5 }, 124 #endif 125 #ifdef EISCONN 126 { "EISCONN", EISCONN, 127 }, 127 #endif 128 #ifdef EISDIR 129 { "EISDIR", EISDIR, 21 }, 130 #endif 131 #ifdef ELOOP 132 { "ELOOP", ELOOP, 92 }, 133 #endif 134 #ifdef EMFILE 135 { "EMFILE", EMFILE, 24 }, 136 #endif 137 #ifdef EMLINK 138 { "EMLINK", EMLINK, 31 }, 139 #endif 140 #ifdef EMSGSIZE 141 { "EMSGSIZE", EMSGSIZE, 122 }, 142 #endif 143 #ifdef EMULTIHOP 144 { "EMULTIHOP", EMULTIHOP, 74 }, 145 #endif 146 #ifdef ENAMETOOLONG 147 { "ENAMETOOLONG", ENAMETOOLONG, 91 }, 148 #endif 149 #ifdef ENETDOWN 150 { "ENETDOWN", ENETDOWN, 115 }, 151 #endif 152 #ifdef ENETRESET 153 { "ENETRESET", ENETRESET, 126 }, 154 #endif 155 #ifdef ENETUNREACH 156 { "ENETUNREACH", ENETUNREACH, 114 }, 157 #endif 158 #ifdef ENFILE 159 { "ENFILE", ENFILE, 23 }, 160 #endif 161 #ifdef ENOBUFS 162 { "ENOBUFS", ENOBUFS, 105 }, 163 #endif 164 #ifdef ENODATA 165 { "ENODATA", ENODATA, 61 }, 166 #endif 167 #ifdef ENODEV 168 { "ENODEV", ENODEV, 19 }, 169 #endif 170 #ifdef ENOENT 171 { "ENOENT", ENOENT, 2 }, 172 #endif 173 #ifdef ENOEXEC 174 { "ENOEXEC", ENOEXEC, 8 }, 175 #endif 176 #ifdef ENOLCK 177 { "ENOLCK", ENOLCK, 46 }, 178 #endif 179 #ifdef ENOLINK 180 { "ENOLINK", ENOLINK, 67 }, 181 #endif 182 #ifdef ENOMEM 183 { "ENOMEM", ENOMEM, 12 }, 184 #endif 185 #ifdef ENOMSG 186 { "ENOMSG", ENOMSG, 35 }, 187 #endif 188 #ifdef ENOPROTOOPT 189 { "ENOPROTOOPT", ENOPROTOOPT, 109 }, 190 #endif 191 #ifdef ENOSPC 192 { "ENOSPC", ENOSPC, 28 }, 193 #endif 194 #ifdef ENOSR 195 { "ENOSR", ENOSR, 63 }, 196 #endif 197 #ifdef ENOSTR 198 { "ENOSTR", ENOSTR, 60 }, 199 #endif 200 #ifdef ENOSYS 201 { "ENOSYS", ENOSYS, 88 }, 202 #endif 203 #ifdef ENOTCONN 204 { "ENOTCONN", ENOTCONN, 128 }, 205 #endif 206 #ifdef ENOTDIR 207 { "ENOTDIR", ENOTDIR, 20 }, 208 #endif 209 #ifdef ENOTEMPTY 210 { "ENOTEMPTY", ENOTEMPTY, 90 }, 211 #endif 212 #ifdef ENOTRECOVERABLE 213 { "ENOTRECOVERABLE", ENOTRECOVERABLE, 141 }, 214 #endif 215 #ifdef ENOTSOCK 216 { "ENOTSOCK", ENOTSOCK, 108 }, 217 #endif 218 #ifdef ENOTSUP 219 { "ENOTSUP", ENOTSUP, 134 }, 220 #endif 221 #ifdef ENOTTY 222 { "ENOTTY", ENOTTY, 25 }, 223 #endif 224 #ifdef ENXIO 225 { "ENXIO", ENXIO, 6 }, 226 #endif 227 #ifdef EOPNOTSUPP 228 { "EOPNOTSUPP", EOPNOTSUPP, 95 }, 229 #endif 230 #ifdef EOVERFLOW 231 { "EOVERFLOW", EOVERFLOW, 139 }, 232 #endif 233 #ifdef EOWNERDEAD 234 { "EOWNERDEAD", EOWNERDEAD, 142 }, 235 #endif 236 #ifdef EPERM 237 { "EPERM", EPERM, 1 }, 238 #endif 239 #ifdef EPFNOSUPPORT 240 { "EPFNOSUPPORT", EPFNOSUPPORT, 96 }, 241 #endif 242 #ifdef EPIPE 243 { "EPIPE", EPIPE, 32 }, 244 #endif 245 #ifdef EPROTO 246 { "EPROTO", EPROTO, 71 }, 247 #endif 248 #ifdef EPROTONOSUPPORT 249 { "EPROTONOSUPPORT", EPROTONOSUPPORT, 123 }, 250 #endif 251 #ifdef EPROTOTYPE 252 { "EPROTOTYPE", EPROTOTYPE, 107 }, 253 #endif 254 #ifdef ERANGE 255 { "ERANGE", ERANGE, 34 }, 256 #endif 257 #ifdef EROFS 258 { "EROFS", EROFS, 30 }, 259 #endif 260 #ifdef ESPIPE 261 { "ESPIPE", ESPIPE, 29 }, 262 #endif 263 #ifdef ESRCH 264 { "ESRCH", ESRCH, 3 }, 265 #endif 266 #ifdef ESTALE 267 { "ESTALE", ESTALE, 133 }, 268 #endif 269 #ifdef ETIME 270 { "ETIME", ETIME, 62 }, 271 #endif 272 #ifdef ETIMEDOUT 273 { "ETIMEDOUT", ETIMEDOUT, 116 }, 274 #endif 275 #ifdef ETOOMANYREFS 276 { "ETOOMANYREFS", ETOOMANYREFS, 129 }, 277 #endif 278 #ifdef ETXTBSY 279 { "ETXTBSY", ETXTBSY, 26 }, 280 #endif 281 #ifdef EWOULDBLOCK 282 { "EWOULDBLOCK", EWOULDBLOCK, 11 }, 283 #endif 284 #ifdef EXDEV 285 { "EXDEV", EXDEV, 18 }, 286 #endif 287 /* gennltvals: END */ 288 { NULL, -1, -1 }, 289 }; 290