[File] GUID, UUID, endianness, and all the rest
Christos Zoulas
christos at zoulas.com
Sun May 17 13:10:38 EDT 2026
Committed a fix, thanks!
christos
> On May 17, 2026, at 8:27 AM, Christoph Biedl <astron.com.bwoj at manchmal.in-ulm.de> wrote:
>
> Christoph Biedl wrote...
>
>> * The current handling of guid is buggy on BE. I don't know where to
>> fix, perhaps in mconvert.
>
> This one does the trick for me - I doubt however it matches file's
> coding philosophy (WORDS_BIGENDIAN isn't used anywhere else in the
> code).
>
> --- a/src/funcs.c
> +++ b/src/funcs.c
> @@ -931,6 +931,11 @@ file_parse_guid(const char *s, uint64_t *guid)
> !getxvalue(&g->data4[6], s + 8, 2) ||
> !getxvalue(&g->data4[7], s + 10, 2))
> return -1;
> +#ifdef WORDS_BIGENDIAN
> + g->data1 = file_swap4(g->data1);
> + g->data2 = file_swap2(g->data2);
> + g->data3 = file_swap2(g->data3);
> +#endif
> return 0;
> }
>
> --
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <http://mailman.astron.com/pipermail/file/attachments/20260517/0ea1605e/attachment.asc>
More information about the File
mailing list