From a7ab29bf577fc70005b759e34769772771c6dce5 Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Thu, 22 Nov 2012 20:25:32 +0100 Subject: [PATCH] genassym.sh update Change-Id: Ibacd47683f7a668eb1dd717014f904581ecebccb --- releasetools/nbsd_ports | 5 +---- usr.bin/genassym/genassym.sh | 6 +++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/releasetools/nbsd_ports b/releasetools/nbsd_ports index db41ed10d..7d9fb403e 100644 --- a/releasetools/nbsd_ports +++ b/releasetools/nbsd_ports @@ -85,10 +85,7 @@ 2012/10/10 16:16:12,usr.sbin/mtree 2012/02/10 16:16:12,usr.sbin/chroot 2011/01/17 18:11:10,usr.bin/ldd -2011/01/17 18:11:10,external/bsd/file -2011/01/17 18:11:10,lib/csu -2011/01/17 18:11:10,libexec/ld.elf_so -2011/01/17 18:11:10,usr.bin/genassym +2012/10/17 12:00:00,usr.bin/genassym 2012/02/10 16:16:12,usr.bin/su 2011/12/25 06:09:09,sys/arch/i386/stand 2012/02/10 16:16:12,share/zoneinfo diff --git a/usr.bin/genassym/genassym.sh b/usr.bin/genassym/genassym.sh index 1cf2166b8..3f8f2beac 100644 --- a/usr.bin/genassym/genassym.sh +++ b/usr.bin/genassym/genassym.sh @@ -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 @@ trap "rm -rf $genassym_temp" 0 1 2 3 15 $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"; -- 2.44.0