142 |
# endif |
# endif |
143 |
#endif |
#endif |
144 |
|
|
145 |
|
|
146 |
|
|
147 |
|
/* Take advantage of GNU C compiler source level optimisation hints, |
148 |
|
using portable macros. */ |
149 |
|
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) |
150 |
|
# define M4_GNUC_ATTRIBUTE(args) __attribute__(args) |
151 |
|
#else |
152 |
|
# define M4_GNUC_ATTRIBUTE(args) |
153 |
|
#endif /* __GNUC__ */ |
154 |
|
|
155 |
|
#define M4_GNUC_PRINTF(fmt, arg) M4_GNUC_ATTRIBUTE((format (printf, fmt, arg))) |
156 |
|
#define M4_GNUC_SCANF(fmt, arg) M4_GNUC_ATTRIBUTE((format (scanf, fmt, arg))) |
157 |
|
#define M4_GNUC_FORMAT(arg_idx) M4_GNUC_ATTRIBUTE((format_arg (arg_idx))) |
158 |
|
#define M4_GNUC_NORETURN M4_GNUC_ATTRIBUTE((noreturn)) |
159 |
|
#define M4_GNUC_CONST M4_GNUC_ATTRIBUTE((const)) |
160 |
|
#define M4_GNUC_UNUSED M4_GNUC_ATTRIBUTE((unused)) |
161 |
|
|
162 |
|
|
163 |
|
|
164 |
#if !defined __PRETTY_FUNCTION__ |
#if !defined __PRETTY_FUNCTION__ |
165 |
# define __PRETTY_FUNCTION__ "<unknown>" |
# define __PRETTY_FUNCTION__ "<unknown>" |
181 |
|
|
182 |
/* Preprocessor token manipulation. */ |
/* Preprocessor token manipulation. */ |
183 |
|
|
184 |
/* The extra indirection to the _STR macro is required so that if the |
/* The extra indirection to the _STR and _CONC macros is required so that |
185 |
argument to STR() is a macro, it will be expanded before being quoted. */ |
if the arguments to STR() (or CONC()) are themselves macros, they will |
186 |
|
be expanded before being quoted. */ |
187 |
#ifndef STR |
#ifndef STR |
188 |
# if __STDC__ |
# if __STDC__ |
189 |
# define _STR(arg) #arg |
# define _STR(arg) #arg |
195 |
|
|
196 |
#ifndef CONC |
#ifndef CONC |
197 |
# if __STDC__ |
# if __STDC__ |
198 |
# define CONC(a, b) a##b |
# define _CONC(a, b) a##b |
199 |
# else |
# else |
200 |
# define CONC(a, b) a/**/b |
# define _CONC(a, b) a/**/b |
201 |
# endif |
# endif |
202 |
|
# define CONC(a, b) _CONC(a, b) |
203 |
#endif |
#endif |
204 |
|
|
205 |
|
|