From e9bae31bd385805b134f7424f99d68cd3faf137c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se> Date: Mon, 18 Apr 2016 21:35:04 +0200 Subject: [PATCH] Inline workaround for gcc-5. --- argp/ChangeLog | 6 ++++++ argp/argp-fmtstream.h | 6 +++++- argp/argp.h | 6 +++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/argp/ChangeLog b/argp/ChangeLog index 27b922892..43cd4f908 100644 --- a/argp/ChangeLog +++ b/argp/ChangeLog @@ -1,3 +1,9 @@ +2016-04-18 Niels Möller <nisse@lysator.liu.se> + + * argp-fmtstream.h (ARGP_FS_EI): Use __attribute__ + ((__gnu_inline__)) if available, for compatibility with gcc-5. + * argp.h (ARGP_EI): Likewise. + 2014-10-02 Niels Möller <nisse@lysator.liu.se> * strndup.c (strndup): Fixed off-by-one error, and failure check. diff --git a/argp/argp-fmtstream.h b/argp/argp-fmtstream.h index 9f7133805..18f7f7e35 100644 --- a/argp/argp-fmtstream.h +++ b/argp/argp-fmtstream.h @@ -216,7 +216,11 @@ extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount); #endif #ifndef ARGP_FS_EI -#define ARGP_FS_EI extern inline +# ifdef __GNUC_STDC_INLINE__ +# define ARGP_FS_EI extern inline __attribute__ ((__gnu_inline__)) +# else +# define ARGP_FS_EI extern inline +# endif #endif ARGP_FS_EI size_t diff --git a/argp/argp.h b/argp/argp.h index bf8e4b761..a6c65b578 100644 --- a/argp/argp.h +++ b/argp/argp.h @@ -561,7 +561,11 @@ __argp_short_program_name(const struct argp_state *state) __THROW; # endif # ifndef ARGP_EI -# define ARGP_EI extern __inline__ +# ifdef __GNUC_STDC_INLINE__ +# define ARGP_EI extern __inline__ __attribute__ ((__gnu_inline__)) +# else +# define ARGP_EI extern __inline__ +# endif # endif ARGP_EI void -- GitLab