diff options
| author | peter <peter@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2007-10-30 07:06:42 +0000 |
|---|---|---|
| committer | peter <peter@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2007-10-30 07:06:42 +0000 |
| commit | da30b02557995b2e986d760ce20d2a716ccdaaa0 (patch) | |
| tree | 776a9d34ce178a8eb72c821a2ebc49381298590b /packages/hash | |
| parent | 1ba29f0b445f331b8e4a4969a93b6aafafb13faf (diff) | |
| download | fpc-da30b02557995b2e986d760ce20d2a716ccdaaa0.tar.gz | |
* fix compile with 2.0
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@8996 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/hash')
| -rw-r--r-- | packages/hash/src/uuid.pas | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/packages/hash/src/uuid.pas b/packages/hash/src/uuid.pas index 131bc10040..15046d033a 100644 --- a/packages/hash/src/uuid.pas +++ b/packages/hash/src/uuid.pas @@ -30,7 +30,33 @@ uses ******************************************************************************) type +{$ifdef VER2_0} + uuid_t = packed record + case integer of + 1 : ( + Data1 : DWord; + Data2 : word; + Data3 : word; + Data4 : array[0..7] of byte; + ); + 2 : ( + D1 : DWord; + D2 : word; + D3 : word; + D4 : array[0..7] of byte; + ); + 3 : ( { uuid fields according to RFC4122 } + time_low : dword; // The low field of the timestamp + time_mid : word; // The middle field of the timestamp + time_hi_and_version : word; // The high field of the timestamp multiplexed with the version + clock_seq_hi_and_reserved : byte; // The high field of the clock sequence multiplexed with the var + clock_seq_low : byte; // The low field of the clock sequence + node : array[0..5] of byte; // The spatially unique node identifier + ); + end; +{$else VER2_0} uuid_t = TGuid; +{$endif VER2_0} uuid_time_t = qword; uuid_node_t = array[0..5] of byte; unsigned16 = word; @@ -140,7 +166,7 @@ end; { uuid_create } -function uuid_create(var uuid: TGuid): boolean; +function uuid_create(var uuid: uuid_t): boolean; var timestamp: uuid_time_t; last_time: uuid_time_t; |
