Use DNS implementation from Musl Libc

Now that our socket system call polyfills are good enough to support
Musl's DNS library we should be using that rather than the barebones
domain name system implementation we rolled on our own. There's many
benefits to making this change. So many, that I myself wouldn't feel
qualified to enumerate them all. The Musl DNS code had to be changed
in order to support Windows of course, which looks very solid so far
This commit is contained in:
Justine Tunney 2023-12-28 22:58:17 -08:00
parent 1a28e35c62
commit 43fe5956ad
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
146 changed files with 2646 additions and 7190 deletions

View file

@ -1,5 +1,6 @@
#ifndef COSMOPOLITAN_THIRD_PARTY_STB_STB_IMAGE_H_
#define COSMOPOLITAN_THIRD_PARTY_STB_STB_IMAGE_H_
#include "libc/stdio/stdio.h"
COSMOPOLITAN_C_START_
enum {
@ -10,8 +11,6 @@ enum {
STBI_rgb_alpha = 4
};
struct FILE;
typedef struct {
// fill 'data' with 'size' bytes. return number of bytes actually read
int (*read)(void *user, char *data, int size);
@ -37,7 +36,7 @@ unsigned char *stbi_load_from_callbacks(stbi_io_callbacks const *clbk,
unsigned char *stbi_load(char const *filename, int *x, int *y,
int *channels_in_file, int desired_channels);
unsigned char *stbi_load_from_file(struct FILE *f, int *x, int *y,
unsigned char *stbi_load_from_file(FILE *f, int *x, int *y,
int *channels_in_file, int desired_channels);
// for stbi_load_from_file, file pointer is left pointing immediately after
// image
@ -60,7 +59,7 @@ unsigned short *stbi_load_16_from_callbacks(stbi_io_callbacks const *clbk,
unsigned short *stbi_load_16(char const *filename, int *x, int *y,
int *channels_in_file, int desired_channels);
unsigned short *stbi_load_from_file_16(struct FILE *f, int *x, int *y,
unsigned short *stbi_load_from_file_16(FILE *f, int *x, int *y,
int *channels_in_file,
int desired_channels);
@ -79,9 +78,9 @@ int stbi_is_16_bit_from_memory(unsigned char const *buffer, int len);
int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const *clbk, void *user);
int stbi_info(char const *filename, int *x, int *y, int *comp);
int stbi_info_from_file(struct FILE *f, int *x, int *y, int *comp);
int stbi_info_from_file(FILE *f, int *x, int *y, int *comp);
int stbi_is_16_bit(char const *filename);
int stbi_is_16_bit_from_file(struct FILE *f);
int stbi_is_16_bit_from_file(FILE *f);
// for image formats that explicitly notate that they have premultiplied alpha,
// we just return the colors as stored in the file. set this flag to force