diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-01 14:43:47 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-01 14:43:47 +0100 |
commit | 2568bad3cc1ae70350f5ad31e97b4c13194e437e (patch) | |
tree | 31d0713dfe1b4e42c1f17ddae8ea0114c420fc61 /source/Globals.h | |
parent | Removed a few duplicate includes (diff) | |
download | cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar.gz cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar.bz2 cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar.lz cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar.xz cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar.zst cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.zip |
Diffstat (limited to 'source/Globals.h')
-rw-r--r-- | source/Globals.h | 11 |
1 files changed, 6 insertions, 5 deletions
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
|