blob: 7d29b75391e2c33c5fbd596e3ad395708f1038e2 [file] [log] [blame]
/* -----------------------------------------------------------------------------
* swigcompat.swg
*
* Macros to provide support compatibility with older C and C++ standards.
* ----------------------------------------------------------------------------- */
/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
* if you're missing it.
*/
#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
(defined __cplusplus && __cplusplus >= 201103L) || \
defined SWIG_HAVE_SNPRINTF) && \
!defined SWIG_NO_SNPRINTF
# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
#else
/* Fallback versions ignore the buffer size, but most of our uses either have a
* fixed maximum possible size or dynamically allocate a buffer that's large
* enough.
*/
# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
#endif