Skip to content

Commit 818cc96

Browse files
committed
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
1 parent 8a0a7a1 commit 818cc96

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/yarp/defines.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
# define inline __inline
3535
#endif
3636

37+
// Windows versions before 2015 use _snprintf
38+
#if defined(_MSC_VER) && (_MSC_VER < 1900)
39+
# define snprintf _snprintf
40+
#endif
41+
3742
int yp_strncasecmp(const char *string1, const char *string2, size_t length);
3843

3944
#endif

0 commit comments

Comments
 (0)