Skip to content

Fix errors and warnings building swift/shims on Windows using MSVC #6138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stdlib/public/SwiftShims/LibcShims.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace swift { extern "C" {
// the current platform in the runtime code.
#if defined(__linux__) && defined (__arm__) && !defined(__android__)
typedef int __swift_ssize_t;
#elif defined(_MSC_VER)
#elif defined(_WIN32)
#if defined(_M_ARM) || defined(_M_IX86)
typedef int __swift_ssize_t;
#elif defined(_M_X64)
Expand Down
6 changes: 5 additions & 1 deletion stdlib/public/SwiftShims/Visibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
#ifndef SWIFT_STDLIB_SHIMS_VISIBILITY_H
#define SWIFT_STDLIB_SHIMS_VISIBILITY_H

#if defined(__has_feature) && __has_feature(nullability)
#if !defined(__has_feature)
#define __has_feature(x) false
#endif

#if __has_feature(nullability)
// Provide macros to temporarily suppress warning about the use of
// _Nullable and _Nonnull.
# define SWIFT_BEGIN_NULLABILITY_ANNOTATIONS \
Expand Down