Fixed MinGW header bug where off_t/off64_t is not defined in io.h
(See http://sourceforge.net/p/mingw/bugs/2024/)
This commit is contained in:
parent
55553a0681
commit
d4c306f7cd
2 changed files with 16 additions and 0 deletions
|
@ -30,7 +30,15 @@
|
|||
# undef _WIN32_WINNT
|
||||
# define _WIN32_WINNT 0x0502
|
||||
# include <windows.h>
|
||||
# if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
# define off_t _off_t
|
||||
# define off64_t _off64_t
|
||||
# endif
|
||||
# include <io.h>
|
||||
# if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
# undef off_t
|
||||
# undef off64_t
|
||||
# endif
|
||||
# include <fcntl.h>
|
||||
# include <winnt.h>
|
||||
# include <stdint.h>
|
||||
|
|
|
@ -40,7 +40,15 @@
|
|||
# define _POSIX_SOURCE 1
|
||||
# define TMP_POSIX
|
||||
# endif
|
||||
# if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
# define off_t _off_t
|
||||
# define off64_t _off64_t
|
||||
# endif
|
||||
# include <stdio.h>
|
||||
# if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
# undef off_t
|
||||
# undef off64_t
|
||||
# endif
|
||||
# ifdef TMP_POSIX
|
||||
# undef _POSIX_SOURCE
|
||||
# undef TMP_POSIX
|
||||
|
|
Loading…
Add table
Reference in a new issue