require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&EVENT2_BUFFEREVENT_H_INCLUDED_)) {
    eval 'sub EVENT2_BUFFEREVENT_H_INCLUDED_ () {1;}' unless defined(&EVENT2_BUFFEREVENT_H_INCLUDED_);
    require 'event2/visibility.ph';
    if(defined(&__cplusplus)) {
    }
    require 'event2/event-config.ph';
    if(defined(&EVENT__HAVE_SYS_TYPES_H)) {
	require 'sys/types.ph';
    }
    if(defined(&EVENT__HAVE_SYS_TIME_H)) {
	require 'sys/time.ph';
    }
    require 'event2/util.ph';
    eval 'sub BEV_EVENT_READING () {0x1;}' unless defined(&BEV_EVENT_READING);
    eval 'sub BEV_EVENT_WRITING () {0x2;}' unless defined(&BEV_EVENT_WRITING);
    eval 'sub BEV_EVENT_EOF () {0x10;}' unless defined(&BEV_EVENT_EOF);
    eval 'sub BEV_EVENT_ERROR () {0x20;}' unless defined(&BEV_EVENT_ERROR);
    eval 'sub BEV_EVENT_TIMEOUT () {0x40;}' unless defined(&BEV_EVENT_TIMEOUT);
    eval 'sub BEV_EVENT_CONNECTED () {0x80;}' unless defined(&BEV_EVENT_CONNECTED);
    if(defined(&EVENT_IN_DOXYGEN_)) {
    }
    eval("sub BEV_OPT_CLOSE_ON_FREE () { (1<<0); }") unless defined(&BEV_OPT_CLOSE_ON_FREE);
    eval("sub BEV_OPT_THREADSAFE () { (1<<1); }") unless defined(&BEV_OPT_THREADSAFE);
    eval("sub BEV_OPT_DEFER_CALLBACKS () { (1<<2); }") unless defined(&BEV_OPT_DEFER_CALLBACKS);
    eval("sub BEV_OPT_UNLOCK_CALLBACKS () { (1<<3); }") unless defined(&BEV_OPT_UNLOCK_CALLBACKS);
    eval("sub BEV_NORMAL () { 0; }") unless defined(&BEV_NORMAL);
    eval("sub BEV_FLUSH () { 1; }") unless defined(&BEV_FLUSH);
    eval("sub BEV_FINISHED () { 2; }") unless defined(&BEV_FINISHED);
    eval("sub BEV_TRIG_IGNORE_WATERMARKS () { (1<<16); }") unless defined(&BEV_TRIG_IGNORE_WATERMARKS);
    eval("sub BEV_TRIG_DEFER_CALLBACKS () { BEV_OPT_DEFER_CALLBACKS; }") unless defined(&BEV_TRIG_DEFER_CALLBACKS);
    eval("sub BEV_OK () { 0; }") unless defined(&BEV_OK);
    eval("sub BEV_NEED_MORE () { 1; }") unless defined(&BEV_NEED_MORE);
    eval("sub BEV_ERROR () { 2; }") unless defined(&BEV_ERROR);
    eval 'sub EV_RATE_LIMIT_MAX () { &EV_SSIZE_MAX;}' unless defined(&EV_RATE_LIMIT_MAX);
    if(defined(&__cplusplus)) {
    }
}
1;
