libuv 1.45.0, #include cleanup, probably something else.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4308 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-05-21 21:36:51 +00:00
parent 1ccb9183b4
commit f421606e21
299 changed files with 7167 additions and 4918 deletions

View File

@ -29,12 +29,7 @@
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#if defined(_MSC_VER) && _MSC_VER < 1600
# include "uv/stdint-msvc2008.h"
#else
# include <stdint.h>
#endif
#include <stdint.h>
#if !defined(_WIN32)
# include <sys/time.h>
@ -55,9 +50,9 @@
#define TEST_PORT_3 9125
#ifdef _WIN32
# define TEST_PIPENAME "\\\\?\\pipe\\uv-test"
# define TEST_PIPENAME_2 "\\\\?\\pipe\\uv-test2"
# define TEST_PIPENAME_3 "\\\\?\\pipe\\uv-test3"
# define TEST_PIPENAME "\\\\.\\pipe\\uv-test"
# define TEST_PIPENAME_2 "\\\\.\\pipe\\uv-test2"
# define TEST_PIPENAME_3 "\\\\.\\pipe\\uv-test3"
#else
# define TEST_PIPENAME "/tmp/uv-test-sock"
# define TEST_PIPENAME_2 "/tmp/uv-test-sock2"
@ -203,6 +198,7 @@ typedef enum {
#define ASSERT_LE(a, b) ASSERT_BASE(a, <=, b, int64_t, PRId64)
#define ASSERT_LT(a, b) ASSERT_BASE(a, <, b, int64_t, PRId64)
#define ASSERT_NE(a, b) ASSERT_BASE(a, !=, b, int64_t, PRId64)
#define ASSERT_OK(a) ASSERT_BASE(a, ==, 0, int64_t, PRId64)
#define ASSERT_UINT64_EQ(a, b) ASSERT_BASE(a, ==, b, uint64_t, PRIu64)
#define ASSERT_UINT64_GE(a, b) ASSERT_BASE(a, >=, b, uint64_t, PRIu64)
@ -248,13 +244,13 @@ typedef enum {
#define ASSERT_PTR_NE(a, b) \
ASSERT_BASE(a, !=, b, void*, "p")
/* This macro cleans up the main loop. This is used to avoid valgrind
* warnings about memory being "leaked" by the main event loop.
/* This macro cleans up the event loop. This is used to avoid valgrind
* warnings about memory being "leaked" by the event loop.
*/
#define MAKE_VALGRIND_HAPPY() \
#define MAKE_VALGRIND_HAPPY(loop) \
do { \
close_loop(uv_default_loop()); \
ASSERT(0 == uv_loop_close(uv_default_loop())); \
close_loop(loop); \
ASSERT(0 == uv_loop_close(loop)); \
uv_library_shutdown(); \
} while (0)
@ -271,8 +267,8 @@ typedef enum {
int run_helper_##name(void); \
int run_helper_##name(void)
/* Format big numbers nicely. WARNING: leaks memory. */
const char* fmt(double d);
/* Format big numbers nicely. */
char* fmt(char (*buf)[32], double d);
/* Reserved test exit codes. */
enum test_status {
@ -375,4 +371,11 @@ UNUSED static int can_ipv6(void) {
"Cygwin runtime hangs on listen+connect in same process."
#endif
#if !defined(__linux__) && \
!(defined(__FreeBSD__) && __FreeBSD_version >= 1301000) && \
!defined(_WIN32)
# define NO_CPU_AFFINITY \
"affinity not supported on this platform."
#endif
#endif /* TASK_H_ */