mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-18 01:50:40 +01:00
ralloc: Use _vscprintf on MinGW.
MinGW uses MSVC's runtime DLLs for most of C runtime's functions, and there has same semantics for vsnprintf. Not sure how this worked until now -- maybe one of the internal vsnprintf implementations was taking precedence.
This commit is contained in:
parent
e33447aac6
commit
7f08248c2e
1 changed files with 7 additions and 1 deletions
|
|
@ -33,6 +33,12 @@
|
|||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
/* Some versions of MinGW are missing _vscprintf's declaration, although they
|
||||
* still provide the symbol in the import library. */
|
||||
#ifdef __MINGW32__
|
||||
_CRTIMP int _vscprintf(const char *format, va_list argptr);
|
||||
#endif
|
||||
|
||||
#include "ralloc.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
|
@ -397,7 +403,7 @@ printf_length(const char *fmt, va_list untouched_args)
|
|||
va_list args;
|
||||
va_copy(args, untouched_args);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _WIN32
|
||||
/* We need to use _vcsprintf to calculate the size as vsnprintf returns -1
|
||||
* if the number of characters to write is greater than count.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue