1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
/* -----------------------------------------------------------------------------
* swigcompat.swg
*
* Macros to provide support compatibility with older C and C++ standards.
*
* Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard.
* MSVC users are urged to check and examine the /Zc:__cplusplus compiler option.
* See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus.
* ----------------------------------------------------------------------------- */
/* 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
|