[reporter="johnk", created="Tue, 14 Feb 2006 15:48:00 -0500 (GMT-05:00)"]
PseudoUuid's fallback mode if libuuid (rather uuid/uuid.h) is not found at initBuild time is to call rand() to generate new UUIDs. This effectively generates the same UUID sequence after each restart, as srand() is not called anywhere from within Fennel. (Not calling srand() first is the same as calling srand(1)).
Calling srand(time(NULL)) in a library like Fennel seems rude.
(Calling rand() w/o thread protection is also a bit iffy too.)
Perhaps the fallback mode should be removed, and it should simply throw an exception -- allowing fennel to be built, but UUID-dependent features (if any?) will fail. This suggestion may be nonsense.
[author="jvs", created="Tue, 14 Feb 2006 16:21:24 -0500 (GMT-05:00)"]
Maybe we should just make it a mandatory dependency for the build. I've been thinking about doing the same for libaiodev.
[reporter="johnk", created="Tue, 14 Feb 2006 15:48:00 -0500 (GMT-05:00)"] PseudoUuid's fallback mode if libuuid (rather uuid/uuid.h) is not found at initBuild time is to call rand() to generate new UUIDs. This effectively generates the same UUID sequence after each restart, as srand() is not called anywhere from within Fennel. (Not calling srand() first is the same as calling srand(1)).
Calling srand(time(NULL)) in a library like Fennel seems rude.
(Calling rand() w/o thread protection is also a bit iffy too.)
Perhaps the fallback mode should be removed, and it should simply throw an exception -- allowing fennel to be built, but UUID-dependent features (if any?) will fail. This suggestion may be nonsense.