mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Clean up more code
- Found some bugs in LLVM compiler-rt library - The useless LIBC_STUBS package is now deleted - Improve the overflow checking story even further - Get chibicc tests working in MODE=dbg mode again - The libc/isystem/ headers now have correctly named guards
This commit is contained in:
parent
afc58a8b41
commit
d7c79f43ef
294 changed files with 912 additions and 1208 deletions
|
@ -25,7 +25,7 @@
|
|||
* Collapses repeating headers onto a single line.
|
||||
*/
|
||||
char *FoldHeader(struct HttpMessage *msg, char *b, int h, size_t *z) {
|
||||
char *p;
|
||||
char *p, *p2;
|
||||
size_t i, n, m;
|
||||
struct HttpHeader *x;
|
||||
n = msg->headers[h].b - msg->headers[h].a;
|
||||
|
@ -35,9 +35,13 @@ char *FoldHeader(struct HttpMessage *msg, char *b, int h, size_t *z) {
|
|||
x = msg->xheaders.p + i;
|
||||
if (GetHttpHeader(b + x->k.a, x->k.b - x->k.a) == h) {
|
||||
m = x->v.b - x->v.a;
|
||||
if (!(p = realloc(p, n + 2 + m))) abort();
|
||||
memcpy(mempcpy(p + n, ", ", 2), b + x->v.a, m);
|
||||
n += 2 + m;
|
||||
if ((p2 = realloc(p, n + 2 + m))) {
|
||||
memcpy(mempcpy((p = p2) + n, ", ", 2), b + x->v.a, m);
|
||||
n += 2 + m;
|
||||
} else {
|
||||
free(p);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
*z = n;
|
||||
|
|
|
@ -22,7 +22,6 @@ NET_HTTP_A_DIRECTDEPS = \
|
|||
LIBC_MEM \
|
||||
LIBC_NEXGEN32E \
|
||||
LIBC_STR \
|
||||
LIBC_STUBS \
|
||||
LIBC_SYSV \
|
||||
LIBC_TIME
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue