28 #if defined (HAVE_CONFIG_H)
50 static errno_struct errno_codes[] =
60 #if defined (EADDRINUSE)
61 {
"EADDRINUSE", EADDRINUSE },
63 #if defined (EADDRNOTAVAIL)
64 {
"EADDRNOTAVAIL", EADDRNOTAVAIL },
66 #if defined (EAFNOSUPPORT)
67 {
"EAFNOSUPPORT", EAFNOSUPPORT },
72 #if defined (EALREADY)
73 {
"EALREADY", EALREADY },
84 #if defined (ECONNABORTED)
85 {
"ECONNABORTED", ECONNABORTED },
87 #if defined (ECONNREFUSED)
88 {
"ECONNREFUSED", ECONNREFUSED },
90 #if defined (ECONNRESET)
91 {
"ECONNRESET", ECONNRESET },
94 {
"EDEADLK", EDEADLK },
96 #if defined (EDESTADDRREQ)
97 {
"EDESTADDRREQ", EDESTADDRREQ },
103 {
"EDQUOT", EDQUOT },
106 {
"EEXIST", EEXIST },
109 {
"EFAULT", EFAULT },
114 #if defined (EHOSTDOWN)
115 {
"EHOSTDOWN", EHOSTDOWN },
117 #if defined (EHOSTUNREACH)
118 {
"EHOSTUNREACH", EHOSTUNREACH },
120 #if defined (EINPROGRESS)
121 {
"EINPROGRESS", EINPROGRESS },
127 {
"EINVAL", EINVAL },
132 #if defined (EISCONN)
133 {
"EISCONN", EISCONN },
136 {
"EISDIR", EISDIR },
142 {
"EMFILE", EMFILE },
145 {
"EMLINK", EMLINK },
147 #if defined (EMSGSIZE)
148 {
"EMSGSIZE", EMSGSIZE },
150 #if defined (ENAMETOOLONG)
151 {
"ENAMETOOLONG", ENAMETOOLONG },
153 #if defined (ENETDOWN)
154 {
"ENETDOWN", ENETDOWN },
156 #if defined (ENETRESET)
157 {
"ENETRESET", ENETRESET },
159 #if defined (ENETUNREACH)
160 {
"ENETUNREACH", ENETUNREACH },
163 {
"ENFILE", ENFILE },
165 #if defined (ENOBUFS)
166 {
"ENOBUFS", ENOBUFS },
169 {
"ENODEV", ENODEV },
172 {
"ENOENT", ENOENT },
174 #if defined (ENOEXEC)
175 {
"ENOEXEC", ENOEXEC },
178 {
"ENOLCK", ENOLCK },
181 {
"ENOMEM", ENOMEM },
183 #if defined (ENOPROTOOPT)
184 {
"ENOPROTOOPT", ENOPROTOOPT },
187 {
"ENOSPC", ENOSPC },
190 {
"ENOSYS", ENOSYS },
192 #if defined (ENOTBLK)
193 {
"ENOTBLK", ENOTBLK },
195 #if defined (ENOTCONN)
196 {
"ENOTCONN", ENOTCONN },
198 #if defined (ENOTDIR)
199 {
"ENOTDIR", ENOTDIR },
201 #if defined (ENOTEMPTY)
202 {
"ENOTEMPTY", ENOTEMPTY },
204 #if defined (ENOTSOCK)
205 {
"ENOTSOCK", ENOTSOCK },
208 {
"ENOTTY", ENOTTY },
213 #if defined (EOPNOTSUPP)
214 {
"EOPNOTSUPP", EOPNOTSUPP },
219 #if defined (EPFNOSUPPORT)
220 {
"EPFNOSUPPORT", EPFNOSUPPORT },
225 #if defined (EPROTONOSUPPORT)
226 {
"EPROTONOSUPPORT", EPROTONOSUPPORT },
228 #if defined (EPROTOTYPE)
229 {
"EPROTOTYPE", EPROTOTYPE },
232 {
"ERANGE", ERANGE },
234 #if defined (EREMOTE)
235 {
"EREMOTE", EREMOTE },
237 #if defined (ERESTART)
238 {
"ERESTART", ERESTART },
243 #if defined (ESHUTDOWN)
244 {
"ESHUTDOWN", ESHUTDOWN },
246 #if defined (ESOCKTNOSUPPORT)
247 {
"ESOCKTNOSUPPORT", ESOCKTNOSUPPORT },
250 {
"ESPIPE", ESPIPE },
256 {
"ESTALE", ESTALE },
258 #if defined (ETIMEDOUT)
259 {
"ETIMEDOUT", ETIMEDOUT },
261 #if defined (ETOOMANYREFS)
262 {
"ETOOMANYREFS", ETOOMANYREFS },
264 #if defined (ETXTBSY)
265 {
"ETXTBSY", ETXTBSY },
268 {
"EUSERS", EUSERS },
270 #if defined (EWOULDBLOCK)
271 {
"EWOULDBLOCK", EWOULDBLOCK },
283 {
"EACCES", EACCES },
285 #if defined (EADDRINUSE)
286 {
"EADDRINUSE", EADDRINUSE },
288 #if defined (EADDRNOTAVAIL)
289 {
"EADDRNOTAVAIL", EADDRNOTAVAIL },
294 #if defined (EAFNOSUPPORT)
295 {
"EAFNOSUPPORT", EAFNOSUPPORT },
298 {
"EAGAIN", EAGAIN },
300 #if defined (EALREADY)
301 {
"EALREADY", EALREADY },
310 {
"EBADFD", EBADFD },
312 #if defined (EBADMSG)
313 {
"EBADMSG", EBADMSG },
318 #if defined (EBADRQC)
319 {
"EBADRQC", EBADRQC },
321 #if defined (EBADSLT)
322 {
"EBADSLT", EBADSLT },
325 {
"EBFONT", EBFONT },
330 #if defined (ECANCELED)
331 {
"ECANCELED", ECANCELED },
334 {
"ECHILD", ECHILD },
337 {
"ECHRNG", ECHRNG },
342 #if defined (ECONNABORTED)
343 {
"ECONNABORTED", ECONNABORTED },
345 #if defined (ECONNREFUSED)
346 {
"ECONNREFUSED", ECONNREFUSED },
348 #if defined (ECONNRESET)
349 {
"ECONNRESET", ECONNRESET },
351 #if defined (EDEADLK)
352 {
"EDEADLK", EDEADLK },
354 #if defined (EDEADLOCK)
355 {
"EDEADLOCK", EDEADLOCK },
357 #if defined (EDESTADDRREQ)
358 {
"EDESTADDRREQ", EDESTADDRREQ },
363 #if defined (EDOTDOT)
364 {
"EDOTDOT", EDOTDOT },
367 {
"EDQUOT", EDQUOT },
370 {
"EEXIST", EEXIST },
373 {
"EFAULT", EFAULT },
378 #if defined (EHOSTDOWN)
379 {
"EHOSTDOWN", EHOSTDOWN },
381 #if defined (EHOSTUNREACH)
382 {
"EHOSTUNREACH", EHOSTUNREACH },
384 #if defined (EHWPOISON)
385 {
"EHWPOISON", EHWPOISON },
391 {
"EILSEQ", EILSEQ },
393 #if defined (EINPROGRESS)
394 {
"EINPROGRESS", EINPROGRESS },
400 {
"EINVAL", EINVAL },
405 #if defined (EISCONN)
406 {
"EISCONN", EISCONN },
409 {
"EISDIR", EISDIR },
412 {
"EISNAM", EISNAM },
414 #if defined (EKEYEXPIRED)
415 {
"EKEYEXPIRED", EKEYEXPIRED },
417 #if defined (EKEYREJECTED)
418 {
"EKEYREJECTED", EKEYREJECTED },
420 #if defined (EKEYREVOKED)
421 {
"EKEYREVOKED", EKEYREVOKED },
424 {
"EL2HLT", EL2HLT },
426 #if defined (EL2NSYNC)
427 {
"EL2NSYNC", EL2NSYNC },
430 {
"EL3HLT", EL3HLT },
433 {
"EL3RST", EL3RST },
435 #if defined (ELIBACC)
436 {
"ELIBACC", ELIBACC },
438 #if defined (ELIBBAD)
439 {
"ELIBBAD", ELIBBAD },
441 #if defined (ELIBEXEC)
442 {
"ELIBEXEC", ELIBEXEC },
444 #if defined (ELIBMAX)
445 {
"ELIBMAX", ELIBMAX },
447 #if defined (ELIBSCN)
448 {
"ELIBSCN", ELIBSCN },
451 {
"ELNRNG", ELNRNG },
456 #if defined (EMEDIUMTYPE)
457 {
"EMEDIUMTYPE", EMEDIUMTYPE },
460 {
"EMFILE", EMFILE },
463 {
"EMLINK", EMLINK },
465 #if defined (EMSGSIZE)
466 {
"EMSGSIZE", EMSGSIZE },
468 #if defined (EMULTIHOP)
469 {
"EMULTIHOP", EMULTIHOP },
471 #if defined (ENAMETOOLONG)
472 {
"ENAMETOOLONG", ENAMETOOLONG },
474 #if defined (ENAVAIL)
475 {
"ENAVAIL", ENAVAIL },
477 #if defined (ENETDOWN)
478 {
"ENETDOWN", ENETDOWN },
480 #if defined (ENETRESET)
481 {
"ENETRESET", ENETRESET },
483 #if defined (ENETUNREACH)
484 {
"ENETUNREACH", ENETUNREACH },
487 {
"ENFILE", ENFILE },
490 {
"ENOANO", ENOANO },
492 #if defined (ENOBUFS)
493 {
"ENOBUFS", ENOBUFS },
496 {
"ENOCSI", ENOCSI },
498 #if defined (ENODATA)
499 {
"ENODATA", ENODATA },
502 {
"ENODEV", ENODEV },
505 {
"ENOENT", ENOENT },
507 #if defined (ENOEXEC)
508 {
"ENOEXEC", ENOEXEC },
511 {
"ENOKEY", ENOKEY },
514 {
"ENOLCK", ENOLCK },
516 #if defined (ENOLINK)
517 {
"ENOLINK", ENOLINK },
519 #if defined (ENOMEDIUM)
520 {
"ENOMEDIUM", ENOMEDIUM },
523 {
"ENOMEM", ENOMEM },
526 {
"ENOMSG", ENOMSG },
529 {
"ENONET", ENONET },
532 {
"ENOPKG", ENOPKG },
534 #if defined (ENOPROTOOPT)
535 {
"ENOPROTOOPT", ENOPROTOOPT },
538 {
"ENOSPC", ENOSPC },
544 {
"ENOSTR", ENOSTR },
547 {
"ENOSYS", ENOSYS },
549 #if defined (ENOTBLK)
550 {
"ENOTBLK", ENOTBLK },
552 #if defined (ENOTCONN)
553 {
"ENOTCONN", ENOTCONN },
555 #if defined (ENOTDIR)
556 {
"ENOTDIR", ENOTDIR },
558 #if defined (ENOTEMPTY)
559 {
"ENOTEMPTY", ENOTEMPTY },
561 #if defined (ENOTNAM)
562 {
"ENOTNAM", ENOTNAM },
564 #if defined (ENOTRECOVERABLE)
565 {
"ENOTRECOVERABLE", ENOTRECOVERABLE },
567 #if defined (ENOTSOCK)
568 {
"ENOTSOCK", ENOTSOCK },
570 #if defined (ENOTSUP)
571 {
"ENOTSUP", ENOTSUP },
574 {
"ENOTTY", ENOTTY },
576 #if defined (ENOTUNIQ)
577 {
"ENOTUNIQ", ENOTUNIQ },
582 #if defined (EOPNOTSUPP)
583 {
"EOPNOTSUPP", EOPNOTSUPP },
585 #if defined (EOVERFLOW)
586 {
"EOVERFLOW", EOVERFLOW },
588 #if defined (EOWNERDEAD)
589 {
"EOWNERDEAD", EOWNERDEAD },
594 #if defined (EPFNOSUPPORT)
595 {
"EPFNOSUPPORT", EPFNOSUPPORT },
601 {
"EPROTO", EPROTO },
603 #if defined (EPROTONOSUPPORT)
604 {
"EPROTONOSUPPORT", EPROTONOSUPPORT },
606 #if defined (EPROTOTYPE)
607 {
"EPROTOTYPE", EPROTOTYPE },
610 {
"ERANGE", ERANGE },
612 #if defined (EREMCHG)
613 {
"EREMCHG", EREMCHG },
615 #if defined (EREMOTE)
616 {
"EREMOTE", EREMOTE },
618 #if defined (EREMOTEIO)
619 {
"EREMOTEIO", EREMOTEIO },
621 #if defined (ERESTART)
622 {
"ERESTART", ERESTART },
624 #if defined (ERFKILL)
625 {
"ERFKILL", ERFKILL },
630 #if defined (ESHUTDOWN)
631 {
"ESHUTDOWN", ESHUTDOWN },
633 #if defined (ESOCKTNOSUPPORT)
634 {
"ESOCKTNOSUPPORT", ESOCKTNOSUPPORT },
637 {
"ESPIPE", ESPIPE },
643 {
"ESRMNT", ESRMNT },
646 {
"ESTALE", ESTALE },
648 #if defined (ESTRPIPE)
649 {
"ESTRPIPE", ESTRPIPE },
654 #if defined (ETIMEDOUT)
655 {
"ETIMEDOUT", ETIMEDOUT },
657 #if defined (ETOOMANYREFS)
658 {
"ETOOMANYREFS", ETOOMANYREFS },
660 #if defined (ETXTBSY)
661 {
"ETXTBSY", ETXTBSY },
663 #if defined (EUCLEAN)
664 {
"EUCLEAN", EUCLEAN },
666 #if defined (EUNATCH)
667 {
"EUNATCH", EUNATCH },
670 {
"EUSERS", EUSERS },
672 #if defined (EWOULDBLOCK)
673 {
"EWOULDBLOCK", EWOULDBLOCK },
679 {
"EXFULL", EXFULL },
688 errno_struct *ptr = errno_codes;
692 m_errno_tbl[ptr->name] = ptr->value;
714 return (
instance_ok ()) ? s_instance->do_lookup (name) : -1;
724 octave_errno::do_lookup (
const std::string& name)
726 return (m_errno_tbl.find (name) != m_errno_tbl.end ()) ? m_errno_tbl[name]
731 octave_errno::do_list ()
735 for (
const auto& p : m_errno_tbl)
737 retval.
assign (p.first, p.second);
static octave_scalar_map list()
static void cleanup_instance()
static int lookup(const std::string &name)
static bool instance_ok()
void assign(const std::string &k, const octave_value &val)