Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_mingw.h « include « mingw « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 86932ee6c38b4dde03c0cd1683174b946958f435 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/*
 * _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
 *  DISCLAIMED. This includes but is not limited to warranties of
 *  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. 
   _CRTIMP                 As above.  For MS compatibility.  
   __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__
# ifndef __MINGW_IMPORT
#  define __MINGW_IMPORT  __declspec(dllimport)
# endif
# ifndef _CRTIMP
#  define _CRTIMP  __declspec(dllimport)
# endif
# define __DECLSPEC_SUPPORTED
#else /* __GNUC__ */
# ifdef __declspec
#  ifndef __MINGW_IMPORT

   /* Note the extern. This is needed to work around GCC's
      limitations in handling dllimport attribute.  */
#   define __MINGW_IMPORT  extern __attribute__((dllimport))
#  endif
#  ifndef _CRTIMP
#   ifdef __USE_CRTIMP
#    define _CRTIMP  __attribute__((dllimport))
#   else  
#    define _CRTIMP
#   endif
#  endif
#  define __DECLSPEC_SUPPORTED
# else /* __declspec */
#  undef __DECLSPEC_SUPPORTED
#  undef __MINGW_IMPORT
# endif /* __declspec */
# ifndef __cdecl
#  define __cdecl __attribute__((cdecl))
# endif
# ifndef __stdcall
#  define __stdcall __attribute__((stdcall))
# endif
# undef __int64
# define __int64 long long
#endif /* __GNUC__ */
  
#define __MINGW32_VERSION 3.0
#define __MINGW32_MAJOR_VERSION 3
#define __MINGW32_MINOR_VERSION 0

/*  ISO C++.  */
#ifdef __cplusplus
#include <bits/c++config.h>

# ifndef __MINGW_USE_NAMESPACES
#  if  _GLIBCPP_USE_NAMESPACES
#   define __MINGW_USE_NAMESPACES 1
#  else
#   define __MINGW_USE_NAMESPACES 0
#  endif
# endif

# if !(defined(__BEGIN_CSTD_NAMESPACE) \
       && defined(__END_CSTD_NAMESPACE))
#  if  __MINGW_USE_NAMESPACES
#   define __BEGIN_CSTD_NAMESPACE namespace std { extern "C" {
#   define __END_CSTD_NAMESPACE  } }
#   define __CSTD std::
#  else  /* __MINGW_USE_NAMESPACES */
#   define __BEGIN_CSTD_NAMESPACE extern "C" {
#   define __END_CSTD_NAMESPACE  }
#   define __CSTD
#  endif
# endif /* !defined(__BEGIN_CSTD_NAMESPACE) */ 
# if !(defined(__BEGIN_CGLOBAL_NAMESPACE) \
       && defined(__END_GLOBAL_NAMESPACE))
#  define __BEGIN_CGLOBAL_NAMESPACE extern "C" {
#  define __END_CGLOBAL_NAMESPACE  }
#  define __CGLOBAL ::
# endif /* !defined(__BEGIN_CGLOBAL_NAMESPACE) */ 

#else /* __cplusplus */

# define __BEGIN_CSTD_NAMESPACE
# define __END_CSTD_NAMESPACE
# define __CSTD 
# define __BEGIN_CGLOBAL_NAMESPACE
# define __END_CGLOBAL_NAMESPACE
# define __CGLOBAL

#endif /* !__cplusplus */

#endif /* __MINGW_H */