| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Due to the removal of pthread_once, we manually create the seed for
chunk_hash(). With the new testable functions interface, this won't work for
the hashtable initiated using __attribute__((constructor)). Enforce seeding
before creating that hashtable.
|
| |
|
|
|
|
|
| |
Include some more basic system headers in utils.h, so we can use that common
header on the different platforms.
|
|
|
|
|
| |
This avoids passing that arbitrary label just for error messages, and gives
greater flexibility in handling errors.
|
|
|
|
|
|
|
|
| |
When acting on files, we can use fstat() to estimate the buffer size. On
non-file FDs, we dynamically increase an allocated buffer.
Additionally we slightly change the function signature to properly handle
zero-length files and add appropriate unit tests.
|
| |
|
|
|
|
|
|
| |
There are countless other such warnings because e.g. chunk_create() is called
with char*, but at least we prevent users from causing such warnings
inadvertently when using these macros.
|
|
|
|
| |
descriptor
|
| |
|
|
|
|
|
| |
Since chunk_hash() is randomized its output is not predictable, that is,
it is only within the same process.
|
|
|
|
|
| |
This allows using strdup() or other string functions as argument
without calling them twice.
|
|
|
|
|
|
|
| |
The quality is way better, the calculation is a bit slower though.
The key is statically initialized to zero, which will be changed later
to prevent hash flooding.
|
| |
|
| |
|
| |
|
|
|