Skip to content

Commit

Permalink
Remove portability shim for snprintf
Browse files Browse the repository at this point in the history
Microsoft's _snprintf was never a drop-in replacement for snprintf (it
could leave resulting string un-terminated if it wouldn't fit).

As of Visual Studio 2015, the Microsoft C runtime ships with an actual
C99-compliant snprintf. LLVM requires VS2017, so we can just assume it
exists.
  • Loading branch information
kimgr committed Nov 8, 2020
1 parent 56f0864 commit fefce68
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions iwyu_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ class OstreamVoidifier {

#if defined(_WIN32)

#define snprintf _snprintf

#define NOMINMAX 1 // Prevent Windows headers from redefining min/max.
#include "Shlwapi.h" // for PathMatchSpecA

Expand Down

0 comments on commit fefce68

Please sign in to comment.