(snipped out comments about endianess etc... Yup, I knew that of course,
but I don't think it matters in this case.)

> That said, I can live with this because it is only the fallback
> mechanism, only on Windows, and it concerns only four bytes.

Yup - and I don't think the randomness is really all that critical at
the point where it is being used; it's all part of Matt's Preferences
extensions, and I'm not sure that the actual UUID value generated is all
that critical.

I'd hope that the generated value was Good Enough for most UUID purposes
- I assume no one is intending on using this code for generating cipher
keys though!

> Are there any current (or, for this case *older*) Windows
> versions on big-endian machines at all?

I'd say no. ARM can be big-endian, so that might matter. WP7 port,
anyone?

> And, to be honest, the existing code has the same issues...

Yup - we are no worse off, and this is portably bad, rather than
32-bit-only-bad code!

More worryingly, I notice that the "unix" branch of that conditional
section has the same error in its implementation, so we need to fix that
too, I think.

> Thus, I think it is okay to use, but we should be aware of this.
> Unless someone has a better idea... ;-)

My "better idea" is to hope that the code finds the UuidCreate()
function at runtime and does not even fall-back into this code at all!

SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to