File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ typedef long int __swift_ssize_t;
53
53
typedef __swift_uint32_t __swift_mode_t ;
54
54
#elif defined(__APPLE__)
55
55
typedef __swift_uint16_t __swift_mode_t ;
56
+ #elif defined(_WIN32)
57
+ typedef __swift_int32_t __swift_mode_t ;
56
58
#else // just guessing
57
59
typedef __swift_uint16_t __swift_mode_t ;
58
60
#endif
@@ -128,12 +130,10 @@ char * _Nullable *_stdlib_getEnviron();
128
130
#endif
129
131
130
132
// System error numbers <errno.h>
131
- #if !defined(_WIN32) || defined(__CYGWIN__)
132
133
SWIFT_RUNTIME_STDLIB_INTERNAL
133
134
int _stdlib_getErrno ();
134
135
SWIFT_RUNTIME_STDLIB_INTERNAL
135
136
void _stdlib_setErrno (int value);
136
- #endif
137
137
138
138
// Non-standard extensions
139
139
SWIFT_READNONE SWIFT_RUNTIME_STDLIB_INTERNAL
Original file line number Diff line number Diff line change @@ -120,8 +120,8 @@ int swift::_stdlib_close(int fd) {
120
120
// Windows
121
121
122
122
SWIFT_RUNTIME_STDLIB_INTERNAL
123
- int swift::_stdlib_open (const char *path, int oflag, int mode) {
124
- return _open (path, oflag, mode);
123
+ int swift::_stdlib_open (const char *path, int oflag, __swift_mode_t mode) {
124
+ return _open (path, oflag, static_cast < int >( mode) );
125
125
}
126
126
127
127
#else
@@ -183,6 +183,8 @@ char * _Nullable *swift::_stdlib_getEnviron() {
183
183
}
184
184
#endif
185
185
186
+ #endif // !(defined(_WIN32) && !defined(__CYGWIN__))
187
+
186
188
SWIFT_RUNTIME_STDLIB_INTERNAL
187
189
int swift::_stdlib_getErrno () {
188
190
return errno;
@@ -193,8 +195,6 @@ void swift::_stdlib_setErrno(int value) {
193
195
errno = value;
194
196
}
195
197
196
- // not Windows
197
- #endif
198
198
199
199
200
200
#if defined(__APPLE__)
You can’t perform that action at this time.
0 commit comments