]> mj.ucw.cz Git - pciutils.git/commit
libpci: For MSVC < 19.00 define snprintf outside of endian section
authorPali Rohár <pali@kernel.org>
Sun, 26 Dec 2021 23:47:53 +0000 (00:47 +0100)
committerMartin Mares <mj@ucw.cz>
Thu, 10 Feb 2022 11:58:17 +0000 (12:58 +0100)
commit4e6fd387fe9444fb6872b1ab106a194c5edf3618
tree5266c7502e0fd833181a844cd66d5c537dd67497
parent5008883541b35bb2b648725fb10fdabfe5f20ea2
libpci: For MSVC < 19.00 define snprintf outside of endian section

snprintf() macro is not endian specific and therefore should be declared
outside of the endian section.

This also fixes snprintf() function for new MinGW-w64 toolchains where
snprintf() is defined as wrapper around _snprintf() which do not return
negative value on overflow. libpci would call MinGW-w64 patched snprintf()
function and not broken system function _snprintf().
lib/sysdep.h