Skip to content

sthomen/libuuid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.