summaryrefslogtreecommitdiffabout
path: root/pwmanager/libcrypt/error/code-from-errno.h
Unidiff
Diffstat (limited to 'pwmanager/libcrypt/error/code-from-errno.h') (more/less context) (show whitespace changes)
-rw-r--r--pwmanager/libcrypt/error/code-from-errno.h158
1 files changed, 158 insertions, 0 deletions
diff --git a/pwmanager/libcrypt/error/code-from-errno.h b/pwmanager/libcrypt/error/code-from-errno.h
new file mode 100644
index 0000000..8730ff0
--- a/dev/null
+++ b/pwmanager/libcrypt/error/code-from-errno.h
@@ -0,0 +1,158 @@
1/* Output of mkerrcodes2.awk. DO NOT EDIT. */
2
3/* errnos.h - List of system error values.
4 Copyright (C) 2004 g10 Code GmbH
5 This file is part of libgpg-error.
6
7 libgpg-error is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public License
9 as published by the Free Software Foundation; either version 2.1 of
10 the License, or (at your option) any later version.
11
12 libgpg-error is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with libgpg-error; if not, write to the Free
19 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
21
22static const int err_code_from_index[] = {
23 GPG_ERR_EPERM,
24 GPG_ERR_ENOENT,
25 GPG_ERR_ESRCH,
26 GPG_ERR_EINTR,
27 GPG_ERR_EIO,
28 GPG_ERR_ENXIO,
29 GPG_ERR_E2BIG,
30 GPG_ERR_ENOEXEC,
31 GPG_ERR_EBADF,
32 GPG_ERR_ECHILD,
33 GPG_ERR_EAGAIN,
34 GPG_ERR_EWOULDBLOCK,
35 GPG_ERR_ENOMEM,
36 GPG_ERR_EACCES,
37 GPG_ERR_EFAULT,
38 GPG_ERR_ENOTBLK,
39 GPG_ERR_EBUSY,
40 GPG_ERR_EEXIST,
41 GPG_ERR_EXDEV,
42 GPG_ERR_ENODEV,
43 G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HG,
101 GPG_ERR_ELIBACC,
102 GPG_ERR_ELIBBAD,
103 GPG_ERR_ELIBSCN,
104 GPG_ERR_ELIBMAX,
105 GPG_ERR_ELIBEXEC,
106 GPG_ERR_EILSEQ,
107 GPG_ERR_ERESTART,
108 GPG_ERR_ESTRPIPE,
109 GPG_ERR_EUSERS,
110 GPG_ERR_ENOTSOCK,
111 GPG_ERR_EDESTADDRREQ,
112 GPG_ERR_EMSGSIZE,
113 GPG_ERR_EPROTOTYPE,
114 GPG_ERR_ENOPROTOOPT,
115 GPG_ERR_EPROTONOSUPPORT,
116 GPG_ERR_ESOCKTNOSUPPORT,
117 GPG_ERR_ENOTSUP,
118 GPG_ERR_EOPNOTSUPP,
119 GPG_ERR_EPFNOSUPPORT,
120 GPG_ERR_EAFNOSUPPORT,
121 GPG_ERR_EADDRINUSE,
122 GPG_ERR_EADDRNOTAVAIL,
123 GPG_ERR_ENETDOWN,
124 GPG_ERR_ENETUNREACH,
125 GPG_ERR_ENETRESET,
126 GPG_ERR_ECONNABORTED,
127 GPG_ERR_ECONNRESET,
128 GPG_ERR_ENOBUFS,
129 GPG_ERR_EISCONN,
130 GPG_ERR_ENOTCONN,
131 GPG_ERR_ESHUTDOWN,
132 GPG_ERR_ETOOMANYREFS,
133 GPG_ERR_ETIMEDOUT,
134 GPG_ERR_ECONNREFUSED,
135 GPG_ERR_EHOSTDOWN,
136 GPG_ERR_EHOSTUNREACH,
137 GPG_ERR_EALREADY,
138 GPG_ERR_EINPROGRESS,
139 GPG_ERR_ESTALE,
140 GPG_ERR_EUCLEAN,
141 GPG_ERR_ENOTNAM,
142 GPG_ERR_ENAVAIL,
143 GPG_ERR_EISNAM,
144 GPG_ERR_EREMOTEIO,
145 GPG_ERR_EDQUOT,
146 GPG_ERR_ENOMEDIUM,
147 GPG_ERR_EMEDIUMTYPE,
148 GPG_ERR_ECANCELED,
149};
150
151#define errno_to_idx(code) (0 ? -1 \
152 : ((code >= 1) && (code <= 11)) ? (code - 1) \
153 : ((code >= 11) && (code <= 35)) ? (code - 0) \
154 : ((code >= 35) && (code <= 40)) ? (code - -1) \
155 : ((code >= 42) && (code <= 57)) ? (code - 0) \
156 : ((code >= 59) && (code <= 95)) ? (code - 1) \
157 : ((code >= 95) && (code <= 125)) ? (code - 0) \
158 : -1)