Make more fixes and improvements

- Fix Makefile flaking due to ZIPOBJ_FLAGS generation
- Make printf() floating point and gdtoa thread safe
- Polish up the runit / runitd programs some more
- Prune some more makefile dependencies
This commit is contained in:
Justine Tunney 2022-06-13 11:02:13 -07:00
parent 3c285337a2
commit a3865ecc3c
61 changed files with 316 additions and 132 deletions

View file

@ -29,7 +29,9 @@ struct SprintfStr {
};
static int vsnprintfputchar(const char *s, struct SprintfStr *t, size_t n) {
if (t->i + n <= t->n) {
if (n == 1 && t->i < t->n) {
t->p[t->i] = s[0];
} else if (t->i + n <= t->n) {
memcpy(t->p + t->i, s, n);
} else if (t->i < t->n) {
memcpy(t->p + t->i, s, t->n - t->i);