Skip to content

[CF] Apply missing includes and cleanups. #2635

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 1 commit into from
Feb 1, 2020

Conversation

3405691582
Copy link
Member

Here we apply a few cursory cleanups for porting purposes. These changes
are as follows:

  • move a TARGET_OS_CYGWIN block: it was nested under TARGET_OS_MAC,
    which is probably not intended.

  • include sys/socket.h for TARGET_OS_BSD: which should be provided.

  • include netinet/in.h for !TARGET_OS_WIN32: which is required for
    struct sockaddr_in; from memory, this is included transitively on
    Linux, but not elsewhere.

  • use TARGET_OS_BSD instead of TARGET_OS_UNIX: TARGET_OS_UNIX appears
    no longer used; TARGET_OS_BSD is a synonym for unix anyway.

  • disuse pthread_setname_np for TARGET_OS_BSD: this doesn't appear in
    the FreeBSD manuals, it's not available on OpenBSD, so let's just
    disuse it.

@spevans
Copy link
Contributor

spevans commented Jan 30, 2020

@swift-ci test

Here we apply a few cursory cleanups for porting purposes. These changes
are as follows:

  * move a TARGET_OS_CYGWIN block: it was nested under TARGET_OS_MAC,
    which is probably not intended.

  * include sys/socket.h for TARGET_OS_BSD: which should be provided.

  * include netinet/in.h for !TARGET_OS_WIN32: which is required for
    struct sockaddr_in; from memory, this is included transitively on
    Linux, but not elsewhere.

  * use TARGET_OS_BSD instead of TARGET_OS_UNIX: TARGET_OS_UNIX appears
    no longer used; TARGET_OS_BSD is a synonym for __unix__ anyway.

  * disuse pthread_setname_np for TARGET_OS_BSD: this doesn't appear in
    the FreeBSD manuals, it's not available on OpenBSD, so let's just
    disuse it.
@spevans
Copy link
Contributor

spevans commented Jan 31, 2020

@swift-ci test

@compnerd compnerd merged commit 1b12594 into swiftlang:master Feb 1, 2020
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.

3 participants