]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
simplified zstdcli.c
authorPrzemyslaw Skibinski <inikep@gmail.com>
Wed, 21 Dec 2016 08:19:15 +0000 (09:19 +0100)
committerPrzemyslaw Skibinski <inikep@gmail.com>
Wed, 21 Dec 2016 08:19:15 +0000 (09:19 +0100)
programs/datagen.c
programs/fileio.c
programs/zstdcli.c

index da5124cfc379571badee0e413bfb4cfa6f988560..8209c851771df7dc8cfda6afa4400c0e2a1d8ae1 100644 (file)
@@ -9,17 +9,10 @@
 
 
 
-/* *************************************
-*  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
 **************************************/
+#include "platform.h"  /* Compiler options */
 #include "util.h"      /* U32 */
 #include <stdlib.h>    /* malloc, free */
 #include <stdio.h>     /* FILE, fwrite, fprintf */
index 58fe7e355d1966e36297b0249e23a145cef73d1a..4f6db992fefc3156d36d012a108ceeffc6293aff 100644 (file)
@@ -11,7 +11,6 @@
 *  Compiler Options
 ***************************************/
 #ifdef _MSC_VER   /* Visual */
-#  define _CRT_SECURE_NO_WARNINGS  /* removes Visual warning on strerror() */
 #  pragma warning(disable : 4204)  /* non-constant aggregate initializer */
 #endif
 #if defined(__MINGW32__) && !defined(_POSIX_SOURCE)
index 0d7ce8b3bc0cf259cb136eca8a0b2402298c4b24..29fcb746bde98b982b79fcc9cfe7949f55e69613 100644 (file)
 #include "zstd.h"     /* ZSTD_VERSION_STRING */
 
 
-/*-************************************
-*  OS-specific Includes
-**************************************/
-#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
-#  include <io.h>       /* _isatty */
-#  define IS_CONSOLE(stdStream) _isatty(_fileno(stdStream))
-#elif (defined(__linux__) && (PLATFORM_POSIX_VERSION >= 1)) || (PLATFORM_POSIX_VERSION >= 200112L)  /* isatty requires POSIX.1-2001 */
-#  include <unistd.h>   /* isatty */
-#  define IS_CONSOLE(stdStream) isatty(fileno(stdStream))
-#else
-#  define IS_CONSOLE(stdStream) 0
-#endif
-
-
 /*-************************************
 *  Constants
 **************************************/