Factor out UUID handling into new uuid class
commit0c9481b22dd4f3d13724d98c2f2959122d441975
authorOlly Betts <olly@survex.com>
Sun, 30 Sep 2018 07:42:25 +0000 (30 20:42 +1300)
committerOlly Betts <olly@survex.com>
Sun, 30 Sep 2018 07:42:25 +0000 (30 20:42 +1300)
treec3aa7338b45ef089a74684e2bc39719f4839f7da
parent36a6d3ebdde3f6d7eb19d9fcb3a96ed99bc95b92
Factor out UUID handling into new uuid class

We now use our portable code for handling UUIDs on all platforms, and
only use platform-specific code for generating a new UUID.

This fixes a bug with converting UUIDs to and from string representation
on FreeBSD, OpenBSD and AIX which resulted in reversed byte order in the
first three components, so the same database would report a different
UUID on these platforms compared to other platforms.  With this fix, the
UUIDs of existing databases will appear to change on these platforms
(except in rare "palindronic" cases).  Reported by Germán M. Bravo.
16 files changed:
xapian-core/backends/Makefile.mk
xapian-core/backends/glass/glass_version.cc
xapian-core/backends/glass/glass_version.h
xapian-core/backends/honey/honey_version.cc
xapian-core/backends/honey/honey_version.h
xapian-core/backends/uuids.cc [new file with mode: 0644]
xapian-core/backends/uuids.h [new file with mode: 0644]
xapian-core/bin/Makefile.mk
xapian-core/common/Makefile.mk
xapian-core/common/proc_uuid.cc [deleted file]
xapian-core/common/proc_uuid.h [deleted file]
xapian-core/common/safeuuid.h [deleted file]
xapian-core/common/win32_uuid.cc [deleted file]
xapian-core/common/win32_uuid.h [deleted file]
xapian-core/configure.ac
xapian-core/tests/unittest.cc