Add NetBSD support

This commit is contained in:
Justine Tunney 2021-02-05 06:16:20 -08:00
parent 2fdc19e7a7
commit 23ae9dfceb
4020 changed files with 8955 additions and 8128 deletions

View file

@ -88,9 +88,9 @@ static long __pflink(long x) {
x |= kCp437[0];
x |= ntoa(0, 0, 0, 0, 0, 0, 0, 0, 0);
x |= ftoa(0, 0, 0, 0, 0, 0);
x |= strnwidth(0, 0);
x |= strnwidth16(0, 0);
x |= wcsnwidth(0, 0);
x |= strnwidth(0, 0, 0);
x |= strnwidth16(0, 0, 0);
x |= wcsnwidth(0, 0, 0);
x |= malloc(0);
x |= __grow(0, 0, 0, 0);
x |= (intptr_t)strerror(0);

View file

@ -144,14 +144,14 @@ int stoa(int out(long, void *), void *arg, void *data, unsigned long flags,
w = precision;
if (signbit == 63) {
if (weaken(wcsnwidth)) {
w = weaken(wcsnwidth)((const wchar_t *)p, precision);
w = weaken(wcsnwidth)((const wchar_t *)p, precision, 0);
}
} else if (signbit == 15) {
if (weaken(strnwidth16)) {
w = weaken(strnwidth16)((const char16_t *)p, precision);
w = weaken(strnwidth16)((const char16_t *)p, precision, 0);
}
} else if (weaken(strnwidth)) {
w = weaken(strnwidth)(p, precision);
w = weaken(strnwidth)(p, precision, 0);
}
if (w < width) {
pad = width - w;