snprintf define consolidated to common.h
authorJeff Baylor <jbaylor@tp.int>
Tue, 23 Apr 2019 00:01:34 +0000 (17:01 -0700)
committerJeff Baylor <jbaylor@tp.int>
Tue, 23 Apr 2019 00:01:34 +0000 (17:01 -0700)
common.h
driver/others/openblas_get_config.c
utest/ctest.h

index 239b2a8..0ac74bb 100644 (file)
--- a/common.h
+++ b/common.h
@@ -85,6 +85,8 @@ extern "C" {
 
 #if !defined(_MSC_VER)
 #include <unistd.h>
+#elif _MSC_VER < 1900
+#define snprintf _snprintf
 #endif
 #include <time.h>
 
index eca494d..81648fb 100644 (file)
@@ -35,12 +35,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include <string.h>
 
-#if defined(_WIN32) && defined(_MSC_VER)
-#if _MSC_VER < 1900
-#define snprintf _snprintf
-#endif
-#endif
-
 static char* openblas_config_str=""
 "OpenBLAS "
  VERSION
index f297daf..d316b14 100644 (file)
@@ -83,10 +83,6 @@ struct ctest {
 #undef CTEST_SEGFAULT
 #endif
 
-#if _MSC_VER < 1900
-#define snprintf _snprintf
-#endif
-
 #ifndef __cplusplus
 #define inline __inline
 #endif