~ubuntu-branches/ubuntu/trusty/x11proto-core/trusty-proposed

« back to all changes in this revision

Viewing changes to Xfuncproto.h.in

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2011-04-05 23:28:42 UTC
  • mfrom: (1.4.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: james.westby@ubuntu.com-20110405232842-b2ckujwo0os0qf2x
ImportĀ upstreamĀ versionĀ 7.0.21

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
 
78
78
#if defined(__GNUC__) && (__GNUC__ >= 4)
79
79
# define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))
80
 
# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
81
80
#else
82
81
# define _X_SENTINEL(x)
83
 
# define _X_ATTRIBUTE_PRINTF(x,y)
84
82
#endif /* GNUC >= 4 */
85
83
 
86
84
#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__CYGWIN__)
100
98
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
101
99
# define _X_LIKELY(x)   __builtin_expect(!!(x), 1)
102
100
# define _X_UNLIKELY(x) __builtin_expect(!!(x), 0)
103
 
# define _X_INLINE      inline
104
 
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
105
 
# define _X_LIKELY(x)   (x)
106
 
# define _X_UNLIKELY(x) (x)
107
 
# define _X_INLINE      inline
108
 
#else /* not gcc >= 3.3 and not Sun Studio >= 8 */
109
 
# define _X_LIKELY(x)   (x)
110
 
# define _X_UNLIKELY(x) (x)
111
 
# define _X_INLINE
 
101
#else /* not gcc >= 3.3 */
 
102
# define _X_LIKELY(x)   (x)
 
103
# define _X_UNLIKELY(x) (x)
112
104
#endif
113
105
 
114
106
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)
124
116
# define _X_NORETURN
125
117
#endif /* GNUC  */
126
118
 
 
119
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203)
 
120
# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
 
121
#else /* not gcc >= 2.3 */
 
122
# define _X_ATTRIBUTE_PRINTF(x,y)
 
123
#endif
 
124
 
 
125
/* C99 keyword "inline" or equivalent extensions in pre-C99 compilers */
 
126
#if defined(inline) /* assume autoconf set it correctly */ || \
 
127
   (defined(__STDC__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */ || \
 
128
   (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550))
 
129
# define _X_INLINE inline
 
130
#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */
 
131
# define _X_INLINE __inline__
 
132
#else
 
133
# define _X_INLINE
 
134
#endif
 
135
 
 
136
/* C99 keyword "restrict" or equivalent extensions in pre-C99 compilers */
 
137
#ifndef _X_RESTRICT_KYWD
 
138
# if defined(restrict) /* assume autoconf set it correctly */ || \
 
139
   (defined(__STDC__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */
 
140
#  define _X_RESTRICT_KYWD  restrict
 
141
# elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */
 
142
#  define _X_RESTRICT_KYWD __restrict__
 
143
# else
 
144
#  define _X_RESTRICT_KYWD
 
145
# endif
 
146
#endif
 
147
 
127
148
#endif /* _XFUNCPROTO_H_ */