diff options
author | christos <christos@pkgsrc.org> | 2011-09-01 13:00:49 +0000 |
---|---|---|
committer | christos <christos@pkgsrc.org> | 2011-09-01 13:00:49 +0000 |
commit | 02b3994356bb839400508a458be06898f379cbf7 (patch) | |
tree | 2c8377c7cb7a50283c369a77596e01af5abec311 | |
parent | 06974d79176546c5d7a3fda0c6c3e1e23388be8e (diff) | |
download | pkgsrc-02b3994356bb839400508a458be06898f379cbf7.tar.gz |
make syscalls generation code handle old style [5.x] syscalls.master
-rw-r--r-- | sysutils/strace/Makefile | 4 | ||||
-rw-r--r-- | sysutils/strace/distinfo | 4 | ||||
-rw-r--r-- | sysutils/strace/patches/patch-av | 31 |
3 files changed, 26 insertions, 13 deletions
diff --git a/sysutils/strace/Makefile b/sysutils/strace/Makefile index d87f65d0861..63d8c23ead1 100644 --- a/sysutils/strace/Makefile +++ b/sysutils/strace/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.16 2011/08/30 10:43:11 christos Exp $ +# $NetBSD: Makefile,v 1.17 2011/09/01 13:00:49 christos Exp $ # DISTNAME= strace-4.5.15 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=strace/} EXTRACT_SUFX= .tar.bz2 diff --git a/sysutils/strace/distinfo b/sysutils/strace/distinfo index e269ae98ab0..ae6fd851af5 100644 --- a/sysutils/strace/distinfo +++ b/sysutils/strace/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.16 2011/08/30 10:43:11 christos Exp $ +$NetBSD: distinfo,v 1.17 2011/09/01 13:00:49 christos Exp $ SHA1 (strace-4.5.15.tar.bz2) = a6bd153eeb1a25a50bb5a1d92887a4911ec9ad48 RMD160 (strace-4.5.15.tar.bz2) = 0c6aaa8820a0985d89b21a5da9578b27435c8906 @@ -24,7 +24,7 @@ SHA1 (patch-ar) = 12b13f8b7e2054cbe57da6b502f3fe49b91de9ff SHA1 (patch-as) = b241a70fb33aabb8282578a124b04aca05f0d3f2 SHA1 (patch-at) = da44d0101eb069ea231bdce7051af357e43cb3d1 SHA1 (patch-au) = 39ce7d7234ac3df0a7db24d0310989015b981a91 -SHA1 (patch-av) = edad2a6a0251992fcecd1e05868ab9a173a00911 +SHA1 (patch-av) = 614d46d4da04dac3d9fadcb1cd744bab860361c3 SHA1 (patch-aw) = 6d9c8243df401fb18e621c8965667778640c9d01 SHA1 (patch-ax) = 6bb4fdfaf26f9ded736f0aa8f0209815ccbea199 SHA1 (patch-ay) = 9a6942117fc4d26a9256a573559597560295d9c0 diff --git a/sysutils/strace/patches/patch-av b/sysutils/strace/patches/patch-av index 73f7c927e4f..905afcf9de6 100644 --- a/sysutils/strace/patches/patch-av +++ b/sysutils/strace/patches/patch-av @@ -1,8 +1,8 @@ -$NetBSD: patch-av,v 1.3 2011/08/30 10:43:11 christos Exp $ +$NetBSD: patch-av,v 1.4 2011/09/01 13:00:49 christos Exp $ ---- syscalls.pl.orig 2011-08-30 13:27:50.000000000 +0300 -+++ syscalls.pl 2011-08-30 12:41:16.000000000 +0300 -@@ -0,0 +1,171 @@ +--- /dev/null 2011-09-01 15:59:46.000000000 +0300 ++++ syscalls.pl 2011-09-01 15:59:28.000000000 +0300 +@@ -0,0 +1,184 @@ +#!/usr/pkg/bin/perl -w +# +# Copyright (c) 2000, Gaël Roualland <gael.roualland@iname.com> @@ -30,7 +30,7 @@ $NetBSD: patch-av,v 1.3 2011/08/30 10:43:11 christos Exp $ +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# -+# $Id: patch-av,v 1.3 2011/08/30 10:43:11 christos Exp $ ++# $Id: patch-av,v 1.4 2011/09/01 13:00:49 christos Exp $ +#/ + +# Buils syscall.h and syscallent.h from: @@ -117,7 +117,8 @@ $NetBSD: patch-av,v 1.3 2011/08/30 10:43:11 christos Exp $ + + if (/^(\d+)\s+(\w+)\s+\{\s*([^}]+)\s*\}([^}]*)$/ || + /^(\d+)\s+(\w+)\s+\w+\s+\{\s*([^}]+)\s*\}([^}]*)$/) { -+ my($compat, $proto, $ext, $name, $nargs, @fun, @args, $pfunc, $cat, $num); ++ my($compat, $proto, $ext, $name, $nargs, @args, $pfunc, $cat, $num); ++ my(@fun, $xproto, $oldstyle); + $num = $1; + if ($2 eq 'OBSOL' || $2 eq 'UNIMPL') { + $sysnum++; @@ -145,12 +146,24 @@ $NetBSD: patch-av,v 1.3 2011/08/30 10:43:11 christos Exp $ + + # int|sys||name(args); + @fun = split(/\|/, $proto); ++ $oldstyle = @fun; ++ if ($oldstyle == 1) { ++ $xproto = $proto; ++ } else { ++ $xproto = $fun[3]; ++ } + -+ if ($fun[3] =~ /^(\w+)\(([^)]*)\); /) { ++ if (($oldstyle == 1 && $xproto =~ /^[^\s]+\s+([^\s]+)\s*\(([^)]*)\);/) ++ || ($oldstyle != 1 && $xproto =~ /^(\w+)\(([^)]*)\); /)) { + my @args = split(/,/, $2); + $nargs = @args; + $name = $1; -+ $name = "__" . $name . $fun[2] if ($fun[2] ne ""); ++ if ($oldstyle == 1) { ++ $name = substr($name, 1) if (substr($name, 0, 1) eq "*"); ++ $name = substr($name, 4); ++ } else { ++ $name = "__" . $name . $fun[2] if ($fun[2] ne ""); ++ } + if (defined($sysprint{$name})) { + $pfunc = $sysprint{$name}; + print SYSCALL "int $pfunc();\n"; @@ -166,7 +179,7 @@ $NetBSD: patch-av,v 1.3 2011/08/30 10:43:11 christos Exp $ + print " { $nargs,\t$cat,\t$pfunc,\t\"$name\"\t}, /* $sysnum */\n"; + $sysnum++; + } else { -+ warn "bad syscall specification for $sysnum: >$fun[3]<"; ++ warn "bad syscall specification for $sysnum: >$xproto<"; + } + } else { + # warn "unregognized line $_"; |