]> git.proxmox.com Git - libgit2.git/commitdiff
Disable some msvc "deprecated function" warnings again
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>
Wed, 17 Jun 2009 14:54:59 +0000 (15:54 +0100)
committerRamsay Jones <ramsay@ramsay1.demon.co.uk>
Tue, 13 Oct 2009 15:22:18 +0000 (16:22 +0100)
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>
src/cc-compat.h

index 8997caa24765077a3c3b70deb995819488bceb90..a256495f5eb22ac2e5de21f37b22ae3c497b3580 100644 (file)
 # 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__ */