freebsd-dev/lib/libc/uuid
Xin LI da4ab3aa26 In DCE 1.1, the time_low value is defined as an unsigned 32-bit
integer.  Presently, our implementation employs an approach that
converts the value to int64_t, then back to int, unfortunately,
this approach can be problematic when the the difference between
the two time_low is larger than 0x7fffffff, as the value is then
truncated to int.

To quote the test case from the original PR, the following is
true with the current implementation:

865e1a56-b9d9-11d9-ba27-0003476f2e88 < 062ac45c-b9d9-11d9-ba27-0003476f2e88

However, according to the DCE specification, the expected result
should be:

865e1a56-b9d9-11d9-ba27-0003476f2e88 > 062ac45c-b9d9-11d9-ba27-0003476f2e88

This commit adds a new intermediate variable which uses int64_t
to store the result of subtraction between the two time_low values,
which would not introduce different semantic of the MSB found in
time_low value.

PR:		83107
Submitted by:	Steve Sears <sjs at acm dot org>
MFC After:	1 month
2006-08-03 03:34:36 +00:00
..
Makefile.inc Add each directory's symbol map file to SYM_MAPS. 2006-03-13 01:15:01 +00:00
Symbol.map Add symbol maps and initial symbol version definitions to libc. 2006-03-13 00:53:21 +00:00
uuid_compare.c In DCE 1.1, the time_low value is defined as an unsigned 32-bit 2006-08-03 03:34:36 +00:00
uuid_create_nil.c Remove stale DCE 1.1 pointers to the IBM site. The URLs aren't valid 2003-08-08 19:18:43 +00:00
uuid_create.c Remove stale DCE 1.1 pointers to the IBM site. The URLs aren't valid 2003-08-08 19:18:43 +00:00
uuid_equal.c Constify arguments. 2005-01-03 02:56:15 +00:00
uuid_from_string.c Remove stale DCE 1.1 pointers to the IBM site. The URLs aren't valid 2003-08-08 19:18:43 +00:00
uuid_hash.c Constify arguments. 2005-01-03 02:56:15 +00:00
uuid_is_nil.c Avoid (unnecessarily) casting away const within uuid_is_nil. 2005-05-11 13:18:10 +00:00
uuid_to_string.c Constify arguments. 2005-01-03 02:56:15 +00:00
uuid.3 Keep up with const poisoning in uuid.h,v 1.3. 2005-11-24 07:04:20 +00:00