]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
_CRT_SECURE_NO_WARNINGS moved to util.h
authorPrzemyslaw Skibinski <inikep@gmail.com>
Wed, 21 Dec 2016 12:47:11 +0000 (13:47 +0100)
committerPrzemyslaw Skibinski <inikep@gmail.com>
Wed, 21 Dec 2016 12:47:11 +0000 (13:47 +0100)
programs/bench.c
programs/datagen.c
programs/dibio.c
programs/fileio.c
programs/util.h
programs/zstdcli.c
tests/fuzzer.c
tests/zbufftest.c
tests/zstreamtest.c

index 9b7f98884c8bf455d1f3b2c92ff7de71e87fbee3..5d142529ff52579c6a0490658a10195147dbdef1 100644 (file)
@@ -13,7 +13,6 @@
 *  Compiler Warnings
 ****************************************/
 #ifdef _MSC_VER
-#  define _CRT_SECURE_NO_WARNINGS                /* fopen */
 #  pragma warning(disable : 4127)                /* disable: C4127: conditional expression is constant */
 #endif
 
@@ -21,7 +20,6 @@
 /* *************************************
 *  Includes
 ***************************************/
-#include "platform.h"    /* Large Files support */
 #include "util.h"        /* UTIL_getFileSize, UTIL_sleep */
 #include <stdlib.h>      /* malloc, free */
 #include <string.h>      /* memset */
index 06b5ab97778bf01045245759dd93f1bdde2dda10..d0116b97232f71407767102d856c6ecbec35cbec 100644 (file)
@@ -9,14 +9,6 @@
 
 
 
-/* *************************************
-*  Compiler Options
-***************************************/
-#if defined(_MSC_VER)
-#  define _CRT_SECURE_NO_WARNINGS    /* removes Visual warning on strerror() */
-#  define _CRT_SECURE_NO_DEPRECATE   /* removes VS2005 warning on strerror() */
-#endif
-
 /*-************************************
 *  Dependencies
 **************************************/
index b99e717c235f74bd1ff028220441c97d12207abc..743d3ef9358e5e979b37f57328bfc45e6d00491f 100644 (file)
@@ -13,7 +13,6 @@
 *  Compiler Warnings
 ****************************************/
 #ifdef _MSC_VER
-#  define _CRT_SECURE_NO_WARNINGS                /* fopen */
 #  pragma warning(disable : 4127)                /* disable: C4127: conditional expression is constant */
 #endif
 
@@ -21,7 +20,6 @@
 /*-*************************************
 *  Includes
 ***************************************/
-#include "platform.h"       /* Large Files support */
 #include "util.h"           /* UTIL_getFileSize, UTIL_getTotalFileSize */
 #include <stdlib.h>         /* malloc, free */
 #include <string.h>         /* memset */
index e2a90a6784664e608e3550407edb333c6d047667..5544fe30adb16a2e0f767c2daf63424f3d6ab38c 100644 (file)
@@ -11,7 +11,7 @@
 *  Compiler Options
 ***************************************/
 #ifdef _MSC_VER   /* Visual */
-#  define _CRT_SECURE_NO_WARNINGS  /* removes Visual warning on strerror() */
+#  pragma warning(disable : 4127)  /* disable: C4127: conditional expression is constant */
 #  pragma warning(disable : 4204)  /* non-constant aggregate initializer */
 #endif
 #if defined(__MINGW32__) && !defined(_POSIX_SOURCE)
@@ -22,7 +22,6 @@
 /*-*************************************
 *  Includes
 ***************************************/
-#include "platform.h"   /* Large Files support, SET_BINARY_MODE */
 #include "util.h"       /* UTIL_getFileSize */
 #include <stdio.h>      /* fprintf, fopen, fread, _fileno, stdin, stdout */
 #include <stdlib.h>     /* malloc, free */
index 8b480b2261bd62ab4cbb47b036fa41e3f9c56e8e..5779fa772d1c44531670062f600fbe0f91d2f78c 100644 (file)
@@ -29,6 +29,8 @@ extern "C" {
 *  Compiler Options
 ****************************************/
 #if defined(_MSC_VER)
+#  define _CRT_SECURE_NO_WARNINGS   /* Disable Visual Studio warning messages for fopen, strncpy, strerror */
+#  define _CRT_SECURE_NO_DEPRECATE  /* VS2005 */ 
 #  if (_MSC_VER <= 1800)            /* (1800 = Visual Studio 2013) */
 #    define snprintf sprintf_s      /* snprintf unsupported by Visual <= 2013 */
 #  endif
index 978ffcfe08cacce3a81886289030b5bd7d584145..20698c78de253f41c203b40f9c708fe1d5559ebc 100644 (file)
@@ -23,7 +23,6 @@
 /*-************************************
 *  Dependencies
 **************************************/
-#include "platform.h" /* IS_CONSOLE, PLATFORM_POSIX_VERSION */
 #include "util.h"     /* UTIL_HAS_CREATEFILELIST, UTIL_createFileList */
 #include <string.h>   /* strcmp, strlen */
 #include <errno.h>    /* errno */
index 86d4c6bebb359f04b8e45a4978fc7d248d3c8952..b9b0158ed9516aa6c86510da81e721dde27cd596 100644 (file)
@@ -12,7 +12,6 @@
 *  Compiler specific
 **************************************/
 #ifdef _MSC_VER    /* Visual Studio */
-#  define _CRT_SECURE_NO_WARNINGS     /* fgets */
 #  pragma warning(disable : 4127)     /* disable: C4127: conditional expression is constant */
 #  pragma warning(disable : 4204)     /* disable: C4204: non-constant aggregate initializer */
 #endif
index 14b73923311d1bf64753de28024cbed7d19031bd..0fda993fcea46751de865eaf28ced24e8f58f013 100644 (file)
@@ -12,7 +12,6 @@
 *  Compiler specific
 **************************************/
 #ifdef _MSC_VER    /* Visual Studio */
-#  define _CRT_SECURE_NO_WARNINGS     /* fgets */
 #  pragma warning(disable : 4127)     /* disable: C4127: conditional expression is constant */
 #  pragma warning(disable : 4146)     /* disable: C4146: minus unsigned expression */
 #endif
index ce619308572cc40af5410b430fa5978691f2ab58..b52845045b823f3f87c382a95f9fefc7d80a9018 100644 (file)
@@ -12,7 +12,6 @@
 *  Compiler specific
 **************************************/
 #ifdef _MSC_VER    /* Visual Studio */
-#  define _CRT_SECURE_NO_WARNINGS     /* fgets */
 #  pragma warning(disable : 4127)     /* disable: C4127: conditional expression is constant */
 #  pragma warning(disable : 4146)     /* disable: C4146: minus unsigned expression */
 #endif