Makes on-the-fly conversion of the inverted index
byteorder if cscope detects that index file has been
written on architecture with different endianess. This
patch meant for 32-bit machines, but it can be easily
extended to handle 64 bits too.
Tested on Linux 2.6 and Solaris 2.7
patch for sf cscope-15.5
Logged In: YES
user_id=27517
I can't test this patch myself for lack of any big-endian
machine where it would make a difference.
It seems to be going in the right direction. It's probably
worth checking in as-is, but I'd like to see confirmation
that it actually works, before we embark on such a
potentially dangerous journey. My main concern is that this
introduces an incompatible change to the file format. I.e.
it could break situations that used to work, even if they
did so more by luck than by design.
Logged In: YES
user_id=1338047
I think incompatible change to file format you are talking
about is not really needed. It was added mostly for
debugging and as a hopeless try to make inverted index
header more suitable for portability. I will change this and
post updated patch here. In this shape, index file produced
by patched cscope will be 100% identical to file build by
stable one.
Logged In: YES
user_id=1338047
Here is the updated patch for cscope 15.5. This time the
patch has been cleaned out of incompatible and unrelated
changes.
convert byteorder of inverted index
convert byteorder of inverted index, cvs20051122
Logged In: YES
user_id=1338047
Same patch against cvs20051122
Logged In: YES
user_id=27517
Patch is looking good, except for two details:
1) we don't need patches to 15.5 --- if this goes into any
cscope release, it'll be the next one, based on current CVS
head.
2) A technicality: write_params() is using the contents of a
block-scoped variable after that block has been quit.
That's undefined behaviour.