| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
if vis actually wants to be a library exported symbols may need
mark up depending on the platform (eg. __declspec(dllexport)).
This needs to be hidden behind a macro because the way you export
is not the same on every platform.
I did this based on the assumption that vis.h was supposed to be
the only interface to the "vis" library. Since nobody actually
uses vis as a library I have no idea if this is actually correct.
Anyway marking up all prototypes like this allows for one to
convert all functions to static if a single translation unit is
used by inserting at the start:
#define VIS_INTERNAL static
#define VIS_EXPORT static
|
|
The amount of code we need to detect if this is present and handle
the fallback is more than if we just provide it ourselves.
Also we are passing in a difference of pointers so the argument
type should be ptrdiff_t. This avoids a C brain damage of having
unsigned size type which can wrap around if the caller is careful.
|
|
|
|
On GNU Hurd systems PIPE_BUF and PATH_MAX are not defined, and
the compilation fails. This patch defines them if they aren't.
|
|
These are generally implemented efficiently in libc.
While memrchr(3) is non-standard, it is a common extension.
If it is not available, we use a simple C implementation from musl.
|
|
|
|
|
|
|
|
|