X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/00514ec7f1070550a52651971bb6a5e36efbe4f0..fed6418a32d3b0fd6036d169bd325c1172b391b5:/src/cdecl.h diff --git a/src/cdecl.h b/src/cdecl.h index 97f39bc..63034f4 100644 --- a/src/cdecl.h +++ b/src/cdecl.h @@ -21,6 +21,12 @@ #include #include +#if __GNUC__ +# define CDECL__INLINE __inline +#else +# define CDECL__INLINE inline +#endif + /* Compatibility typedefs */ #if HAVE__BOOL typedef _Bool cdecl_bool; @@ -109,12 +115,12 @@ void cdecl_free(struct cdecl *decl); size_t cdecl_explain(char *buf, size_t n, struct cdecl *decl); size_t cdecl_declare(char *buf, size_t n, struct cdecl *decl); -static inline int cdecl_spec_kind(const struct cdecl_declspec *spec) +static CDECL__INLINE int cdecl_spec_kind(const struct cdecl_declspec *spec) { return spec->type & ~(CDECL_SPEC_TYPE-1u); } -static inline int cdecl_is_abstract(const struct cdecl_declarator *d) +static CDECL__INLINE int cdecl_is_abstract(const struct cdecl_declarator *d) { while (d->child) d = d->child;