mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Fix bugs in cosmocc toolchain
This change integrates e58abc1110b335a3341e8ad5821ad8e3880d9bb2 from https://github.com/ahgamut/musl-cross-make/ which fixes the issues we were having with our C language extension for symbolic constants. This change also performs some code cleanup and bug fixes to getaddrinfo(). It's now possible to compile projects like ncurses, readline and python without needing to patch anything upstream, except maybe a line or two. Pretty soon it should be possible to build a Linux distro on Cosmo.
This commit is contained in:
parent
22f81a8d50
commit
23e235b7a5
272 changed files with 3491 additions and 4350 deletions
12
third_party/python/Objects/dictobject.c
vendored
12
third_party/python/Objects/dictobject.c
vendored
|
@ -4,8 +4,8 @@
|
|||
│ Python 3 │
|
||||
│ https://docs.python.org/3/license.html │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/intrin/likely.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/intrin/likely.h"
|
||||
#include "libc/log/countbranch.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sysv/consts/o.h"
|
||||
|
@ -720,7 +720,7 @@ lookdict_index(PyDictKeysObject *k, Py_hash_t hash, Py_ssize_t index)
|
|||
return DKIX_EMPTY;
|
||||
}
|
||||
}
|
||||
unreachable;
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -858,7 +858,7 @@ top:
|
|||
}
|
||||
}
|
||||
}
|
||||
unreachable;
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
/* Specialized version for string-only keys */
|
||||
|
@ -931,7 +931,7 @@ lookdict_unicode(PyDictObject *mp, PyObject *key,
|
|||
return ix;
|
||||
}
|
||||
}
|
||||
unreachable;
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
/* Faster version of lookdict_unicode when it is known that no <dummy> keys
|
||||
|
@ -995,7 +995,7 @@ lookdict_unicode_nodummy(PyDictObject *restrict mp, PyObject *restrict key,
|
|||
return ix;
|
||||
}
|
||||
}
|
||||
unreachable;
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
/* Version of lookdict for split tables.
|
||||
|
@ -1061,7 +1061,7 @@ lookdict_split(PyDictObject *mp, PyObject *key,
|
|||
return ix;
|
||||
}
|
||||
}
|
||||
unreachable;
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue