Commit Graph

11 Commits

Author SHA1 Message Date
Matthew Brush
1294791f0c Replace non-standard 'u_int32_t' with 'unsigned int'
Rather than standard uint32_t from stdint.h since it's C99.
Also adjust configure.ac to provide a uint64_t if one isn't available
for use in ctimer.c.
2013-03-07 12:33:57 -08:00
Matthew Brush
b82a8f4ec6 Add cfutimer which uses more accurate functions if available
This is some code I had previously written, adapted to (mostly)
libcfu coding style. The API is very similar to that of the
existing (to be eventually removed) cfutime.
2013-03-04 19:45:24 -08:00
Matthew Brush
a054a4de71 Make C89 compatible using some preprocessor trickery
Also using C99-snprintf file from:
  http://www.jhweiss.de/software/snprintf.html

For when in strict C89 compiler mode or when snprintf() or vsnprintf()
aren't for whatever reason available.

Use CFU_INLINE macro defined in cfu.h to make a decent attempt at
getting inline function support when in C89 mode.
2013-03-04 17:37:24 -08:00
Matthew Brush
eb89c4bf8e Use Libtool to enable building shared library 2013-03-04 15:22:09 -08:00
Matthew Brush
382bac9900 Replace libcfu-config utility with a pkg-config .pc file 2013-03-04 15:10:02 -08:00
Matthew Brush
dd8b293d22 Fixup header inclusion and C++ guards a bit
* Now headers only include headers they use (at least std headers).
* Remove CFU_DEBUG stuff since NDEBUG automatically controls assert()
* Make use of CFU_BEGIN_DECLS and CFU_END_DECLS macros from cfu.h.
2013-03-04 03:18:47 -08:00
Matthew Brush
ec404e96a9 Make POSIX threads library optional
Guard out use of pthreads in hash and list and don't build the
thread queue when pthreads is not available.
2013-03-04 03:04:27 -08:00
Matthew Brush
5b15c782d0 Remove cfutypes.h(.in) since it seems to be useless
Also make cfu.h not generated. Need to fix the @VERSION@ replacement
it was using in a future commit, for now it's just hardcoded.
2013-03-04 02:19:05 -08:00
Matthew Brush
49862e7b8d Re-write configure.ac a bit 2013-03-04 02:11:33 -08:00
Matthew Brush
1a19591a67 Start fixing up the build system 2013-03-04 01:57:54 -08:00
Matthew Brush
f660e3460a Initial commit
All of the files from the tarball downloaded from SourceForge are
being checked in so there's a record of the changes made compared
to it (since I can't find the libcfu source repository). The
generated files will be removed in the following commit.
2013-03-04 01:40:58 -08:00