Adding (v)snprintf and va_copy for Windows.

pull/13171/head
Nicolas "Pixel" Noble 6 years ago
parent 6e85c2bf03
commit 4d8af5e4b9
  1. 9
      upb/port_def.inc

@ -71,6 +71,14 @@
#define UPB_NORETURN
#endif
#if defined(_WIN32) || defined(WIN32)
/* Windows versions */
#include <stdarg.h>
#include <stdio.h>
#define _upb_snprintf _snprintf_s
#define _upb_vsnprintf _vsnprintf_s
#define _upb_va_copy(a, b) va_copy(a, b)
#else
#if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L
/* C99/C++11 versions. */
#include <stdio.h>
@ -89,6 +97,7 @@
#else
#error Need implementations of [v]snprintf and va_copy
#endif
#endif
#ifdef __cplusplus
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || \

Loading…
Cancel
Save