History log of /freebsd-current/lib/libc/uuid/uuid_compare.c
Revision Date Author Comments
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# d915a14e 25-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

libc: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 77fbf8f2 04-Apr-2007 Xin LI <delphij@FreeBSD.org>

Avoid using intermediate variables by just comparing between
two values, the latter does not tend to have sign extension
and/or overflow bugs, and makes the code more obvious.

While I'm there, make use of a macro which is derived from
bin/ps/ps.c: ps_compat() to improve the readability of the
code.

Suggested by: bde
MFC after: 1 week


# da4ab3aa 02-Aug-2006 Xin LI <delphij@FreeBSD.org>

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


# 1d1b40fe 02-Jan-2005 Marcel Moolenaar <marcel@FreeBSD.org>

Constify arguments.


# 10b35e00 08-Aug-2003 Marcel Moolenaar <marcel@FreeBSD.org>

Remove stale DCE 1.1 pointers to the IBM site. The URLs aren't valid
anymore. This also fixes long line bugs caused by the lengthy URLs :-)


# 3031a431 08-Aug-2003 Marcel Moolenaar <marcel@FreeBSD.org>

Fix two (2) bugs in one (1) statement:
o fix the len argument of memcmp(3) to be the size of the node field
of the uuid structure, not the size of the uuid structure itself.
We're comparing the node fields...
o uuid_compare(3) is specified to return -1, 0 or 1, depending on
the outcome of the comparison. memcmp(3) returns the difference
between the first differing bytes. Hence, we cannot ever return
the return value of memcmp(3) as-is.

PR: standards/55370
Submitted by: Konstantin Oznobihin <bork@rsu.ru>


# 65393a86 29-Oct-2002 Marcel Moolenaar <marcel@FreeBSD.org>

Implement DCE 1.1 compliant UUID functions. Immediate use of these
functions is expected for uuidgen(1), mca(8) and gpt(8). Given the
generic use of UUIDs beyond the scope of the DCE 1.1 specification,
visibility of the data structure at all levels of the machine,
including firmware and the wish to not create a permanent build-
time FreeBSD-ism for DCE compliant applications by creating a new
library, it was decided that libc would be the least inappropriate
place. Also, because the UUID functions live in libc under IRIX as
well, we have maximized our portability and left as many options
open as possible.

This implementation introduces an extension not found in the
specification: the status parameter is allowed to be a NULL-
pointer. The reason for introducing the extension is because
the status is almost never of any use.

The manpage that's part of this commit is a minimal place-holder
and is further fleshed-out in the near future.

Approved by: re@
Contributed by: Hiten Mahesh Pandya <hiten@unixdaemons.com>
Sponsored by: marcel :-)
Tested on: alpha, i386, ia64