Commit 5cae6c25279bdd525124b7686d67072059bb0fd5

Ramsay Jones 2009-06-17T15:54:59

Disable some msvc "deprecated function" warnings again In addition to removing the inline #define, commit 209849a also removed a #pragma to disable msvc deprecated function warnings. Without this #pragma, msvc currently issues 19 warnings related to "deprecated insecure c-library functions", such as strcpy() and 22 warnings related to "deprecated POSIX function names", such as open(). In order to supress these warnings, re-instate the #pragma. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/cc-compat.h b/src/cc-compat.h
index 8997caa..a256495 100644
--- a/src/cc-compat.h
+++ b/src/cc-compat.h
@@ -46,4 +46,10 @@
 # define PRIuZ "Iu"
 #endif
 
+/* Micosoft Visual C/C++ */
+#if defined(_MSC_VER)
+/* disable "deprecated function" warnings */
+# pragma warning ( disable : 4996 )
+#endif
+
 #endif /* INCLUDE_compat_h__ */