A drop-in replacement for libuuid for platforms that aren't linux
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Staffan Thomén 84bd71d5eb
Create test.yml (#1)
12 months ago
.github/workflows Create test.yml (#1) 12 months ago
.hgtags Added tag 1.5 for changeset ec3f91978d8e 1 year ago
Makefile Use cmocka instead of a homebrew test 1 year ago
README.md Expand the README a little 1 year ago
TODO.md Update TODO 1 year ago
config.h NetBSD generates 4 bytes of randomness with rand() 2 years ago
test.c Use cmocka instead of a homebrew test 1 year ago
uuid.c Shorten the dec2hex array, this is only cosmetic 2 years ago
uuid.h Add uuid_parse() 2 years ago
version.mk Bump version to 1.5 1 year ago

README.md

libuuid

This is a minimal drop in replacement of the linux-utils libuuid for platforms that are neither GNU nor Linux.

The GUID:s generated by this library don't attempt to be cryptographically secure in any way, it just makes the stupid libraries that depend on in that in no way need to have good entropy work.

Currently implemented:

  • uuid_t
  • uuid_generate_random
  • uuid_generate (macro of uuid_generate_random)
  • uuid_unparse
  • uuid_copy
  • uuid_parse

Building

Normally it should be the usual

$ make
# make install

..but on some platforms you may need to explicitly add CFLAGS=-fPIC

The Makefile allows you to override RM, LD, CC, CFLAGS, LDFLAGS, INSTALL, LIB_SUFFIX and of course PREFIX to change build/install parameters.

Testing

libuuid now uses cmocka for testing, use make test to compile and run the unit tests.

Available make flags are CMOCKA_LDFLAGS and CMOCKA_CFLAGS to locate the include and lib files. In the future this may be replaced by pkg-config.