From c857ee850ad6bd830b44fcf54692478e1206da53 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Fri, 24 Nov 2017 16:44:28 -0800 Subject: [PATCH] minor update --- programs/platform.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/programs/platform.h b/programs/platform.h index a4d7850fd..81dee23f9 100644 --- a/programs/platform.h +++ b/programs/platform.h @@ -21,10 +21,10 @@ 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 - must be declared before and */ -# if (_MSC_VER <= 1800) /* (1800 = Visual Studio 2013) */ -# define snprintf sprintf_s /* snprintf unsupported by Visual <= 2013 */ +# define _CRT_SECURE_NO_WARNINGS /* Disable Visual Studio warning messages for fopen, strncpy, strerror */ +# if (_MSC_VER <= 1800) /* 1800 == Visual Studio 2013 */ +# define _CRT_SECURE_NO_DEPRECATE /* VS2005 - must be declared before and */ +# define snprintf sprintf_s /* snprintf unsupported by Visual <= 2013 */ # endif #endif @@ -117,7 +117,7 @@ static __inline int IS_CONSOLE(FILE* stdStream) /****************************** -* OS-specific Includes +* OS-specific IO behaviors ******************************/ #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32) # include /* _O_BINARY */ @@ -125,7 +125,7 @@ static __inline int IS_CONSOLE(FILE* stdStream) # if !defined(__DJGPP__) # include /* DeviceIoControl, HANDLE, FSCTL_SET_SPARSE */ # include /* FSCTL_SET_SPARSE */ -# define SET_BINARY_MODE(file) { int unused=_setmode(_fileno(file), _O_BINARY); (void)unused; } +# define SET_BINARY_MODE(file) { int const unused=_setmode(_fileno(file), _O_BINARY); (void)unused; } # define SET_SPARSE_FILE_MODE(file) { DWORD dw; DeviceIoControl((HANDLE) _get_osfhandle(_fileno(file)), FSCTL_SET_SPARSE, 0, 0, 0, 0, &dw, 0); } # else # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)