From 40e53e52d645d1cbef76c8432847fa3c219b9dd2 Mon Sep 17 00:00:00 2001 From: Jeff Baylor Date: Mon, 22 Apr 2019 17:01:34 -0700 Subject: [PATCH] snprintf define consolidated to common.h --- common.h | 2 ++ driver/others/openblas_get_config.c | 6 ------ utest/ctest.h | 4 ---- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/common.h b/common.h index 239b2a850..0ac74bb20 100644 --- a/common.h +++ b/common.h @@ -85,6 +85,8 @@ extern "C" { #if !defined(_MSC_VER) #include +#elif _MSC_VER < 1900 +#define snprintf _snprintf #endif #include diff --git a/driver/others/openblas_get_config.c b/driver/others/openblas_get_config.c index eca494dca..81648fb7c 100644 --- a/driver/others/openblas_get_config.c +++ b/driver/others/openblas_get_config.c @@ -35,12 +35,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -#if defined(_WIN32) && defined(_MSC_VER) -#if _MSC_VER < 1900 -#define snprintf _snprintf -#endif -#endif - static char* openblas_config_str="" "OpenBLAS " VERSION diff --git a/utest/ctest.h b/utest/ctest.h index f297dafba..d316b1494 100644 --- a/utest/ctest.h +++ b/utest/ctest.h @@ -83,10 +83,6 @@ struct ctest { #undef CTEST_SEGFAULT #endif -#if _MSC_VER < 1900 -#define snprintf _snprintf -#endif - #ifndef __cplusplus #define inline __inline #endif