summaryrefslogtreecommitdiffstats
path: root/src/include/win32/win32_errno.h
blob: c842b250f4b611383449bf215b41e2ec5247070f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
 * Ceph - scalable distributed file system
 *
 * Copyright (C) 2020 SUSE LINUX GmbH
 *
 * This is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License version 2.1, as published by the Free Software
 * Foundation.  See file COPYING.
 *
 */

// We're going to preserve the error numbers defined by the Windows SDK but not
// by Mingw headers. For others, we're going to use numbers greater than 256 to
// avoid unintended overlaps.

#ifndef WIN32_ERRNO_H
#define WIN32_ERRNO_H 1

#include <errno.h>

#include "include/int_types.h"

#ifndef EBADMSG
#define EBADMSG 104
#endif

#ifndef ENODATA
#define ENODATA 120
#endif

#ifndef ENOLINK
#define ENOLINK 121
#endif

#ifndef ENOMSG
#define ENOMSG 122
#endif

#ifndef ENOTRECOVERABLE
#define ENOTRECOVERABLE 127
#endif

#ifndef ETIME
#define ETIME 137
#endif

#ifndef ETXTBSY
#define ETXTBSY 139
#endif

#ifndef ENODATA
#define ENODATA 120
#endif

#define ESTALE 256
#define EREMOTEIO 257

#ifndef EBADE
#define EBADE 258
#endif

#define EUCLEAN 259
#define EREMCHG 260
#define EKEYREJECTED 261
#define EREMOTE 262

// Not used at moment. Full coverage ensures that remote errors will be
// converted and handled properly.
#define EADV 263
#define EBADFD 264
#define EBADR 265
#define EBADRQC 266
#define EBADSLT 267
#define EBFONT 268
#define ECHRNG 269
#define ECOMM 270
#define EDOTDOT 271
#define EHOSTDOWN 272
#define EHWPOISON 273
// Defined by Boost.
#ifndef EIDRM
#define EIDRM 274
#endif
#define EISNAM 275
#define EKEYEXPIRED 276
#define EKEYREVOKED 277
#define EL2HLT 278
#define EL2NSYNC 279
#define EL3HLT 280
#define EL3RST 281
#define ELIBACC 282
#define ELIBBAD 283
#define ELIBEXEC 284
#define ELIBMAX 285
#define ELIBSCN 286
#define ELNRNG 287
#define EMEDIUMTYPE 288
#define EMULTIHOP 289
#define ENAVAIL 290
#define ENOANO 291
#define ENOCSI 292
#define ENOKEY 293
#define ENOMEDIUM 294
#define ENONET 295
#define ENOPKG 296
#ifndef ENOSR
#define ENOSR 297
#endif
#ifndef ENOSTR
#define ENOSTR 298
#endif
#define ENOTNAM 299
#define ENOTUNIQ 300
#define EPFNOSUPPORT 301
#define ERFKILL 302
#define ESOCKTNOSUPPORT 303
#define ESRMNT 304
#define ESTRPIPE 305
#define ETOOMANYREFS 306
#define EUNATCH 307
#define EUSERS 308
#define EXFULL 309
#define ENOTBLK 310

#ifndef EDQUOT
#define EDQUOT 311
#endif

#define ESHUTDOWN 312

#ifdef __cplusplus
extern "C" {
#endif

__s32 wsae_to_errno(__s32 r);
__u32 errno_to_ntstatus(__s32 r);
__u32 cephfs_errno_to_ntsatus(int cephfs_errno);

#ifdef __cplusplus
}
#endif

#endif // WIN32_ERRNO_H