From f2cc02abc01b57177fb05ecf50be08017c553a01 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Mon, 4 Sep 2017 00:35:04 +0200 Subject: [PATCH] util: move definitions to util.h --- src/epoll.c | 8 +------- src/util.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 src/util.h diff --git a/src/epoll.c b/src/epoll.c index 0cb3618..6c592a4 100644 --- a/src/epoll.c +++ b/src/epoll.c @@ -8,19 +8,13 @@ #include "error.h" #include "nt.h" #include "tree.h" +#include "util.h" #include "win.h" #ifndef SIO_BASE_HANDLE #define SIO_BASE_HANDLE 0x48000022 #endif -#ifndef _SSIZE_T_DEFINED -#define SSIZE_T_DEFINED -typedef intptr_t ssize_t; -#endif - -#define ARRAY_COUNT(a) (sizeof(a) / (sizeof((a)[0]))) - #define EPOLL__EVENT_MASK 0xffff #define EPOLL__SOCK_LISTED 0x1 diff --git a/src/util.h b/src/util.h new file mode 100644 index 0000000..982d86d --- /dev/null +++ b/src/util.h @@ -0,0 +1,11 @@ +#ifndef EPOLL_UTIL_H_ +#define EPOLL_UTIL_H_ + +#ifndef _SSIZE_T_DEFINED +#define SSIZE_T_DEFINED +typedef intptr_t ssize_t; +#endif + +#define ARRAY_COUNT(a) (sizeof(a) / (sizeof((a)[0]))) + +#endif /* EPOLL_UTIL_H_ */