svn commit: r204041 - in head/sys: amd64/amd64 i386/i386 i386/xen
Ed Schouten
ed at FreeBSD.org
Thu Feb 18 14:28:39 UTC 2010
Author: ed
Date: Thu Feb 18 14:28:38 2010
New Revision: 204041
URL: http://svn.freebsd.org/changeset/base/204041
Log:
Allow the pmap code to be built with GCC from FreeBSD 7 again.
This patch basically gives us the best of both worlds. Instead of
forcing the compiler to emulate GNU-style inline semantics even though
we're using ISO C99, it will only use GNU-style inlining when the
compiler is configured that way (__GNUC_GNU_INLINE__).
Tested by: jhb
Modified:
head/sys/amd64/amd64/pmap.c
head/sys/i386/i386/pmap.c
head/sys/i386/xen/pmap.c
Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c Thu Feb 18 13:46:54 2010 (r204040)
+++ head/sys/amd64/amd64/pmap.c Thu Feb 18 14:28:38 2010 (r204041)
@@ -151,7 +151,11 @@ __FBSDID("$FreeBSD$");
#endif
#if !defined(DIAGNOSTIC)
+#ifdef __GNUC_GNU_INLINE__
+#define PMAP_INLINE inline
+#else
#define PMAP_INLINE extern inline
+#endif
#else
#define PMAP_INLINE
#endif
Modified: head/sys/i386/i386/pmap.c
==============================================================================
--- head/sys/i386/i386/pmap.c Thu Feb 18 13:46:54 2010 (r204040)
+++ head/sys/i386/i386/pmap.c Thu Feb 18 14:28:38 2010 (r204041)
@@ -162,7 +162,11 @@ __FBSDID("$FreeBSD$");
#endif
#if !defined(DIAGNOSTIC)
+#ifdef __GNUC_GNU_INLINE__
+#define PMAP_INLINE inline
+#else
#define PMAP_INLINE extern inline
+#endif
#else
#define PMAP_INLINE
#endif
Modified: head/sys/i386/xen/pmap.c
==============================================================================
--- head/sys/i386/xen/pmap.c Thu Feb 18 13:46:54 2010 (r204040)
+++ head/sys/i386/xen/pmap.c Thu Feb 18 14:28:38 2010 (r204041)
@@ -173,7 +173,11 @@ __FBSDID("$FreeBSD$");
#endif
#if !defined(PMAP_DIAGNOSTIC)
+#ifdef __GNUC_GNU_INLINE__
+#define PMAP_INLINE inline
+#else
#define PMAP_INLINE extern inline
+#endif
#else
#define PMAP_INLINE
#endif
More information about the svn-src-head
mailing list