2005-04-17 17:13:54 +04:00
|
|
|
/*
|
|
|
|
* _mingw.h
|
|
|
|
*
|
2009-07-19 00:06:37 +04:00
|
|
|
* This file is for TinyCC and not part of the Mingw32 package.
|
2005-04-17 17:13:54 +04:00
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS NOT COPYRIGHTED
|
|
|
|
*
|
|
|
|
* This source code is offered for use in the public domain. You may
|
|
|
|
* use, modify or distribute it freely.
|
|
|
|
*
|
|
|
|
* This code is distributed in the hope that it will be useful but
|
|
|
|
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
|
|
|
* DISCLAIMED. This includes but is not limited to warranties of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MINGW_H
|
|
|
|
#define __MINGW_H
|
|
|
|
|
2010-01-27 00:18:03 +03:00
|
|
|
/* some winapi files define these before including _mingw.h --> */
|
|
|
|
#undef __cdecl
|
|
|
|
#undef _X86_
|
|
|
|
#undef WIN32
|
|
|
|
/* <-- */
|
|
|
|
|
2007-11-21 20:16:31 +03:00
|
|
|
#include <stddef.h>
|
2010-01-14 22:56:24 +03:00
|
|
|
#include <stdarg.h>
|
2007-11-21 20:16:31 +03:00
|
|
|
|
2008-03-08 22:55:47 +03:00
|
|
|
#define __int8 char
|
2010-01-14 22:56:24 +03:00
|
|
|
#define __int16 short
|
|
|
|
#define __int32 int
|
|
|
|
#define __int64 long long
|
2016-10-18 00:24:01 +03:00
|
|
|
#define _HAVE_INT64
|
2009-07-19 00:06:37 +04:00
|
|
|
|
2016-10-18 00:24:01 +03:00
|
|
|
#define __cdecl
|
2008-03-08 22:55:47 +03:00
|
|
|
#define __declspec(x) __attribute__((x))
|
2010-01-14 22:56:24 +03:00
|
|
|
#define __unaligned __attribute__((packed))
|
|
|
|
#define __fastcall __attribute__((fastcall))
|
2009-07-19 00:06:37 +04:00
|
|
|
|
2013-02-10 03:38:40 +04:00
|
|
|
#define __MSVCRT__ 1
|
2009-07-19 00:06:37 +04:00
|
|
|
#undef _MSVCRT_
|
2013-02-10 03:38:40 +04:00
|
|
|
#define __MINGW_IMPORT extern __declspec(dllimport)
|
2019-04-29 14:53:07 +03:00
|
|
|
#define __MINGW_ATTRIB_NORETURN __declspec(noreturn)
|
2010-01-14 22:56:24 +03:00
|
|
|
#define __MINGW_ATTRIB_CONST
|
2009-07-19 00:06:37 +04:00
|
|
|
#define __MINGW_ATTRIB_DEPRECATED
|
2010-01-14 22:56:24 +03:00
|
|
|
#define __MINGW_ATTRIB_MALLOC
|
|
|
|
#define __MINGW_ATTRIB_PURE
|
|
|
|
#define __MINGW_ATTRIB_NONNULL(arg)
|
|
|
|
#define __MINGW_NOTHROW
|
2009-07-19 00:06:37 +04:00
|
|
|
#define __GNUC_VA_LIST
|
|
|
|
|
2010-01-14 22:56:24 +03:00
|
|
|
#define _CRTIMP extern
|
2019-06-12 16:34:47 +03:00
|
|
|
#define __CRT_INLINE static __inline__
|
2010-01-14 22:56:24 +03:00
|
|
|
|
2009-07-19 00:06:37 +04:00
|
|
|
#define _CRT_ALIGN(x) __attribute__((aligned(x)))
|
|
|
|
#define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
|
2010-01-14 22:56:24 +03:00
|
|
|
#define _CRT_PACKING 8
|
|
|
|
#define __CRT_UNALIGNED
|
|
|
|
#define _CONST_RETURN
|
2009-07-19 00:06:37 +04:00
|
|
|
|
2016-06-19 09:49:56 +03:00
|
|
|
#ifndef _TRUNCATE
|
|
|
|
#define _TRUNCATE ((size_t)-1)
|
|
|
|
#endif
|
|
|
|
|
2009-07-19 00:06:37 +04:00
|
|
|
#define __CRT_STRINGIZE(_Value) #_Value
|
|
|
|
#define _CRT_STRINGIZE(_Value) __CRT_STRINGIZE(_Value)
|
|
|
|
#define __CRT_WIDE(_String) L ## _String
|
|
|
|
#define _CRT_WIDE(_String) __CRT_WIDE(_String)
|
|
|
|
|
|
|
|
#ifdef _WIN64
|
2010-01-14 22:56:35 +03:00
|
|
|
#define __stdcall
|
|
|
|
#define _AMD64_ 1
|
|
|
|
#define __x86_64 1
|
2016-10-18 00:24:01 +03:00
|
|
|
#define _M_X64 100 /* Visual Studio */
|
|
|
|
#define _M_AMD64 100 /* Visual Studio */
|
2010-01-14 22:56:35 +03:00
|
|
|
#define USE_MINGW_SETJMP_TWO_ARGS
|
|
|
|
#define mingw_getsp tinyc_getbp
|
2009-07-19 00:06:37 +04:00
|
|
|
#else
|
2010-01-14 22:56:35 +03:00
|
|
|
#define __stdcall __attribute__((__stdcall__))
|
|
|
|
#define _X86_ 1
|
2016-10-18 00:24:01 +03:00
|
|
|
#define _M_IX86 300 /* Visual Studio */
|
2010-01-14 22:56:35 +03:00
|
|
|
#define WIN32 1
|
|
|
|
#define _USE_32BIT_TIME_T
|
2017-02-25 14:49:47 +03:00
|
|
|
#endif
|
2010-01-14 22:56:35 +03:00
|
|
|
|
|
|
|
/* in stddef.h */
|
|
|
|
#define _SIZE_T_DEFINED
|
|
|
|
#define _SSIZE_T_DEFINED
|
|
|
|
#define _PTRDIFF_T_DEFINED
|
|
|
|
#define _WCHAR_T_DEFINED
|
2010-01-14 22:56:24 +03:00
|
|
|
#define _UINTPTR_T_DEFINED
|
|
|
|
#define _INTPTR_T_DEFINED
|
2010-01-14 22:56:35 +03:00
|
|
|
#define _INTEGRAL_MAX_BITS 64
|
2009-07-19 00:06:37 +04:00
|
|
|
|
2016-10-18 00:24:01 +03:00
|
|
|
#ifndef _TIME32_T_DEFINED
|
2009-07-19 00:06:37 +04:00
|
|
|
#define _TIME32_T_DEFINED
|
2016-10-18 00:24:01 +03:00
|
|
|
typedef long __time32_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _TIME64_T_DEFINED
|
2009-07-19 00:06:37 +04:00
|
|
|
#define _TIME64_T_DEFINED
|
2016-10-18 00:24:01 +03:00
|
|
|
typedef long long __time64_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _TIME_T_DEFINED
|
|
|
|
#define _TIME_T_DEFINED
|
2009-07-19 00:06:37 +04:00
|
|
|
#ifdef _USE_32BIT_TIME_T
|
|
|
|
typedef __time32_t time_t;
|
|
|
|
#else
|
|
|
|
typedef __time64_t time_t;
|
2010-01-14 22:56:24 +03:00
|
|
|
#endif
|
2016-05-05 21:04:00 +03:00
|
|
|
#endif
|
2009-07-19 00:06:37 +04:00
|
|
|
|
2016-10-18 00:24:01 +03:00
|
|
|
#ifndef _WCTYPE_T_DEFINED
|
2010-01-14 22:56:24 +03:00
|
|
|
#define _WCTYPE_T_DEFINED
|
2016-10-18 00:24:01 +03:00
|
|
|
typedef wchar_t wctype_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _WINT_T
|
2016-05-05 21:04:00 +03:00
|
|
|
#define _WINT_T
|
2016-10-18 00:24:01 +03:00
|
|
|
typedef __WINT_TYPE__ wint_t;
|
|
|
|
#endif
|
2009-07-19 00:06:37 +04:00
|
|
|
|
|
|
|
typedef int errno_t;
|
2010-01-14 22:56:24 +03:00
|
|
|
#define _ERRCODE_DEFINED
|
2009-07-19 00:06:37 +04:00
|
|
|
|
|
|
|
typedef struct threadlocaleinfostruct *pthreadlocinfo;
|
|
|
|
typedef struct threadmbcinfostruct *pthreadmbcinfo;
|
|
|
|
typedef struct localeinfo_struct _locale_tstruct,*_locale_t;
|
2005-04-17 17:13:54 +04:00
|
|
|
|
|
|
|
/* for winapi */
|
2010-01-27 00:18:03 +03:00
|
|
|
#define _ANONYMOUS_UNION
|
|
|
|
#define _ANONYMOUS_STRUCT
|
2019-04-29 14:53:07 +03:00
|
|
|
#define DECLSPEC_NORETURN __declspec(noreturn)
|
2010-01-27 00:18:03 +03:00
|
|
|
#define DECLARE_STDCALL_P(type) __stdcall type
|
2009-07-19 00:06:37 +04:00
|
|
|
#define NOSERVICE 1
|
|
|
|
#define NOMCX 1
|
|
|
|
#define NOIME 1
|
2017-02-20 20:58:08 +03:00
|
|
|
#define __INTRIN_H_
|
|
|
|
#ifndef DUMMYUNIONNAME
|
|
|
|
# define DUMMYUNIONNAME
|
|
|
|
# define DUMMYUNIONNAME1
|
|
|
|
# define DUMMYUNIONNAME2
|
|
|
|
# define DUMMYUNIONNAME3
|
|
|
|
# define DUMMYUNIONNAME4
|
|
|
|
# define DUMMYUNIONNAME5
|
|
|
|
#endif
|
|
|
|
#ifndef DUMMYSTRUCTNAME
|
|
|
|
# define DUMMYSTRUCTNAME
|
|
|
|
#endif
|
2009-07-19 00:06:37 +04:00
|
|
|
#ifndef WINVER
|
2010-01-14 22:56:24 +03:00
|
|
|
# define WINVER 0x0502
|
2009-07-19 00:06:37 +04:00
|
|
|
#endif
|
|
|
|
#ifndef _WIN32_WINNT
|
2010-01-14 22:56:24 +03:00
|
|
|
# define _WIN32_WINNT 0x502
|
2009-07-19 00:06:37 +04:00
|
|
|
#endif
|
|
|
|
|
2016-04-13 06:51:59 +03:00
|
|
|
#define __C89_NAMELESS
|
|
|
|
#define __MINGW_EXTENSION
|
|
|
|
#define WINAPI_FAMILY_PARTITION(X) 1
|
2017-04-25 22:01:54 +03:00
|
|
|
#define MINGW_HAS_SECURE_API
|
2016-04-13 06:51:59 +03:00
|
|
|
|
2005-04-17 17:13:54 +04:00
|
|
|
#endif /* __MINGW_H */
|