Subversion Repositories Kolibri OS

Rev

Rev 4874 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4874 Rev 4921
Line 32... Line 32...
32
#define _END_STD_C  } }
32
#define _END_STD_C  } }
33
#else
33
#else
34
#define _BEGIN_STD_C extern "C" {
34
#define _BEGIN_STD_C extern "C" {
35
#define _END_STD_C  }
35
#define _END_STD_C  }
36
#endif
36
#endif
37
#if defined(__GNUC__) && \
-
 
38
  ( (__GNUC__ >= 4) || \
37
#if __GNUC_PREREQ (3, 3)
39
    ( (__GNUC__ >= 3) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 3) ) )
-
 
40
#define _NOTHROW __attribute__ ((nothrow))
38
#define _NOTHROW __attribute__ ((nothrow))
41
#else
39
#else
42
#define _NOTHROW throw()
40
#define _NOTHROW throw()
43
#endif
41
#endif
44
#endif
42
#endif
Line 111... Line 109...
111
 
109
 
112
/*  The traditional meaning of 'extern inline' for GCC is not
110
/*  The traditional meaning of 'extern inline' for GCC is not
113
  to emit the function body unless the address is explicitly
111
  to emit the function body unless the address is explicitly
114
  taken.  However this behaviour is changing to match the C99
112
  taken.  However this behaviour is changing to match the C99
115
  standard, which uses 'extern inline' to indicate that the
113
  standard, which uses 'extern inline' to indicate that the
116
  function body *must* be emitted.  If we are using GCC, but do
114
  function body *must* be emitted.  Likewise, a function declared
-
 
115
  without either 'extern' or 'static' defaults to extern linkage
-
 
116
  (C99 6.2.2p5), and the compiler may choose whether to use the
117
  not have the new behaviour, we need to use extern inline; if
117
  inline version or call the extern linkage version (6.7.4p6).
118
  we are using a new GCC with the C99-compatible behaviour, or
118
  If we are using GCC, but do not have the new behaviour, we need
-
 
119
  to use extern inline; if we are using a new GCC with the
119
  a non-GCC compiler (which we will have to hope is C99, since
120
  C99-compatible behaviour, or a non-GCC compiler (which we will
120
  there is no other way to achieve the effect of omitting the
121
  have to hope is C99, since there is no other way to achieve the
121
  function if it isn't referenced) we just use plain 'inline',
122
  effect of omitting the function if it isn't referenced) we use
122
  which c99 defines to mean more-or-less the same as the Gnu C
123
  'static inline', which c99 defines to mean more-or-less the same
123
  'extern inline'.  */
124
  as the Gnu C 'extern inline'.  */
124
#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
125
#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
125
/* We're using GCC, but without the new C99-compatible behaviour.  */
126
/* We're using GCC, but without the new C99-compatible behaviour.  */
126
#define _ELIDABLE_INLINE extern __inline__ _ATTRIBUTE ((__always_inline__))
127
#define _ELIDABLE_INLINE extern __inline__ _ATTRIBUTE ((__always_inline__))
127
#else
128
#else
128
/* We're using GCC in C99 mode, or an unknown compiler which 
129
/* We're using GCC in C99 mode, or an unknown compiler which 
129
  we just have to hope obeys the C99 semantics of inline.  */
130
  we just have to hope obeys the C99 semantics of inline.  */
-
 
131
#define _ELIDABLE_INLINE static __inline__
-
 
132
#endif
-
 
133
 
-
 
134
#if __GNUC_PREREQ (3, 1)
-
 
135
#define _NOINLINE		__attribute__ ((__noinline__))
-
 
136
#define _NOINLINE_STATIC	_NOINLINE static
-
 
137
#else
-
 
138
/* On non-GNU compilers and GCC prior to version 3.1 the compiler can't be
-
 
139
   trusted not to inline if it is static. */
-
 
140
#define _NOINLINE
130
#define _ELIDABLE_INLINE __inline__
141
#define _NOINLINE_STATIC
Line 131... Line 142...
131
#endif
142
#endif