redefined some primitive types

This commit is contained in:
hyung-hwan 2025-04-28 00:26:12 +00:00
parent 057269ff4a
commit 3bf9936244

22
ctx.c
View File

@ -6,16 +6,28 @@
#include <stdio.h>
#include <unistd.h>
#include <assert.h>
#include <sys/epoll.h>
#if defined(__NetBSD__)
#include <sys/event.h>
#include <fcntl.h>
#else
#include <sys/epoll.h>
#include <valgrind/valgrind.h>
#endif
typedef unsigned char hip_uint8_t;
typedef unsigned short hip_uint16_t;
typedef unsigned int hip_uint32_t;
typedef unsigned long long hip_uint64_t;
typedef unsigned long hip_oow_t;
typedef signed long hip_ooi_t;
typedef signed char hip_int8_t;
typedef signed short hip_int16_t;
typedef signed int hip_int32_t;
typedef signed long long hip_int64_t;
typedef hip_uint64_t hip_oow_t;
typedef hip_int64_t hip_ooi_t;
typedef hip_uint64_t hip_nsecdur_t;
@ -322,7 +334,11 @@ hip_t* hip_open(void)
sigprocmask(SIG_SETMASK, &oldsm, HIP_NULL);
#if defined(__NetBSD__)
hip->mux_id = kqueue1(O_CLOEXEC);
#else
hip->mux_id = epoll_create1(EPOLL_CLOEXEC);
#endif
if (hip->mux_id <= -1)
{
timer_delete(tid);