Module Name: src Committed By: joerg Date: Sun Oct 28 17:06:41 UTC 2012
Modified Files: src/sys/sys: cdefs.h Log Message: For GCC 4.1 and later, use the __alignof__ keyword. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/sys/cdefs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/sys/cdefs.h diff -u src/sys/sys/cdefs.h:1.102 src/sys/sys/cdefs.h:1.103 --- src/sys/sys/cdefs.h:1.102 Mon Oct 22 14:00:07 2012 +++ src/sys/sys/cdefs.h Sun Oct 28 17:06:40 2012 @@ -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))