Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/genassym Use __builtin_offsetof if __GNUC__ >= 4
details: https://anonhg.NetBSD.org/src/rev/d5408afd9e69
branches: trunk
changeset: 766958:d5408afd9e69
user: matt <matt%NetBSD.org@localhost>
date: Tue Jul 05 05:19:02 2011 +0000
description:
Use __builtin_offsetof if __GNUC__ >= 4
diffstat:
usr.bin/genassym/genassym.sh | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (22 lines):
diff -r dd27e303c3d9 -r d5408afd9e69 usr.bin/genassym/genassym.sh
--- a/usr.bin/genassym/genassym.sh Tue Jul 05 04:33:23 2011 +0000
+++ b/usr.bin/genassym/genassym.sh Tue Jul 05 05:19:02 2011 +0000
@@ -1,5 +1,5 @@
#!/bin/sh -
-# $NetBSD: genassym.sh,v 1.6 2009/11/28 20:30:01 dsl Exp $
+# $NetBSD: genassym.sh,v 1.7 2011/07/05 05:19:02 matt Exp $
#
# Copyright (c) 1997 Matthias Pfaller.
# All rights reserved.
@@ -79,7 +79,11 @@
$AWK '
BEGIN {
+ printf("#if __GNUC__ >= 4\n");
+ printf("#define offsetof(type, member) __builtin_offsetof(type, member)\n");
+ printf("#else\n");
printf("#define offsetof(type, member) ((size_t)(&((type *)0)->member))\n");
+ printf("#endif\n");
defining = 0;
type = "long";
asmtype = "n";
Home |
Main Index |
Thread Index |
Old Index