Skip to content

Conversation

@3405691582
Copy link
Member

strlcpy and strlcat implementations are required for:

  • LINUX, but not ANDROID nor CYGWIN (since ANDROID and CYGWIN
    are both LINUX),
  • WIN32.

Instead of implementing strlcpy and strlcat once per TARGET_OS when
required, just write the implementation once and modify the conditional.

This does mean the ifdef conditional is a little complicated, but
overall that is outweighed by the removal of the obvious redundancy
and will eventually improve the handling of TARGET_OS_BSD.

strlcpy and strlcat implementations are required for:
* LINUX, but not ANDROID nor CYGWIN (since ANDROID and CYGWIN
  are both LINUX),
* WIN32.

Instead of implementing strlcpy and strlcat once per TARGET_OS when
required, just write the implementation once and modify the conditional.

This does mean the ifdef conditional is a little complicated, but
overall that is outweighed by the removal of the obvious redundancy
and will eventually improve the handling of TARGET_OS_BSD.
@spevans
Copy link
Contributor

spevans commented Jan 9, 2020

@swift-ci test

@compnerd
Copy link
Member

@swift-ci please test Linux platform

@3405691582
Copy link
Member Author

Can someone retest for me? I think swift/#29121 might have fixed the Linux bot.

@spevans
Copy link
Contributor

spevans commented Jan 11, 2020

@swift-ci test linux

@compnerd compnerd merged commit 56fa338 into swiftlang:master Jan 11, 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