Skip to content

Windows stdlib #19739

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 4 commits into from
Oct 5, 2018
Merged

Windows stdlib #19739

merged 4 commits into from
Oct 5, 2018

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Oct 5, 2018

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

When this header is used to create a module, it is used in a "C" environment,
which means that we cannot use the C++ style casts.  Switch to the
old-style-cast.  If we need to, we can always use `-Wno-old-style-casts` to
silence the warnings in C++ mode.
`ssize_t` is not available on Windows.  We have an internal type definition
`__swift_ssize_t` which allows us to use the type.  Switch to that spelling.
The system header depends on Windows.h but does not include it itself.  This
results in base Windows types (e.g. ULONG) to be undefined.  Include the header
to include the needed typedefs.
On Windows the filesystem is not case sensitive and this will link just fine.
However, the Windows SDK provides the import library with the lowercase name.
Adjust the name so that the link actually succeeds on case-sensitive file
systems (like on Linux).  This fixes the Windows cross-compile.
@compnerd
Copy link
Member Author

compnerd commented Oct 5, 2018

CC: @mikeash

@compnerd
Copy link
Member Author

compnerd commented Oct 5, 2018

@swift-ci please test

@mikeash
Copy link
Contributor

mikeash commented Oct 5, 2018

Thank you for cleaning up my mess again. 😄 😢 Looks good!

@compnerd compnerd merged commit 35c03ac into swiftlang:master Oct 5, 2018
@compnerd compnerd deleted the windows-stdlib branch October 5, 2018 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants