parse.c, compare.c: Include string.h to fix gcc -Wall complaints.
gen_uuid.c: Define _SVID_SOURCE to avoid gcc -Wall errors because some
required structures wouldn't be otherwise defined. Fix a minor gcc
-Wall nit in the declaration of get_random_fd().
uuid_time.c (main), tst_uuid.c (main): Fix gcc -Wall complaints.
copy.c (uuid_copy): Change arguments to make it clear which argument
is the source and which is the destination.
gen_uuid.c (get_random_fd): Use gettimeofday to seed the PRNG, so we
can take advantage of tv_usec to do (slightly) better at seeding it.
gen_uuid.c (get_random_bytes): Use O_NONBLOCK when trying to open
/dev/random. Break out the /dev/random initialization code into a
get_random_fd() function, and use that function in uuid_generate() to
determine whether to use uuid_generate_random() or
uuid_generate_time().
gen_uuid.c (get_random_bytes): Make more paranoid about misbehaving
/dev/urandom. If we get a return of zero without an error more than 8
times in a row, we break out and return an error. Also, if
/dev/urandom doesn't exist, try /dev/random.
ChangeLog, ext2fs.h:
ext2fs.h: Use AUTOCONF SIZEOF_* macros if available to determine how
to define __s64 and __u64. Turn off "compression is experimental"
warning if the cpp macro I_KNOW_THAT_COMPRESSION_IS_EXPERIMENTAL is
defined.
* gen_uuid.c (get_random_bytes): Use a while loop when reading from
/dev/urandom so that if we get interrupted while reading the right
thing happens.
(uuid_generate_random): Add new function which uses the new UUID
format which uses 122 random bits to form the 128-bit UUID.
(uuid_generate): Rename the old uuid_generate to be
uuid_generate_time, and create a new uuid_generate function which
calls either uuid_generate_random or uuid_genereate_time depending on
whether /dev/urandom is present.
uuid_generate.3.in: Update to reflect changesin uuid_generate and its
two new variants.
tst_uuid.c: Updated to test new uuid_generate functions, and to
reflect new semantics of uuid_compare. Added tests to make sure the
UUID type and variant created by UUID generate is correct.
uuid_time.c (uuid_variant, uuid_type): Added new functions to return
the UUID variant and type information. The debugging program now
prints the UUID variant and type, and warns if the unparsed time
information is likely to be incorrect.
uuid_parse.3.in, libuuid.3.in: Miscellaneous text cleanups.
uuidgen.1.in:
Miscellaneous text cleanups.