Commit Graph

1 Commits

Author SHA1 Message Date
Pali Rohár 8cd542a809 Fix snprintf emulation for Windows
* Move it into separate win32_snprintf.h file to de-duplicate its
  implementation from all miniupnp source files.

* Do not use this emulation with mingw32 SDK when __NO_ISOCEXT is not
  defined as in this case mingw32 provides working snprintf function.

* Fix detection for mingw-w64 variants, when __NO_ISOCEXT is defined or
  when older version without UCRT is used.

* Add check if _scprintf function is available. In case it is not available
  just returns length of filled buffer to prevent buffer overflow.
2020-10-18 20:29:53 +02:00