DescriptionDon't #define snprintf in VS 2015 builds.
The function snprintf is not available in Visual Studio prior to VS
2015. In some places this omission is dealt with with a #define to map
snprintf to _snprintf. This was never a good idea (_snprintf doesn't
guarantee null-termination) and with VS 2015 it is not even legal.
This change conditionally disables one instance of this remapping.
The build errors that occur without this change are:
stdio.h(1926): warning C4005: 'snprintf': macro redefinition
stdio.h(1926): note: command-line arguments: see previous
definition of 'snprintf'
stdio.h(1929): fatal error C1189: #error: Macro definition of
snprintf conflicts with Standard Library function declaration
R=scottmg@chromium.org
BUG=440500
Committed: https://crrev.com/2622e27d880e88b21d8eceb98b6863cdf6dc9afd
Cr-Commit-Position: refs/heads/master@{#324157}
Patch Set 1 #Patch Set 2 : Fix snprintf definition for libexif also. #
Messages
Total messages: 12 (4 generated)
|