mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-28 02:20:04 +01:00
don't define __GNUC_PREREQ which is not in the glib namespace. for gcc,
2008-01-18 16:51:23 Tim Janik <timj@imendio.com> * glib/gutils.h: don't define __GNUC_PREREQ which is not in the glib namespace. for gcc, define G_INLINE_FUNC to "static inline" as with all other C compilers, because newer GCC versions incompatibly changed "extern inline" semantics. svn path=/trunk/; revision=6333
This commit is contained in:
parent
d4b9875df1
commit
d83d3a382c
@ -1,3 +1,10 @@
|
|||||||
|
2008-01-18 16:51:23 Tim Janik <timj@imendio.com>
|
||||||
|
|
||||||
|
* glib/gutils.h: don't define __GNUC_PREREQ which is not in the glib
|
||||||
|
namespace. for gcc, define G_INLINE_FUNC to "static inline" as with
|
||||||
|
all other C compilers, because newer GCC versions incompatibly
|
||||||
|
changed "extern inline" semantics.
|
||||||
|
|
||||||
2008-01-18 Murray Cumming <murrayc@murrayc.com>
|
2008-01-18 Murray Cumming <murrayc@murrayc.com>
|
||||||
|
|
||||||
* glib/gfileutils.c:
|
* glib/gfileutils.c:
|
||||||
|
@ -69,18 +69,6 @@ G_BEGIN_DECLS
|
|||||||
# endif /* va_list is a pointer */
|
# endif /* va_list is a pointer */
|
||||||
#endif /* !G_VA_COPY */
|
#endif /* !G_VA_COPY */
|
||||||
|
|
||||||
/* need this utility macro, but it's not always present in system headers
|
|
||||||
* copy it from linux features.h for those who need it
|
|
||||||
*/
|
|
||||||
#ifndef __GNUC_PREREQ
|
|
||||||
#if defined __GNUC__ && defined __GNUC_MINOR__
|
|
||||||
# define __GNUC_PREREQ(maj, min) \
|
|
||||||
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
|
|
||||||
#else
|
|
||||||
# define __GNUC_PREREQ(maj, min) 0
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* inlining hassle. for compilers that don't allow the `inline' keyword,
|
/* inlining hassle. for compilers that don't allow the `inline' keyword,
|
||||||
* mostly because of strict ANSI C compliance or dumbness, we try to fall
|
* mostly because of strict ANSI C compliance or dumbness, we try to fall
|
||||||
* back to either `__inline__' or `__inline'.
|
* back to either `__inline__' or `__inline'.
|
||||||
@ -109,12 +97,7 @@ G_BEGIN_DECLS
|
|||||||
# define G_INLINE_FUNC
|
# define G_INLINE_FUNC
|
||||||
# undef G_CAN_INLINE
|
# undef G_CAN_INLINE
|
||||||
#elif defined (__GNUC__)
|
#elif defined (__GNUC__)
|
||||||
# if __GNUC_PREREQ (4,2) && defined (__STDC_VERSION__) \
|
# define G_INLINE_FUNC static __inline __attribute__ ((unused))
|
||||||
&& __STDC_VERSION__ >= 199901L
|
|
||||||
# define G_INLINE_FUNC extern __inline __attribute__ ((__gnu_inline__))
|
|
||||||
# else
|
|
||||||
# define G_INLINE_FUNC extern __inline
|
|
||||||
# endif
|
|
||||||
#elif defined (G_CAN_INLINE)
|
#elif defined (G_CAN_INLINE)
|
||||||
# define G_INLINE_FUNC static inline
|
# define G_INLINE_FUNC static inline
|
||||||
#else /* can't inline */
|
#else /* can't inline */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user