Commit 785e32eb9cb0cecf6078927d970a7d665d26096e

nijtmans 2019-10-18T14:35:08

Move disabling of warning C4003 from makefile.msvc to tommath_private.h

diff --git a/makefile.msvc b/makefile.msvc
index d282e93..d155bc6 100644
--- a/makefile.msvc
+++ b/makefile.msvc
@@ -14,7 +14,7 @@ PREFIX    = c:\devel
 CFLAGS    = /Ox
 
 #Compilation flags
-LTM_CFLAGS  = /nologo /I./ /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D__STDC_WANT_SECURE_LIB__=1 /D_CRT_HAS_CXX17=0 /Wall /wd4146 /wd4127 /wd4710 /wd4711 /wd4820 /wd4003 /WX $(CFLAGS)
+LTM_CFLAGS  = /nologo /I./ /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D__STDC_WANT_SECURE_LIB__=1 /D_CRT_HAS_CXX17=0 /Wall /wd4146 /wd4127 /wd4710 /wd4711 /wd4820 /WX $(CFLAGS)
 LTM_LDFLAGS = advapi32.lib
 
 #Libraries to be created (this makefile builds only static libraries)
diff --git a/tommath_private.h b/tommath_private.h
index 7c167a5..bc7d908 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -141,6 +141,9 @@ extern void MP_FREE(void *mem, size_t size);
 #endif
 
 /* feature detection macro */
+#ifdef _MSC_VER
+#pragma warning(disable: 4003)
+#endif
 #define MP_STRINGIZE(x)  MP__STRINGIZE(x)
 #define MP__STRINGIZE(x) ""#x""
 #define MP_HAS(x)        (sizeof(MP_STRINGIZE(BN_##x##_C)) == 1u)