X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/224c70764cab4e0e39a26aaf3ad3016552f62f55..511daa4c8e95ca3a9f4a918942d9350855df1da0:/stdio/vfwprintf-fbsd.c diff --git a/stdio/vfwprintf-fbsd.c b/stdio/vfwprintf-fbsd.c index 9460ef7..45f0bc8 100644 --- a/stdio/vfwprintf-fbsd.c +++ b/stdio/vfwprintf-fbsd.c @@ -295,7 +295,7 @@ __ultoa(u_long val, wchar_t *endp, int base, int octzero, const char *xdigs, break; default: /* oops */ - abort(); + LIBC_ABORT("base = %d", base); } return (cp); } @@ -367,7 +367,7 @@ __ujtoa(uintmax_t val, wchar_t *endp, int base, int octzero, break; default: - abort(); + LIBC_ABORT("base = %d", base); } return (cp); } @@ -667,7 +667,7 @@ __vfwprintf(FILE *fp, locale_t loc, const wchar_t *fmt0, va_list ap) #define UJARG() \ (flags&INTMAXT ? GETARG(uintmax_t) : \ flags&SIZET ? (uintmax_t)GETARG(size_t) : \ - flags&PTRDIFFT ? (uintmax_t)GETARG(ptrdiff_t) : \ + flags&PTRDIFFT ? (uintmax_t)(unsigned)GETARG(ptrdiff_t) : \ (uintmax_t)GETARG(unsigned long long)) /* @@ -1243,7 +1243,7 @@ number: if ((dprec = prec) >= 0) } size = buf + BUF - cp; if (size > BUF) /* should never happen */ - abort(); + LIBC_ABORT("size %d > BUF %d", size, BUF); break; #ifdef VECTORS case 'v': @@ -2041,12 +2041,12 @@ __grow_type_table (int nextarg, enum typeid **typetable, int *tablesize) newsize = nextarg + 1; if (oldsize == STATIC_ARG_TBL_SIZE) { if ((newtable = malloc(newsize * sizeof(enum typeid))) == NULL) - abort(); /* XXX handle better */ + LIBC_ABORT("malloc: %s", strerror(errno)); /* XXX handle better */ bcopy(oldtable, newtable, oldsize * sizeof(enum typeid)); } else { newtable = reallocf(oldtable, newsize * sizeof(enum typeid)); if (newtable == NULL) - abort(); /* XXX handle better */ + LIBC_ABORT("reallocf: %s", strerror(errno)); /* XXX handle better */ } for (n = oldsize; n < newsize; n++) newtable[n] = T_UNUSED;