[File] Big endianess problem on s390x?
Vadim (vadcx)
vad.mailingfile at vad.cx
Wed May 20 02:13:23 EDT 2026
Using a dynamic keyword is rarely going to be ideal. Although "leguid"
being an alias for "guid" is silly too, but manageable.
The file formats are fixed, like wire protocols. Reading an x86-native
file format on s390x isn't gonna magically make it big-endian.
1. keep guid == leguid, and beguid
2. fix how they are read into memory and printed
3. deprecate "guid" because it took years(?) to notice this mistake (be
explicit, even if more verbose: less room for error)
4. remove "guid" in the future
>> Guy Harris wrote:
>> file.git, it appears that there are data item types "beguid",
>> "leguid", and "guid", with "guid" being equivalent to "leguid". The
>> only difference between them appears to be how they're printed, i.e.
> Christos Zoulas wrote:
> I think that's exactly right and then way the code is done now is
> probably wrong and should be fixed.
> The question is do we default "guid" to the endianness of the system
> (because that would require fixing all the
> magic that is currently guid to leguid) or do we alias it with leguid?
--
Cheers,
Vadim
More information about the File
mailing list