[fpc-devel] CreateGUID implementation attached

Danny Milosavljevic danny.milo at gmx.net
Thu May 19 17:40:52 CEST 2005


Hi,

attached you find a CreateGUID implementation that creates (time-based)
guids. These follow a low-high approach, with a random part and a time
part.

If available, uses libuuid.so.1 and /dev/urandom. Otherwhise uses manual
implementation (which sucks - just test by while true ;
do ./createguid ; done and behold all the equal guids) as a fallback.

The function should be pretty usable *if* libuuid.so.1 is available, and
pretty dangerous if not. I'll not be improving the fallback further
though. Someone wants to step in?

cheers,
   Danny
-- 
www.keyserver.net key id A334AEA6

-------------- next part --------------
A non-text attachment was scrubbed...
Name: createguid.pas
Type: text/x-pascal
Size: 4078 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20050519/ad2ce430/attachment.pas>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20050519/ad2ce430/attachment.sig>


More information about the fpc-devel mailing list