Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys For GCC 4.1 and later, use the __alignof__ keyword.



details:   https://anonhg.NetBSD.org/src/rev/1af8899e23d1
branches:  trunk
changeset: 782327:1af8899e23d1
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sun Oct 28 17:06:40 2012 +0000

description:
For GCC 4.1 and later, use the __alignof__ keyword.

diffstat:

 sys/sys/cdefs.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r c3360647e686 -r 1af8899e23d1 sys/sys/cdefs.h
--- a/sys/sys/cdefs.h   Sun Oct 28 16:41:01 2012 +0000
+++ b/sys/sys/cdefs.h   Sun Oct 28 17:06:40 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cdefs.h,v 1.102 2012/10/22 14:00:07 christos Exp $     */
+/*     $NetBSD: cdefs.h,v 1.103 2012/10/28 17:06:40 joerg Exp $        */
 
 /*
  * Copyright (c) 1991, 1993
@@ -500,7 +500,7 @@
 /*
  * Return the natural alignment in bytes for the given type
  */
-#ifdef __alignof__
+#if __GNUC_PREREQ__(4, 1)
 #define        __alignof(__t)  __alignof__(__t)
 #else
 #define __alignof(__t) (sizeof(struct { char __x; __t __y; }) - sizeof(__t))



Home | Main Index | Thread Index | Old Index