mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 11:18:30 +00:00
Add more fixes for new cosmocc toolchain
We now have an `#include <cxxabi.h>` header which defines all the APIs Cosmopolitan's implemented so far. The `cosmocc` README.md file is now greatly expanded with documentation.
This commit is contained in:
parent
95124cacbe
commit
c6d3802d3a
32 changed files with 256 additions and 69 deletions
|
@ -17,6 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/cxxabi.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/dns/hoststxt.h"
|
||||
#include "libc/dns/servicestxt.h"
|
||||
|
@ -64,7 +65,7 @@ const struct HostsTxt *GetHostsTxt(void) {
|
|||
init->ht.entries.p = init->entries;
|
||||
init->ht.strings.n = pushpop(ARRAYLEN(init->strings));
|
||||
init->ht.strings.p = init->strings;
|
||||
__cxa_atexit(FreeHostsTxt, &g_hoststxt, NULL);
|
||||
__cxa_atexit((void *)FreeHostsTxt, &g_hoststxt, NULL);
|
||||
if ((f = fopen(GetHostsTxtPath(pathbuf, sizeof(pathbuf)), "r"))) {
|
||||
if (ParseHostsTxt(g_hoststxt, f) == -1) {
|
||||
/* TODO(jart): Elevate robustness. */
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/cxxabi.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/dns/resolvconf.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
|
@ -48,7 +49,7 @@ const struct ResolvConf *GetResolvConf(void) {
|
|||
g_resolvconf = &init->rv;
|
||||
pushmov(&init->rv.nameservers.n, ARRAYLEN(init->nameservers));
|
||||
init->rv.nameservers.p = init->nameservers;
|
||||
__cxa_atexit(FreeResolvConf, &g_resolvconf, NULL);
|
||||
__cxa_atexit((void *)FreeResolvConf, &g_resolvconf, NULL);
|
||||
if (!IsWindows()) {
|
||||
if ((f = fopen("/etc/resolv.conf", "r"))) {
|
||||
rc = ParseResolvConf(g_resolvconf, f);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue