minor update
This commit is contained in:
parent
73a6c6ca5a
commit
c857ee850a
@ -21,10 +21,10 @@ extern "C" {
|
|||||||
* Compiler Options
|
* Compiler Options
|
||||||
****************************************/
|
****************************************/
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
# define _CRT_SECURE_NO_WARNINGS /* Disable Visual Studio warning messages for fopen, strncpy, strerror */
|
# 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 */
|
||||||
# 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 */
|
# define snprintf sprintf_s /* snprintf unsupported by Visual <= 2013 */
|
||||||
# endif
|
# endif
|
||||||
#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)
|
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32)
|
||||||
# include <fcntl.h> /* _O_BINARY */
|
# include <fcntl.h> /* _O_BINARY */
|
||||||
@ -125,7 +125,7 @@ static __inline int IS_CONSOLE(FILE* stdStream)
|
|||||||
# if !defined(__DJGPP__)
|
# if !defined(__DJGPP__)
|
||||||
# include <windows.h> /* DeviceIoControl, HANDLE, FSCTL_SET_SPARSE */
|
# include <windows.h> /* DeviceIoControl, HANDLE, FSCTL_SET_SPARSE */
|
||||||
# include <winioctl.h> /* 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); }
|
# define SET_SPARSE_FILE_MODE(file) { DWORD dw; DeviceIoControl((HANDLE) _get_osfhandle(_fileno(file)), FSCTL_SET_SPARSE, 0, 0, 0, 0, &dw, 0); }
|
||||||
# else
|
# else
|
||||||
# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
|
# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
|
||||||
|
Loading…
Reference in New Issue
Block a user