Added __STRICT_ANSI__ check for off_t definition on MinGW builds
This commit is contained in:
parent
900a1e0a29
commit
dd557f6f68
3 changed files with 42 additions and 15 deletions
|
@ -33,14 +33,16 @@
|
|||
|
||||
# if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
|
||||
# include "off_t.h"
|
||||
# if defined(__STRICT_ANSI__) || defined(MINGW_DEFINE_OFF_T)
|
||||
# include "off_t.h"
|
||||
|
||||
# if !defined(__MINGW64__)
|
||||
# define off_t cr_off32
|
||||
# else
|
||||
# define off_t cr_off64
|
||||
# if !defined(__MINGW64__)
|
||||
# define off_t cr_off32
|
||||
# else
|
||||
# define off_t cr_off64
|
||||
# endif
|
||||
# define off64_t cr_off64
|
||||
# endif
|
||||
# define off64_t cr_off64
|
||||
# endif
|
||||
# include <io.h>
|
||||
# if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
|
|
|
@ -1,9 +1,32 @@
|
|||
#ifndef OFF_T_H_
|
||||
# define OFF_T_H_
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright © 2015 Franklin "Snaipe" Mathieu <http://snai.pe/>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#ifndef CR_OFF_T_DEFINED
|
||||
# define CR_OFF_T_DEFINED
|
||||
|
||||
# include <stdint.h>
|
||||
|
||||
typedef int32_t cr_off32;
|
||||
typedef int64_t cr_off64;
|
||||
|
||||
#endif /* !OFF_T_H_ */
|
||||
#endif /* !CR_OFF_T_DEFINED */
|
||||
|
|
|
@ -42,14 +42,16 @@
|
|||
# endif
|
||||
# if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
|
||||
# include "off_t.h"
|
||||
# if defined(__STRICT_ANSI__) || defined(MINGW_DEFINE_OFF_T)
|
||||
# include "off_t.h"
|
||||
|
||||
# if !defined(__MINGW64__)
|
||||
# define off_t cr_off32
|
||||
# else
|
||||
# define off_t cr_off64
|
||||
# if !defined(__MINGW64__)
|
||||
# define off_t cr_off32
|
||||
# else
|
||||
# define off_t cr_off64
|
||||
# endif
|
||||
# define off64_t cr_off64
|
||||
# endif
|
||||
# define off64_t cr_off64
|
||||
# endif
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
|
|
Loading…
Add table
Reference in a new issue