From 8af9bf1d06b414fc61ccc7fa31b31098a24cbb30 Mon Sep 17 00:00:00 2001 From: vitaut Date: Mon, 2 Nov 2015 09:22:59 -0500 Subject: [PATCH] Use FMT_SECURE_SCL instead of _SECURE_SCL --- format.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/format.h b/format.h index ac918e26..575ad59e 100644 --- a/format.h +++ b/format.h @@ -48,11 +48,13 @@ # include #endif -#ifndef _SECURE_SCL -# define _SECURE_SCL 0 +#ifdef _SECURE_SCL +# define FMT_SECURE_SCL _SECURE_SCL +#else +# define FMT_SECURE_SCL 0 #endif -#if _SECURE_SCL +#if FMT_SECURE_SCL # include #endif @@ -394,7 +396,7 @@ namespace internal { // to avoid dynamic memory allocation. enum { INLINE_BUFFER_SIZE = 500 }; -#if _SECURE_SCL +#if FMT_SECURE_SCL // Use checked iterator to avoid warnings on MSVC. template inline stdext::checked_array_iterator make_ptr(T *ptr, std::size_t size) { @@ -625,7 +627,7 @@ inline int isnotanumber(long double x) { template class BasicCharTraits { public: -#if _SECURE_SCL +#if FMT_SECURE_SCL typedef stdext::checked_array_iterator CharPtr; #else typedef Char *CharPtr; @@ -1910,7 +1912,7 @@ class BasicWriter { typedef typename internal::CharTraits::CharPtr CharPtr; -#if _SECURE_SCL +#if FMT_SECURE_SCL // Returns pointer value. static Char *get(CharPtr p) { return p.base(); } #else