Cygwin has fileno, so there's no need to use _fileno.

This commit is contained in:
mauro.persano 2015-04-01 15:47:24 -03:00
parent 160661c7a4
commit 1d3ab5d85d
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@
/**************************** /****************************
* OS-specific Includes * OS-specific Includes
*****************************/ *****************************/
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32)
# include <io.h> /* _isatty */ # include <io.h> /* _isatty */
# ifdef __MINGW32__ # ifdef __MINGW32__
int _fileno(FILE *stream); /* MINGW somehow forgets to include this prototype into <stdio.h> */ int _fileno(FILE *stream); /* MINGW somehow forgets to include this prototype into <stdio.h> */

View File

@ -61,7 +61,7 @@
/****************************** /******************************
* OS-specific Includes * OS-specific Includes
******************************/ ******************************/
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32)
# include <fcntl.h> /* _O_BINARY */ # include <fcntl.h> /* _O_BINARY */
# include <io.h> /* _setmode, _fileno, _get_osfhandle */ # include <io.h> /* _setmode, _fileno, _get_osfhandle */
# define SET_BINARY_MODE(file) _setmode(_fileno(file), _O_BINARY) # define SET_BINARY_MODE(file) _setmode(_fileno(file), _O_BINARY)