Attached is a patch which I just used to build coda with GCC-2.95. However, I haven't had a chance to test this, so someone let me know how this works. I had to remove a couple of 'goto's in once place since the compiler was picky about the jump crossing an initialization of something or another, and I would like someone to take a look at it and make sure I got the logic right. As for adding the -fpermissive flag, here is what I use in my RPM spec file: MYFLAGS="$RPM_OPT_FLAGS -fpermissive" make -------------------------------------------------------------------------- | Troy Benjegerdes | [EMAIL PROTECTED] | [EMAIL PROTECTED] | | Unix is user friendly... You just have to be friendly to it first. | | This message composed with 100% free software. http://www.gnu.org | --------------------------------------------------------------------------
diff -ur coda-5.2.7/coda-src/rpc2/multi2.c coda-5.2.7-new/coda-src/rpc2/multi2.c --- coda-5.2.7/coda-src/rpc2/multi2.c Mon Apr 12 19:00:35 1999 +++ coda-5.2.7-new/coda-src/rpc2/multi2.c Fri Aug 27 14:36:19 1999 @@ -151,7 +151,7 @@ case RPC2_BYTE_TAG: /* 2: begin of case RPC2_BYTE_TAG */ switch(a_types->mode) { case IN_MODE: - va_array[i].byte = va_arg(ap, RPC2_Byte); + va_array[i].byte = (RPC2_Byte)va_arg(ap, int); break; case OUT_MODE: case IN_OUT_MODE: diff -ur coda-5.2.7/coda-src/util/rec_smolist.h coda-5.2.7-new/coda-src/util/rec_smolist.h --- coda-5.2.7/coda-src/util/rec_smolist.h Mon Dec 21 16:27:29 1998 +++ coda-5.2.7-new/coda-src/util/rec_smolist.h Fri Aug 27 14:53:23 1999 @@ -107,7 +107,7 @@ class rec_smolink { friend class rec_smolist; friend class rec_smolist_iterator; - friend void main(int , char **); + friend int main(int , char **); rec_smolink *next; public: rec_smolink(); diff -ur coda-5.2.7/coda-src/volutil/vol-setvv.cc coda-5.2.7-new/coda-src/volutil/vol-setvv.cc --- coda-5.2.7/coda-src/volutil/vol-setvv.cc Wed Jan 20 13:32:24 1999 +++ coda-5.2.7-new/coda-src/volutil/vol-setvv.cc Fri Aug 27 14:51:21 1999 @@ -100,70 +100,72 @@ VPutVolume(vp); } rvmlib_abort(error); - goto exit; - } - /* VGetVnode moved from after VOffline to here 11/88 ***/ - vnp = VGetVnode(&error, vp, vnodeid, unique, WRITE_LOCK, 1); - if (error && error != EIO) { - VLog(0, "S_VolSetVV: VGetVnode failed with %d", error); - VPutVolume(vp); - rvmlib_abort(VFAIL); - goto exit; - } - - if (error && error == EIO) { - /* barren object - debarrenize it - setvv is overloaded here */ - vnp = VGetVnode(&error, vp, vnodeid, unique, WRITE_LOCK, 1, 1); - CODA_ASSERT(IsBarren(vnp->disk.versionvector)); + //goto exit; + } else { + /* VGetVnode moved from after VOffline to here 11/88 ***/ + vnp = VGetVnode(&error, vp, vnodeid, unique, WRITE_LOCK, 1); + if (error && error != EIO) { + VLog(0, "S_VolSetVV: VGetVnode failed with %d", error); + VPutVolume(vp); + rvmlib_abort(VFAIL); + //goto exit; + } else { // BAD goto, bad + + if (error && error == EIO) { + /* barren object - debarrenize it - setvv is overloaded here */ + vnp = VGetVnode(&error, vp, vnodeid, unique, WRITE_LOCK, 1, 1); + CODA_ASSERT(IsBarren(vnp->disk.versionvector)); - VLog(0, "%x.%x.%x is barren - Debarrenizing it", - V_id(vp), vnp->vnodeNumber, vnp->disk.uniquifier); - VLog(0, "Object will be inconsistent and input vector is ignored"); - - /* clear the barren flag - make sure object will be marked - inconsistent; create a new inode so salvager will not complain */ - ClearBarren(vnp->disk.versionvector); - SetIncon(vnp->disk.versionvector); - - /* Clear the cloned flag since we're changing the inodeNumber. */ - vnp->disk.cloned = 0; + VLog(0, "%x.%x.%x is barren - Debarrenizing it", + V_id(vp), vnp->vnodeNumber, vnp->disk.uniquifier); + VLog(0, "Object will be inconsistent and input vector is ignored"); + + /* clear the barren flag - make sure object will be marked + inconsistent; create a new inode so salvager will not complain */ + ClearBarren(vnp->disk.versionvector); + SetIncon(vnp->disk.versionvector); + + /* Clear the cloned flag since we're changing the inodeNumber. */ + vnp->disk.cloned = 0; - vnp->disk.dataVersion++; - vnp->disk.inodeNumber = icreate((int)V_device(vp), 0, (int)V_id(vp), + vnp->disk.dataVersion++; + vnp->disk.inodeNumber = icreate((int)V_device(vp), 0, (int)V_id(vp), (int)vnp->vnodeNumber, (int)vnp->disk.uniquifier, (int)vnp->disk.dataVersion); - } else - bcopy((const void *)vv, (void *)&(Vnode_vv(vnp)), sizeof(ViceVersionVector)); + } else + bcopy((const void *)vv, (void *)&(Vnode_vv(vnp)), +sizeof(ViceVersionVector)); - /* update volume version vector, break callbacks */ - vre = VRDB.find(V_groupId(vp)); /* Look up the VRDB entry. */ - if (!vre) Die("S_VolSetVV: VSG not found!"); - - ix = vre->index(ThisHostAddr); /* Look up the index of this host. */ - if (ix < 0) Die("S_VolSetVV: this host not found!"); - - /* Fashion an UpdateSet using just ThisHost. */ - ViceVersionVector UpdateSet = NullVV; - (&(UpdateSet.Versions.Site0))[ix] = 1; - AddVVs(&V_versionvector(vp), &UpdateSet); - - fid.Volume = formal_volid; fid.Vnode = vnodeid; fid.Unique = unique; - CodaBreakCallBack(0, &fid, formal_volid); - - VPutVnode((Error *)&error, vnp); - if (error){ - VLog(0, "S_VolSetVV: VPutVnode failed with %d", error); - VPutVolume(vp); - rvmlib_abort(VFAIL); - goto exit; - } + /* update volume version vector, break callbacks */ + vre = VRDB.find(V_groupId(vp)); /* Look up the VRDB entry. */ + if (!vre) Die("S_VolSetVV: VSG not found!"); + + ix = vre->index(ThisHostAddr); /* Look up the index of this host. +*/ + if (ix < 0) Die("S_VolSetVV: this host not found!"); + + /* Fashion an UpdateSet using just ThisHost. */ + ViceVersionVector UpdateSet = NullVV; + (&(UpdateSet.Versions.Site0))[ix] = 1; + AddVVs(&V_versionvector(vp), &UpdateSet); + + fid.Volume = formal_volid; fid.Vnode = vnodeid; fid.Unique = unique; + CodaBreakCallBack(0, &fid, formal_volid); + + VPutVnode((Error *)&error, vnp); + if (error){ + VLog(0, "S_VolSetVV: VPutVnode failed with %d", error); + VPutVolume(vp); + rvmlib_abort(VFAIL); + // goto exit; + } else { - VPutVolume(vp); - rvmlib_end_transaction(flush, &(status)); + VPutVolume(vp); + rvmlib_end_transaction(flush, &(status)); - exit: + } + } + } // exit: VDisconnectFS(); if (status) VLog(0, "S_VolSetVV failed with %d", status);