diff --git a/src/pugixml.cpp b/src/pugixml.cpp index c63645b..4e72afe 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -143,6 +143,8 @@ using std::memset; # define PUGI__SNPRINTF(buf, ...) snprintf(buf, sizeof(buf), __VA_ARGS__) #elif defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400 # define PUGI__SNPRINTF(buf, ...) _snprintf_s(buf, _countof(buf), _TRUNCATE, __VA_ARGS__) +#elif defined(__APPLE__) && __clang_major__ >= 14 && !defined(__STRICT_ANSI__) // Xcode 14 marks snprintf as deprecated while still using C++98 by default +# define PUGI__SNPRINTF(buf, ...) snprintf(buf, sizeof(buf), __VA_ARGS__) #else # define PUGI__SNPRINTF sprintf #endif