Don't redefine __WINE_USE_MSVCRT (msvc warning).
[wine] / include / msvcrt / errno.h
1 /*
2  * Copyright 2001 Jon Griffiths
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #ifndef __WINE_ERRNO_H
20 #define __WINE_ERRNO_H
21 #ifndef __WINE_USE_MSVCRT
22 #define __WINE_USE_MSVCRT
23 #endif
24
25 #ifndef MSVCRT
26 # ifdef USE_MSVCRT_PREFIX
27 #  define MSVCRT(x)    MSVCRT_##x
28 # else
29 #  define MSVCRT(x)    x
30 # endif
31 #endif
32
33 #ifdef USE_MSVCRT_PREFIX
34
35 #  define MSVCRT_EPERM   1
36 #  define MSVCRT_ENOENT  2
37 #  define MSVCRT_ESRCH   3
38 #  define MSVCRT_EINTR   4
39 #  define MSVCRT_EIO     5
40 #  define MSVCRT_ENXIO   6
41 #  define MSVCRT_E2BIG   7
42 #  define MSVCRT_ENOEXEC 8
43 #  define MSVCRT_EBADF   9
44 #  define MSVCRT_ECHILD  10
45 #  define MSVCRT_EAGAIN  11
46 #  define MSVCRT_ENOMEM  12
47 #  define MSVCRT_EACCES  13
48 #  define MSVCRT_EFAULT  14
49 #  define MSVCRT_EBUSY   16
50 #  define MSVCRT_EEXIST  17
51 #  define MSVCRT_EXDEV   18
52 #  define MSVCRT_ENODEV  19
53 #  define MSVCRT_ENOTDIR 20
54 #  define MSVCRT_EISDIR  21
55 #  define MSVCRT_EINVAL  22
56 #  define MSVCRT_ENFILE  23
57 #  define MSVCRT_EMFILE  24
58 #  define MSVCRT_ENOTTY  25
59 #  define MSVCRT_EFBIG   27
60 #  define MSVCRT_ENOSPC  28
61 #  define MSVCRT_ESPIPE  29
62 #  define MSVCRT_EROFS   30
63 #  define MSVCRT_EMLINK  31
64 #  define MSVCRT_EPIPE   32
65 #  define MSVCRT_EDOM    33
66 #  define MSVCRT_ERANGE  34
67 #  define MSVCRT_EDEADLK 36
68 #  define MSVCRT_EDEADLOCK MSVCRT_EDEADLK
69 #  define MSVCRT_ENAMETOOLONG 38
70 #  define MSVCRT_ENOLCK  39
71 #  define MSVCRT_ENOSYS  40
72 #  define MSVCRT_ENOTEMPTY 41
73
74 #else /* USE_MSVCRT_PREFIX */
75
76 #  define EPERM   1
77 #  define ENOENT  2
78 #  define ESRCH   3
79 #  define EINTR   4
80 #  define EIO     5
81 #  define ENXIO   6
82 #  define E2BIG   7
83 #  define ENOEXEC 8
84 #  define EBADF   9
85 #  define ECHILD  10
86 #  define EAGAIN  11
87 #  define ENOMEM  12
88 #  define EACCES  13
89 #  define EFAULT  14
90 #  define EBUSY   16
91 #  define EEXIST  17
92 #  define EXDEV   18
93 #  define ENODEV  19
94 #  define ENOTDIR 20
95 #  define EISDIR  21
96 #  define EINVAL  22
97 #  define ENFILE  23
98 #  define EMFILE  24
99 #  define ENOTTY  25
100 #  define EFBIG   27
101 #  define ENOSPC  28
102 #  define ESPIPE  29
103 #  define EROFS   30
104 #  define EMLINK  31
105 #  define EPIPE   32
106 #  define EDOM    33
107 #  define ERANGE  34
108 #  define EDEADLK 36
109 #  define EDEADLOCK EDEADLK
110 #  define ENAMETOOLONG 38
111 #  define ENOLCK  39
112 #  define ENOSYS  40
113 #  define ENOTEMPTY 41
114
115 #endif /* USE_MSVCRT_PREFIX */
116
117 #ifdef __cplusplus
118 extern "C" {
119 #endif
120
121 extern int* MSVCRT(_errno)(void);
122
123 #ifdef __cplusplus
124 }
125 #endif
126
127 #ifndef USE_MSVCRT_PREFIX
128 # define errno        (*_errno())
129 #else
130 # define MSVCRT_errno (*MSVCRT__errno())
131 #endif
132
133 #endif  /* __WINE_ERRNO_H */