diff options
author | Przemyslaw Skibinski <inikep@gmail.com> | 2016-12-21 15:10:09 (GMT) |
---|---|---|
committer | Przemyslaw Skibinski <inikep@gmail.com> | 2016-12-21 15:10:09 (GMT) |
commit | 973bc79740f571c2b6700cab16a319df9aed2a05 (patch) | |
tree | e3ece1e99990ad10a491e7077968072346cf0f3d /programs/platform.h | |
parent | 4f61505cc40cb8b2c6c371600a427fd685c656a2 (diff) | |
download | lz4-973bc79740f571c2b6700cab16a319df9aed2a05.zip lz4-973bc79740f571c2b6700cab16a319df9aed2a05.tar.gz lz4-973bc79740f571c2b6700cab16a319df9aed2a05.tar.bz2 |
util.h and platform.h based on zstd
Diffstat (limited to 'programs/platform.h')
-rw-r--r-- | programs/platform.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/programs/platform.h b/programs/platform.h index fe4bfde..f1040c0 100644 --- a/programs/platform.h +++ b/programs/platform.h @@ -25,23 +25,17 @@ extern "C" { #endif + /* ************************************** * Compiler Options ****************************************/ -#if defined(__INTEL_COMPILER) -# pragma warning(disable : 177) /* disable: message #177: function was declared but never referenced */ -#endif #if defined(_MSC_VER) -# define _CRT_SECURE_NO_WARNINGS /* Disable some Visual warning messages for fopen, strncpy */ -# define _CRT_SECURE_NO_DEPRECATE /* VS2005 */ -# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ +# define _CRT_SECURE_NO_WARNINGS /* Disable Visual Studio warning messages for fopen, strncpy, strerror */ +# define _CRT_SECURE_NO_DEPRECATE /* VS2005 - must be declared before <io.h> and <windows.h> */ # if (_MSC_VER <= 1800) /* (1800 = Visual Studio 2013) */ # define snprintf sprintf_s /* snprintf unsupported by Visual <= 2013 */ # endif #endif -#if defined(__MINGW32__) && !defined(_POSIX_SOURCE) -# define _POSIX_C_SOURCE 1 /* enable __VA_ARGS__ and disable %llu warnings with MinGW on Windows */ -#endif /* ************************************** @@ -110,6 +104,7 @@ extern "C" { * Detect if isatty() and fileno() are available ************************************************/ #if (defined(__linux__) && (PLATFORM_POSIX_VERSION >= 1)) || (PLATFORM_POSIX_VERSION >= 200112L) || defined(__DJGPP__) +# include <unistd.h> /* isatty */ # define IS_CONSOLE(stdStream) isatty(fileno(stdStream)) #elif defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) # include <io.h> /* _isatty */ |