[ruby/yarp] Use _snprintf when using Windows versions prior to 2015 (< 1900)

Ruby CI has informed us that snprintf is not available on Windows
versions, but _sprintf is supported. This commit allows us to use
_sprintf where applicable

https://github.com/ruby/yarp/commit/818cc96afe
This commit is contained in:
Jemma Issroff 2023-08-16 15:42:56 -07:00 committed by Takashi Kokubun
parent c989c1b068
commit 45740e7a24
Notes: git 2023-08-17 00:47:56 +00:00

View File

@ -34,6 +34,11 @@
# define inline __inline
#endif
// Windows versions before 2015 use _snprintf
#if defined(_MSC_VER) && (_MSC_VER < 1900)
# define snprintf _snprintf
#endif
int yp_strncasecmp(const char *string1, const char *string2, size_t length);
#endif