2021-07-26 18:00:37 +08:00
|
|
|
#include "mongoose.h"
|
|
|
|
|
|
|
|
int usleep(useconds_t us) {
|
|
|
|
for (useconds_t i = 0; i < us * 99; i++) asm("nop");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int clock_gettime(clockid_t clock_id, struct timespec *tp) {
|
|
|
|
(void) clock_id;
|
|
|
|
memset(tp, 0, sizeof(*tp));
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2021-07-29 21:21:20 +08:00
|
|
|
char *realpath(const char *path, char *resolved_path) {
|
|
|
|
if (resolved_path == NULL) resolved_path = malloc(strlen(path) + 1);
|
|
|
|
strcpy(resolved_path, path);
|
|
|
|
return resolved_path;
|
|
|
|
}
|
|
|
|
|
2021-07-26 18:00:37 +08:00
|
|
|
struct mg_connection *mg_connect(struct mg_mgr *mgr, const char *url,
|
|
|
|
mg_event_handler_t fn, void *fn_data) {
|
|
|
|
(void) mgr, (void) url, (void) fn, (void) fn_data;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
void mg_connect_resolved(struct mg_connection *c) {
|
|
|
|
(void) c;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct mg_connection *mg_listen(struct mg_mgr *mgr, const char *url,
|
|
|
|
mg_event_handler_t fn, void *fn_data) {
|
|
|
|
(void) mgr, (void) url, (void) fn, (void) fn_data;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
void mg_mgr_poll(struct mg_mgr *mgr, int ms) {
|
|
|
|
(void) mgr, (void) ms;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool mg_send(struct mg_connection *c, const void *buf, size_t len) {
|
|
|
|
(void) c, (void) buf, (void) len;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2021-08-08 00:22:47 +08:00
|
|
|
void mg_rmpipe(struct mg_connection *c) {
|
|
|
|
(void) c;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool mg_mkpipe(struct mg_connection *c, struct mg_connection *pc[2]) {
|
|
|
|
(void) c, (void) pc;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2021-07-26 18:00:37 +08:00
|
|
|
void _fini(void) {
|
|
|
|
}
|