diff --git a/example/endian_example.cpp b/example/endian_example.cpp index 5fcca47..ff04d0d 100644 --- a/example/endian_example.cpp +++ b/example/endian_example.cpp @@ -9,9 +9,6 @@ //----------------------------------------------------------------------------// -#define _CRT_SECURE_NO_DEPRECATE // quiet VC++ 8.0 foolishness -#define _SCL_SECURE_NO_WARNINGS - #include #include diff --git a/example/udt_conversion_example.cpp b/example/udt_conversion_example.cpp index c1e1fbd..5ac85ac 100644 --- a/example/udt_conversion_example.cpp +++ b/example/udt_conversion_example.cpp @@ -7,8 +7,6 @@ //--------------------------------------------------------------------------------------// -#define _CRT_SECURE_NO_WARNINGS - #include #include diff --git a/example/use_cases.cpp b/example/use_cases.cpp index 1ab3c95..471c633 100644 --- a/example/use_cases.cpp +++ b/example/use_cases.cpp @@ -7,7 +7,14 @@ //--------------------------------------------------------------------------------------// -#define _SCL_SECURE_NO_WARNINGS +#ifndef _SCL_SECURE_NO_WARNINGS +# define _SCL_SECURE_NO_WARNINGS +#endif + +#ifndef _CRT_SECURE_NO_WARNINGS +# define _CRT_SECURE_NO_WARNINGS +#endif + #include #include diff --git a/include/boost/endian/detail/disable_warnings.hpp b/include/boost/endian/detail/disable_warnings.hpp index d274d57..082db8a 100644 --- a/include/boost/endian/detail/disable_warnings.hpp +++ b/include/boost/endian/detail/disable_warnings.hpp @@ -8,6 +8,15 @@ //--------------------------------------------------------------------------------------// #ifdef _MSC_VER + +#ifndef _SCL_SECURE_NO_WARNINGS +# define _SCL_SECURE_NO_WARNINGS +#endif + +#ifndef _CRT_SECURE_NO_WARNINGS +# define _CRT_SECURE_NO_WARNINGS +#endif + # pragma warning(push) // triggered by boost/detail/lightweight_test.hpp diff --git a/test/benchmark.cpp b/test/benchmark.cpp index c649008..d3389cd 100644 --- a/test/benchmark.cpp +++ b/test/benchmark.cpp @@ -5,8 +5,13 @@ // Distributed under the Boost Software License, Version 1.0. // http://www.boost.org/LICENSE_1_0.txt -#define _CRT_SECURE_NO_WARNINGS -#define _SCL_SECURE_NO_WARNINGS +#ifndef _SCL_SECURE_NO_WARNINGS +# define _SCL_SECURE_NO_WARNINGS +#endif + +#ifndef _CRT_SECURE_NO_WARNINGS +# define _CRT_SECURE_NO_WARNINGS +#endif #include #include diff --git a/test/buffer_test.cpp b/test/buffer_test.cpp index a6bd5a4..d57934c 100644 --- a/test/buffer_test.cpp +++ b/test/buffer_test.cpp @@ -9,8 +9,6 @@ //--------------------------------------------------------------------------------------// -#define _SCL_SECURE_NO_WARNINGS - #include #define BOOST_ENDIAN_LOG diff --git a/test/endian_in_union_test.cpp b/test/endian_in_union_test.cpp index 1a2486b..271c855 100644 --- a/test/endian_in_union_test.cpp +++ b/test/endian_in_union_test.cpp @@ -9,8 +9,6 @@ //----------------------------------------------------------------------------// -#define _SCL_SECURE_NO_WARNINGS - #define BOOST_ENDIAN_FORCE_PODNESS #include diff --git a/test/endian_operations_test.cpp b/test/endian_operations_test.cpp index d853007..18dedb5 100644 --- a/test/endian_operations_test.cpp +++ b/test/endian_operations_test.cpp @@ -28,8 +28,6 @@ //----------------------------------------------------------------------------// //----------------------------------------------------------------------------// -#define _SCL_SECURE_NO_WARNINGS - #define BOOST_ENDIAN_LOG #include diff --git a/test/endian_test.cpp b/test/endian_test.cpp index 92e49c0..2c06092 100644 --- a/test/endian_test.cpp +++ b/test/endian_test.cpp @@ -16,8 +16,6 @@ //----------------------------------------------------------------------------// -#define _SCL_SECURE_NO_WARNINGS - #include #include diff --git a/test/loop_time_test.cpp b/test/loop_time_test.cpp index 30cf207..3af3641 100644 --- a/test/loop_time_test.cpp +++ b/test/loop_time_test.cpp @@ -7,8 +7,6 @@ //--------------------------------------------------------------------------------------// -#define _SCL_SECURE_NO_WARNINGS - //#define BOOST_ENDIAN_NO_INTRINSICS //#define BOOST_ENDIAN_LOG diff --git a/test/speed_test.cpp b/test/speed_test.cpp index 84f7a97..df569b1 100644 --- a/test/speed_test.cpp +++ b/test/speed_test.cpp @@ -7,8 +7,6 @@ //--------------------------------------------------------------------------------------// -#define _SCL_SECURE_NO_WARNINGS - #define BOOST_ENDIAN_NO_INTRINSICS //#define BOOST_ENDIAN_LOG diff --git a/test/speed_test_functions.cpp b/test/speed_test_functions.cpp index fbdccf5..34512d8 100644 --- a/test/speed_test_functions.cpp +++ b/test/speed_test_functions.cpp @@ -13,7 +13,13 @@ //--------------------------------------------------------------------------------------// -#define _SCL_SECURE_NO_WARNINGS +#ifndef _SCL_SECURE_NO_WARNINGS +# define _SCL_SECURE_NO_WARNINGS +#endif + +#ifndef _CRT_SECURE_NO_WARNINGS +# define _CRT_SECURE_NO_WARNINGS +#endif #include "speed_test_functions.hpp" diff --git a/test/speed_test_functions.hpp b/test/speed_test_functions.hpp index 80eb6b9..775b368 100644 --- a/test/speed_test_functions.hpp +++ b/test/speed_test_functions.hpp @@ -28,8 +28,8 @@ namespace user int16_t return_x_little_int16(int16_t x, little_int16_ut y) BOOST_NOEXCEPT; int16_t return_x_value_big_int16(int16_t x, big_int16_ut) BOOST_NOEXCEPT; int16_t return_x_value_little_int16(int16_t x, little_int16_ut y) BOOST_NOEXCEPT; - int16_t return_x_in_place_big_int16(int16_t x, big_int16_ut y) BOOST_NOEXCEPT; - int16_t return_x_in_place_little_int16(int16_t x, little_int16_ut y) BOOST_NOEXCEPT; + int16_t return_x_inplace_big_int16(int16_t x, big_int16_ut y) BOOST_NOEXCEPT; + int16_t return_x_inplace_little_int16(int16_t x, little_int16_ut y) BOOST_NOEXCEPT; int16_t return_y_big_int16(int16_t x, big_int16_ut y) BOOST_NOEXCEPT; int16_t return_y_little_int16(int16_t x, little_int16_ut y) BOOST_NOEXCEPT; @@ -37,8 +37,8 @@ namespace user int32_t return_x_little_int32(int32_t x, little_int32_ut y) BOOST_NOEXCEPT; int32_t return_x_value_big_int32(int32_t x, big_int32_ut) BOOST_NOEXCEPT; int32_t return_x_value_little_int32(int32_t x, little_int32_ut y) BOOST_NOEXCEPT; - int32_t return_x_in_place_big_int32(int32_t x, big_int32_ut y) BOOST_NOEXCEPT; - int32_t return_x_in_place_little_int32(int32_t x, little_int32_ut y) BOOST_NOEXCEPT; + int32_t return_x_inplace_big_int32(int32_t x, big_int32_ut y) BOOST_NOEXCEPT; + int32_t return_x_inplace_little_int32(int32_t x, little_int32_ut y) BOOST_NOEXCEPT; int32_t return_y_big_int32(int32_t x, big_int32_ut y) BOOST_NOEXCEPT; int32_t return_y_little_int32(int32_t x, little_int32_ut y) BOOST_NOEXCEPT; @@ -46,8 +46,8 @@ namespace user int64_t return_x_little_int64(int64_t x, little_int64_ut y) BOOST_NOEXCEPT; int64_t return_x_value_big_int64(int64_t x, big_int64_ut) BOOST_NOEXCEPT; int64_t return_x_value_little_int64(int64_t x, little_int64_ut y) BOOST_NOEXCEPT; - int64_t return_x_in_place_big_int64(int64_t x, big_int64_ut y) BOOST_NOEXCEPT; - int64_t return_x_in_place_little_int64(int64_t x, little_int64_ut y) BOOST_NOEXCEPT; + int64_t return_x_inplace_big_int64(int64_t x, big_int64_ut y) BOOST_NOEXCEPT; + int64_t return_x_inplace_little_int64(int64_t x, little_int64_ut y) BOOST_NOEXCEPT; int64_t return_y_big_int64(int64_t x, big_int64_ut y) BOOST_NOEXCEPT; int64_t return_y_little_int64(int64_t x, little_int64_ut y) BOOST_NOEXCEPT;