From f3a2e2143f42966d0966f166378952be23f5046e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 3 Mar 2008 14:42:32 +0000 Subject: [PATCH] Add a version of G_INLINE_FUNC for __GNUC__ && __GNUC_STDC_INLINE__, patch 2008-03-03 Matthias Clasen * glib/gutils.h: Add a version of G_INLINE_FUNC for __GNUC__ && __GNUC_STDC_INLINE__, patch by Jakub Jelinek svn path=/trunk/; revision=6616 --- ChangeLog | 5 +++++ glib/gutils.h | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b9c032040..2a80d3376 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-03-03 Matthias Clasen + + * glib/gutils.h: Add a version of G_INLINE_FUNC for + __GNUC__ && __GNUC_STDC_INLINE__, patch by Jakub Jelinek + 2008-03-03 Tor Lillqvist * glib/gspawn-win32.c (read_helper_report): Must set the GError diff --git a/glib/gutils.h b/glib/gutils.h index 697900d0a..4b72589a3 100644 --- a/glib/gutils.h +++ b/glib/gutils.h @@ -97,7 +97,11 @@ G_BEGIN_DECLS # define G_INLINE_FUNC # undef G_CAN_INLINE #elif defined (__GNUC__) -# define G_INLINE_FUNC static __inline __attribute__ ((unused)) +# ifdef __GNUC_STDC_INLINE__ +# define G_INLINE_FUNC extern inline __attribute__ ((__gnu_inline__)) +# else +# define G_INLINE_FUNC extern inline +# endif #elif defined (G_CAN_INLINE) # define G_INLINE_FUNC static inline #else /* can't inline */