Factor out UUID handling into new uuid class
commit569877f335a1afe87d4cc61bb97dcd4a85120ad4
authorOlly Betts <olly@survex.com>
Sun, 30 Sep 2018 07:42:25 +0000 (30 20:42 +1300)
committerOlly Betts <olly@survex.com>
Thu, 4 Oct 2018 07:36:43 +0000 (4 20:36 +1300)
tree1528dc5efaf57673f1d07f19ac2766441228b882
parent302713fa0d72aecee49fcf6e6ede468c488fe7f4
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.

(cherry picked from commit 0c9481b22dd4f3d13724d98c2f2959122d441975)
16 files changed:
xapian-core/backends/Makefile.mk
xapian-core/backends/chert/chert_version.cc
xapian-core/backends/chert/chert_version.h
xapian-core/backends/glass/glass_version.cc
xapian-core/backends/glass/glass_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