summaryrefslogtreecommitdiff
path: root/programs/platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'programs/platform.h')
-rw-r--r--programs/platform.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/programs/platform.h b/programs/platform.h
index a4d7850fd7141..81dee23f91731 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 <io.h> and <windows.h> */
-# 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 <io.h> and <windows.h> */
+# 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 <fcntl.h> /* _O_BINARY */
@@ -125,7 +125,7 @@ static __inline int IS_CONSOLE(FILE* stdStream)
# if !defined(__DJGPP__)
# include <windows.h> /* DeviceIoControl, HANDLE, FSCTL_SET_SPARSE */
# include <winioctl.h> /* 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)