/* automatically generated by rust-bindgen 0.58.1 */

pub const EPOLLIN: u32 = 1;
pub const EPOLLPRI: u32 = 2;
pub const EPOLLOUT: u32 = 4;
pub const EPOLLERR: u32 = 8;
pub const EPOLLHUP: u32 = 16;
pub const EPOLLRDNORM: u32 = 64;
pub const EPOLLRDBAND: u32 = 128;
pub const EPOLLWRNORM: u32 = 256;
pub const EPOLLWRBAND: u32 = 512;
pub const EPOLLMSG: u32 = 1024;
pub const EPOLLRDHUP: u32 = 8192;
pub const EPOLLONESHOT: u32 = 2147483648;
pub const EPOLL_CTL_ADD: u32 = 1;
pub const EPOLL_CTL_MOD: u32 = 2;
pub const EPOLL_CTL_DEL: u32 = 3;
pub type int_least64_t = i64;
pub type uint_least64_t = u64;
pub type int_fast64_t = i64;
pub type uint_fast64_t = u64;
pub type int_least32_t = i32;
pub type uint_least32_t = u32;
pub type int_fast32_t = i32;
pub type uint_fast32_t = u32;
pub type int_least16_t = i16;
pub type uint_least16_t = u16;
pub type int_fast16_t = i16;
pub type uint_fast16_t = u16;
pub type int_least8_t = i8;
pub type uint_least8_t = u8;
pub type int_fast8_t = i8;
pub type uint_fast8_t = u8;
pub type intmax_t = ::std::os::raw::c_longlong;
pub type uintmax_t = ::std::os::raw::c_ulonglong;
pub const EPOLL_EVENTS_EPOLLIN: EPOLL_EVENTS = 1;
pub const EPOLL_EVENTS_EPOLLPRI: EPOLL_EVENTS = 2;
pub const EPOLL_EVENTS_EPOLLOUT: EPOLL_EVENTS = 4;
pub const EPOLL_EVENTS_EPOLLERR: EPOLL_EVENTS = 8;
pub const EPOLL_EVENTS_EPOLLHUP: EPOLL_EVENTS = 16;
pub const EPOLL_EVENTS_EPOLLRDNORM: EPOLL_EVENTS = 64;
pub const EPOLL_EVENTS_EPOLLRDBAND: EPOLL_EVENTS = 128;
pub const EPOLL_EVENTS_EPOLLWRNORM: EPOLL_EVENTS = 256;
pub const EPOLL_EVENTS_EPOLLWRBAND: EPOLL_EVENTS = 512;
pub const EPOLL_EVENTS_EPOLLMSG: EPOLL_EVENTS = 1024;
pub const EPOLL_EVENTS_EPOLLRDHUP: EPOLL_EVENTS = 8192;
pub const EPOLL_EVENTS_EPOLLONESHOT: EPOLL_EVENTS = -2147483648;
pub type EPOLL_EVENTS = ::std::os::raw::c_int;
pub type HANDLE = *mut ::std::os::raw::c_void;
pub type SOCKET = usize;
#[repr(C)]
#[derive(Copy, Clone)]
pub union epoll_data {
    pub ptr: *mut ::std::os::raw::c_void,
    pub fd: ::std::os::raw::c_int,
    pub u32_: u32,
    pub u64_: u64,
    pub sock: SOCKET,
    pub hnd: HANDLE,
}
#[test]
fn bindgen_test_layout_epoll_data() {
    assert_eq!(
        ::std::mem::size_of::<epoll_data>(),
        8usize,
        concat!("Size of: ", stringify!(epoll_data))
    );
    assert_eq!(
        ::std::mem::align_of::<epoll_data>(),
        8usize,
        concat!("Alignment of ", stringify!(epoll_data))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<epoll_data>())).ptr as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(epoll_data),
            "::",
            stringify!(ptr)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<epoll_data>())).fd as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(epoll_data),
            "::",
            stringify!(fd)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<epoll_data>())).u32_ as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(epoll_data),
            "::",
            stringify!(u32_)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<epoll_data>())).u64_ as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(epoll_data),
            "::",
            stringify!(u64_)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<epoll_data>())).sock as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(epoll_data),
            "::",
            stringify!(sock)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<epoll_data>())).hnd as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(epoll_data),
            "::",
            stringify!(hnd)
        )
    );
}
pub type epoll_data_t = epoll_data;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct epoll_event {
    pub events: u32,
    pub data: epoll_data_t,
}
#[test]
fn bindgen_test_layout_epoll_event() {
    assert_eq!(
        ::std::mem::size_of::<epoll_event>(),
        16usize,
        concat!("Size of: ", stringify!(epoll_event))
    );
    assert_eq!(
        ::std::mem::align_of::<epoll_event>(),
        8usize,
        concat!("Alignment of ", stringify!(epoll_event))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<epoll_event>())).events as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(epoll_event),
            "::",
            stringify!(events)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<epoll_event>())).data as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(epoll_event),
            "::",
            stringify!(data)
        )
    );
}
extern "C" {
    pub fn epoll_create(size: ::std::os::raw::c_int) -> HANDLE;
}
extern "C" {
    pub fn epoll_create1(flags: ::std::os::raw::c_int) -> HANDLE;
}
extern "C" {
    pub fn epoll_close(ephnd: HANDLE) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn epoll_ctl(
        ephnd: HANDLE,
        op: ::std::os::raw::c_int,
        sock: SOCKET,
        event: *mut epoll_event,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn epoll_wait(
        ephnd: HANDLE,
        events: *mut epoll_event,
        maxevents: ::std::os::raw::c_int,
        timeout: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
