2000-02-18 03:38:33 +08:00
|
|
|
/*
|
|
|
|
* _mingw.h
|
|
|
|
*
|
|
|
|
* Mingw specific macros included by ALL include files.
|
|
|
|
*
|
|
|
|
* This file is part of the Mingw32 package.
|
|
|
|
*
|
|
|
|
* Contributors:
|
|
|
|
* Created by Mumit Khan <khan@xraylith.wisc.edu>
|
|
|
|
*
|
|
|
|
* 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
|
2001-12-05 23:01:06 +08:00
|
|
|
* DISCLAIMED. This includes but is not limited to warranties of
|
2000-02-18 03:38:33 +08:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MINGW_H
|
|
|
|
#define __MINGW_H
|
|
|
|
|
|
|
|
/* These are defined by the user (or the compiler)
|
|
|
|
to specify how identifiers are imported from a DLL.
|
|
|
|
|
|
|
|
__DECLSPEC_SUPPORTED Defined if dllimport attribute is supported.
|
|
|
|
__MINGW_IMPORT The attribute definition to specify imported
|
|
|
|
variables/functions.
|
2003-02-11 05:13:34 +08:00
|
|
|
_CRTIMP As above. For MS compatibility.
|
2000-02-18 03:38:33 +08:00
|
|
|
__MINGW32_VERSION Runtime version.
|
|
|
|
__MINGW32_MAJOR_VERSION Runtime major version.
|
|
|
|
__MINGW32_MINOR_VERSION Runtime minor version.
|
|
|
|
__MINGW32_BUILD_DATE Runtime build date.
|
|
|
|
|
|
|
|
Other macros:
|
|
|
|
|
|
|
|
__int64 define to be long long. Using a typedef can
|
|
|
|
tweak bugs in the C++ parser.
|
|
|
|
|
|
|
|
All headers should include this first, and then use __DECLSPEC_SUPPORTED
|
|
|
|
to choose between the old ``__imp__name'' style or __MINGW_IMPORT
|
|
|
|
style declarations. */
|
|
|
|
|
|
|
|
#ifndef __GNUC__
|
2002-06-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/_mingw.h (__MINGW_IMPORT): Check for prior definition before
defining.
* include/excpt.h (): Include windef.h not windows.h.
* include/fcntl.h (_O_SHORT_LIVED): Add define.
(_chmod): Add prototype.
(_creat): Correct prototype.
(SH_DENY*): Rename defines to _SH_DENY*.
(SH_DENY*): Add Non-ANSI names for _SH_DENY*.
include/stdio.h (_IOMYBUF, _IOEOF, _IOERR, _IOSTRG,
_IOAPPEND): Add defines.
(_wfindfirst): Correct prototype.
(_wfdopen): Add prototype.
* include/stdlib.h (_rotl, _rotr, _lrotl, _lrotr): Add
prototypes.
* include/string.h (_mbschr, _mbstok, _mbsncat): Remove
prototypes.
(_wcsdup): Correct prototype.
* include/mbstring.h: Remove comments about _mbschr, _mbstok,
_mbsncat being in string.h.
* include/wchar.h (_wfindfirst): Correct prototype.
* include/tchar.h (_tfdopen): Add _UNICODE mappings.
2002-06-18 12:13:18 +08:00
|
|
|
# ifndef __MINGW_IMPORT
|
|
|
|
# define __MINGW_IMPORT __declspec(dllimport)
|
|
|
|
# endif
|
2003-02-11 05:13:34 +08:00
|
|
|
# ifndef _CRTIMP
|
|
|
|
# define _CRTIMP __declspec(dllimport)
|
|
|
|
# endif
|
2000-02-18 03:38:33 +08:00
|
|
|
# define __DECLSPEC_SUPPORTED
|
|
|
|
#else /* __GNUC__ */
|
|
|
|
# ifdef __declspec
|
2002-06-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/_mingw.h (__MINGW_IMPORT): Check for prior definition before
defining.
* include/excpt.h (): Include windef.h not windows.h.
* include/fcntl.h (_O_SHORT_LIVED): Add define.
(_chmod): Add prototype.
(_creat): Correct prototype.
(SH_DENY*): Rename defines to _SH_DENY*.
(SH_DENY*): Add Non-ANSI names for _SH_DENY*.
include/stdio.h (_IOMYBUF, _IOEOF, _IOERR, _IOSTRG,
_IOAPPEND): Add defines.
(_wfindfirst): Correct prototype.
(_wfdopen): Add prototype.
* include/stdlib.h (_rotl, _rotr, _lrotl, _lrotr): Add
prototypes.
* include/string.h (_mbschr, _mbstok, _mbsncat): Remove
prototypes.
(_wcsdup): Correct prototype.
* include/mbstring.h: Remove comments about _mbschr, _mbstok,
_mbsncat being in string.h.
* include/wchar.h (_wfindfirst): Correct prototype.
* include/tchar.h (_tfdopen): Add _UNICODE mappings.
2002-06-18 12:13:18 +08:00
|
|
|
# ifndef __MINGW_IMPORT
|
2002-06-13 18:20:48 +08:00
|
|
|
/* Note the extern. This is needed to work around GCC's
|
2000-02-18 03:38:33 +08:00
|
|
|
limitations in handling dllimport attribute. */
|
2002-06-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/_mingw.h (__MINGW_IMPORT): Check for prior definition before
defining.
* include/excpt.h (): Include windef.h not windows.h.
* include/fcntl.h (_O_SHORT_LIVED): Add define.
(_chmod): Add prototype.
(_creat): Correct prototype.
(SH_DENY*): Rename defines to _SH_DENY*.
(SH_DENY*): Add Non-ANSI names for _SH_DENY*.
include/stdio.h (_IOMYBUF, _IOEOF, _IOERR, _IOSTRG,
_IOAPPEND): Add defines.
(_wfindfirst): Correct prototype.
(_wfdopen): Add prototype.
* include/stdlib.h (_rotl, _rotr, _lrotl, _lrotr): Add
prototypes.
* include/string.h (_mbschr, _mbstok, _mbsncat): Remove
prototypes.
(_wcsdup): Correct prototype.
* include/mbstring.h: Remove comments about _mbschr, _mbstok,
_mbsncat being in string.h.
* include/wchar.h (_wfindfirst): Correct prototype.
* include/tchar.h (_tfdopen): Add _UNICODE mappings.
2002-06-18 12:13:18 +08:00
|
|
|
# define __MINGW_IMPORT extern __attribute__((dllimport))
|
2003-02-11 05:13:34 +08:00
|
|
|
# endif
|
|
|
|
# ifndef _CRTIMP
|
2003-04-01 05:11:13 +08:00
|
|
|
# ifdef __USE_CRTIMP
|
|
|
|
# define _CRTIMP __attribute__((dllimport))
|
|
|
|
# else
|
|
|
|
# define _CRTIMP
|
|
|
|
# endif
|
2003-02-11 05:13:34 +08:00
|
|
|
# endif
|
2000-02-18 03:38:33 +08:00
|
|
|
# define __DECLSPEC_SUPPORTED
|
2003-02-11 05:13:34 +08:00
|
|
|
# else /* __declspec */
|
2000-02-18 03:38:33 +08:00
|
|
|
# undef __DECLSPEC_SUPPORTED
|
|
|
|
# undef __MINGW_IMPORT
|
2003-02-11 05:13:34 +08:00
|
|
|
# ifndef _CRTIMP
|
|
|
|
# define _CRTIMP
|
|
|
|
# endif
|
|
|
|
# endif /* __declspec */
|
|
|
|
# ifndef __cdecl
|
|
|
|
# define __cdecl __attribute__((cdecl))
|
|
|
|
# endif
|
|
|
|
# ifndef __stdcall
|
|
|
|
# define __stdcall __attribute__((stdcall))
|
|
|
|
# endif
|
2003-07-01 20:57:53 +08:00
|
|
|
# ifndef __int64
|
|
|
|
# define __int64 long long
|
|
|
|
# endif
|
|
|
|
# ifndef __int32
|
|
|
|
# define __int32 long
|
|
|
|
# endif
|
|
|
|
# ifndef __int16
|
|
|
|
# define __int16 int
|
|
|
|
# endif
|
|
|
|
# ifndef __int8
|
|
|
|
# define __int8 char
|
|
|
|
# endif
|
2003-07-02 07:34:36 +08:00
|
|
|
# ifndef __small
|
|
|
|
# define __small char
|
2003-07-01 20:57:53 +08:00
|
|
|
# endif
|
2003-07-02 07:34:36 +08:00
|
|
|
# ifndef __hyper
|
|
|
|
# define __hyper long long
|
2003-07-01 20:57:53 +08:00
|
|
|
# endif
|
2000-02-18 03:38:33 +08:00
|
|
|
#endif /* __GNUC__ */
|
|
|
|
|
2003-05-07 11:12:17 +08:00
|
|
|
#define __MINGW32_VERSION 3.1
|
2003-02-08 22:58:31 +08:00
|
|
|
#define __MINGW32_MAJOR_VERSION 3
|
2003-05-07 11:12:17 +08:00
|
|
|
#define __MINGW32_MINOR_VERSION 1
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
#endif /* __MINGW_H */
|