From 2568bad3cc1ae70350f5ad31e97b4c13194e437e Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 1 Feb 2012 13:43:47 +0000 Subject: sprintf() begone! Replaced with StringUtils' Printf() git-svn-id: http://mc-server.googlecode.com/svn/trunk@216 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Globals.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'source/Globals.h') diff --git a/source/Globals.h b/source/Globals.h index 1ca16fec1..8d42d6341 100644 --- a/source/Globals.h +++ b/source/Globals.h @@ -80,11 +80,12 @@ /// Evaluates to the number of elements in an array (compile-time!) #define ARRAYCOUNT(X) (sizeof(X) / sizeof(*(X))) -// sprintf_s is the preferred call in MSVC ("secure"); make it *nix-compatible: -#ifndef _WIN32 - #define sprintf_s(dst, size, format, ...) sprintf(dst, format, __VA_ARGS__ ) - #define vsnprintf_s(buffer, buffer_size, maxcount, stringbuffer, ...) (vsnprintf(buffer, maxcount, stringbuffer, __VA_ARGS__)) -#endif // _WIN32 +#ifdef _MSC_VER + #define OBSOLETE __declspec(deprecated) +#else + // TODO: how do other compilers mark functions as obsolete, so that their usage results in a compile-time warning? + #define OBSOLETE +#endif -- cgit v1.2.3