From 3e72d1b5129c51cabf6b501a4698f7c2433781ce Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 11 May 2011 22:17:23 +0200 Subject: epoll: unify epoll.h --- libc/sysdeps/linux/common/sys/epoll.h | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'libc/sysdeps/linux/common/sys') diff --git a/libc/sysdeps/linux/common/sys/epoll.h b/libc/sysdeps/linux/common/sys/epoll.h index f6a648872..a04bd704c 100644 --- a/libc/sysdeps/linux/common/sys/epoll.h +++ b/libc/sysdeps/linux/common/sys/epoll.h @@ -32,12 +32,30 @@ typedef __sigset_t sigset_t; /* Flags to be passed to epoll_create1. */ + enum { +#if defined __alpha__ + EPOLL_CLOEXEC = 010000000, +# define EPOLL_CLOEXEC EPOLL_CLOEXEC + EPOLL_NONBLOCK = 04 +# define EPOLL_NONBLOCK EPOLL_NONBLOCK +#else +# if defined __sparc__ + EPOLL_CLOEXEC = 020000000, +# else EPOLL_CLOEXEC = 02000000, -#define EPOLL_CLOEXEC EPOLL_CLOEXEC +# endif +# define EPOLL_CLOEXEC EPOLL_CLOEXEC +# if defined __mips__ + EPOLL_NONBLOCK = 0200 +# elif defined __sparc__ + EPOLL_NONBLOCK = 040000 +# else EPOLL_NONBLOCK = 04000 +# endif #define EPOLL_NONBLOCK EPOLL_NONBLOCK +#endif }; @@ -90,7 +108,11 @@ struct epoll_event { uint32_t events; /* Epoll events */ epoll_data_t data; /* User data variable */ -}; +} +#if defined __x86_64__ +__attribute__((packed)) +#endif +; __BEGIN_DECLS -- cgit v1.2.3