pkgsrc/security/sfs/patches/patch-bb
agc 94df3e688c Update sfs to 0.7.2nb7
+ add support for gcc4
2006-10-21 11:53:13 +00:00

138 lines
4.6 KiB
Text

$NetBSD: patch-bb,v 1.1 2006/10/21 11:53:13 agc Exp $
--- ./sfscd/ctlnode.C.orig 2002-09-26 20:10:30.000000000 +0100
+++ ./sfscd/ctlnode.C
@@ -34,9 +34,9 @@ void
fh2bytes (fhbytes *data, const svccb *sbp)
{
if (sbp->vers () == 2)
- *data = sbp->template getarg<nfs_fh> ()->data;
+ *data = sbp->getarg<nfs_fh> ()->data;
else
- *data = sbp->template getarg<nfs_fh3> ()->data;
+ *data = sbp->getarg<nfs_fh3> ()->data;
}
inline afsnode::inum_t
@@ -55,7 +55,7 @@ getsattr3 (sattr3 *s, svccb *sbp)
switch (sbp->vers ()) {
case 2:
{
- sattr *sp = &sbp->template getarg<sattrargs> ()->attributes;
+ sattr *sp = &sbp->getarg<sattrargs> ()->attributes;
const u_int32_t nochange ((u_int32_t) -1);
if (sp->mode != nochange) {
s->mode.set_set (true);
@@ -85,7 +85,7 @@ getsattr3 (sattr3 *s, svccb *sbp)
}
}
case 3:
- *s = sbp->template getarg<setattr3args> ()->new_attributes;
+ *s = sbp->getarg<setattr3args> ()->new_attributes;
break;
default:
panic ("getsattr3: bad NFS version %d\n", sbp->vers ());
@@ -209,12 +209,12 @@ msgnode::nfs_setattr (svccb *sbp)
}
if (sbp->vers () == 2) {
- attrstat *resp = sbp->template getres<attrstat> ();
+ attrstat *resp = sbp->getres<attrstat> ();
resp->set_status (NFS_OK);
mkfattr (resp->attributes.addr (), sbp2aid (sbp));
}
else {
- wccstat3 *resp = sbp->template getres<wccstat3> ();
+ wccstat3 *resp = sbp->getres<wccstat3> ();
resp->set_status (NFS3_OK);
mkpoattr (resp->wcc->after, sbp2aid (sbp));
}
@@ -237,13 +237,13 @@ msgnode::nfs_write (svccb *sbp)
const char *data;
if (sbp->vers () == 2) {
- writeargs *argp = sbp->template getarg<writeargs> ();
+ writeargs *argp = sbp->getarg<writeargs> ();
off = argp->offset;
len = argp->data.size ();
data = argp->data.base ();
}
else {
- write3args *argp = sbp->template getarg<write3args> ();
+ write3args *argp = sbp->getarg<write3args> ();
off = argp->offset;
len = argp->data.size ();
data = argp->data.base ();
@@ -261,12 +261,12 @@ msgnode::nfs_write (svccb *sbp)
memcpy (buf + off, data, len);
if (sbp->vers () == 2) {
- attrstat *resp = sbp->template getres<attrstat> ();
+ attrstat *resp = sbp->getres<attrstat> ();
resp->set_status (NFS_OK);
mkfattr (resp->attributes.addr (), sbp2aid (sbp));
}
else {
- write3res *resp = sbp->template getres<write3res> ();
+ write3res *resp = sbp->getres<write3res> ();
resp->set_status (NFS3_OK);
resp->resok->count = len;
// resp->resok->committed = sbp->template getarg<write3args> ()->stable;
@@ -290,12 +290,12 @@ msgnode::nfs_read (svccb *sbp)
size_t off, len;
if (sbp->vers () == 2) {
- readargs *argp = sbp->template getarg<readargs> ();
+ readargs *argp = sbp->getarg<readargs> ();
off = argp->offset;
len = argp->count;
}
else {
- read3args *argp = sbp->template getarg<read3args> ();
+ read3args *argp = sbp->getarg<read3args> ();
off = argp->offset;
len = argp->count;
}
@@ -398,7 +398,7 @@ ctlnode::nfs3_access (svccb *sbp)
if (sbp2aid (sbp) == aid)
res.resok->access = ((ACCESS3_READ | ACCESS3_LOOKUP
| ACCESS3_MODIFY | ACCESS3_EXTEND)
- & sbp->template getarg<access3args> ()->access);
+ & sbp->getarg<access3args> ()->access);
else
res.resok->access = 0;
sbp->reply (&res);
@@ -437,8 +437,8 @@ void
ctldir::nfs_remove (svccb *sbp)
{
str name = sbp->vers () == 2
- ? str (sbp->template getarg<diropargs> ()->name)
- : str (sbp->template getarg<diropargs3> ()->name);
+ ? str (sbp->getarg<diropargs> ()->name)
+ : str (sbp->getarg<diropargs3> ()->name);
if (!unlink (name))
nfs_error (sbp, NFSERR_NOENT);
@@ -454,11 +454,11 @@ ctldir::nfs_create (svccb *sbp)
str name;
if (sbp->vers () == 2) {
- createargs *ca = sbp->template getarg<createargs> ();
+ createargs *ca = sbp->getarg<createargs> ();
name = ca->where.name;
}
else {
- create3args *ca = sbp->template getarg<create3args> ();
+ create3args *ca = sbp->getarg<create3args> ();
name = ca->where.name;
if (ca->how.mode == GUARDED && lookup (name, sbp2aid (sbp))) {
nfs3_err (sbp, NFS3ERR_EXIST);
@@ -492,7 +492,7 @@ ctldir::nfs3_access (svccb *sbp)
res.resok->access = ACCESS3_READ | ACCESS3_LOOKUP | ACCESS3_EXECUTE;
if (sbp2aid (sbp) == aid)
res.resok->access |= ACCESS3_DELETE | ACCESS3_EXTEND | ACCESS3_MODIFY;
- res.resok->access &= sbp->template getarg<access3args> ()->access;
+ res.resok->access &= sbp->getarg<access3args> ()->access;
sbp->reply (&res);
}