This is an archive of the discontinued LLVM Phabricator instance.

[libc][windows] fix strlcpy tests
ClosedPublic

Authored by michaelrj on May 18 2022, 11:45 AM.

Details

Summary

Generally, size_t is an alias for unsigned long long. In the strlcpy
tests, the return value of strlcpy (a size_t) is compared to an unsigned
long. On Linux unsigned long and unsigned long long are both 64 bits,
but on windows unsigned long is 32 bits. Since the macros require
identical types for both sides, this caused a build failure on windows.
This patch changes the constants to be explicit size_t values.

Diff Detail

Event Timeline

michaelrj created this revision.May 18 2022, 11:45 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 18 2022, 11:45 AM
michaelrj requested review of this revision.May 18 2022, 11:45 AM
This revision was not accepted when it landed; it landed in state Needs Review.May 18 2022, 2:12 PM
This revision was automatically updated to reflect the committed changes.