Isolate libuv platform headers and declare test string functions

This commit is contained in:
Max Lv
2026-09-11 13:50:35 +08:00
parent 9a6ad4e275
commit babd3feb06
4 changed files with 7 additions and 2 deletions
+1
View File
@@ -1,4 +1,5 @@
#include "ss_event.h"
#include <uv.h>
#include "uthash.h"
#include <assert.h>
#include <math.h>
+3 -2
View File
@@ -3,7 +3,8 @@
#ifndef SS_EVENT_H
#define SS_EVENT_H
#include <stdint.h>
#include <uv.h>
/* Keep platform headers private: Linux TCP headers differ from libc headers. */
struct uv_loop_s;
struct ss_loop;
typedef double ss_tstamp;
#define SS_READ 1
@@ -36,7 +37,7 @@ typedef struct ss_signal {
struct ss_loop *ss_default_loop(void);
struct ss_loop *ss_loop_new(unsigned flags);
void ss_loop_destroy(struct ss_loop *loop);
uv_loop_t *ss_native_loop(struct ss_loop *loop);
struct uv_loop_s *ss_native_loop(struct ss_loop *loop);
const char *ss_backend_name(void);
int ss_run(struct ss_loop *loop, int flags);
void ss_unloop(struct ss_loop *loop, int how);
+2
View File
@@ -1,5 +1,7 @@
#include "test_helpers.h"
#include <string.h>
#include "ss_event.h"
#include <uv.h>
#ifdef __APPLE__
#include <sys/event.h>
#endif
+1
View File
@@ -1,5 +1,6 @@
/* Local delayed DNS server proves A/AAAA/NXDOMAIN completion without blocking. */
#include "test_helpers.h"
#include <string.h>
#include "ss_event.h"
#include "resolv.h"
int verbose = 0;