require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_FUTEX_H_)) {
    eval 'sub _SYS_FUTEX_H_ () {1;}' unless defined(&_SYS_FUTEX_H_);
    require 'sys/timespec.ph';
    eval 'sub FUTEX_WAIT () {0;}' unless defined(&FUTEX_WAIT);
    eval 'sub FUTEX_WAKE () {1;}' unless defined(&FUTEX_WAKE);
    eval 'sub FUTEX_FD () {2;}' unless defined(&FUTEX_FD);
    eval 'sub FUTEX_REQUEUE () {3;}' unless defined(&FUTEX_REQUEUE);
    eval 'sub FUTEX_CMP_REQUEUE () {4;}' unless defined(&FUTEX_CMP_REQUEUE);
    eval 'sub FUTEX_WAKE_OP () {5;}' unless defined(&FUTEX_WAKE_OP);
    eval 'sub FUTEX_LOCK_PI () {6;}' unless defined(&FUTEX_LOCK_PI);
    eval 'sub FUTEX_UNLOCK_PI () {7;}' unless defined(&FUTEX_UNLOCK_PI);
    eval 'sub FUTEX_TRYLOCK_PI () {8;}' unless defined(&FUTEX_TRYLOCK_PI);
    eval 'sub FUTEX_WAIT_BITSET () {9;}' unless defined(&FUTEX_WAIT_BITSET);
    eval 'sub FUTEX_WAKE_BITSET () {10;}' unless defined(&FUTEX_WAKE_BITSET);
    eval 'sub FUTEX_WAIT_REQUEUE_PI () {11;}' unless defined(&FUTEX_WAIT_REQUEUE_PI);
    eval 'sub FUTEX_CMP_REQUEUE_PI () {12;}' unless defined(&FUTEX_CMP_REQUEUE_PI);
    eval 'sub FUTEX_PRIVATE_FLAG () { &__BIT(7);}' unless defined(&FUTEX_PRIVATE_FLAG);
    eval 'sub FUTEX_CLOCK_REALTIME () { &__BIT(8);}' unless defined(&FUTEX_CLOCK_REALTIME);
    eval 'sub FUTEX_CMD_MASK () {(~( &FUTEX_PRIVATE_FLAG| &FUTEX_CLOCK_REALTIME));}' unless defined(&FUTEX_CMD_MASK);
    eval 'sub FUTEX_OP_OP_MASK () { &__BITS(28,31);}' unless defined(&FUTEX_OP_OP_MASK);
    eval 'sub FUTEX_OP_CMP_MASK () { &__BITS(24,27);}' unless defined(&FUTEX_OP_CMP_MASK);
    eval 'sub FUTEX_OP_OPARG_MASK () { &__BITS(12,23);}' unless defined(&FUTEX_OP_OPARG_MASK);
    eval 'sub FUTEX_OP_CMPARG_MASK () { &__BITS(0,11);}' unless defined(&FUTEX_OP_CMPARG_MASK);
    eval 'sub FUTEX_OP {
        my($op, $oparg, $cmp, $cmparg) = @_;
	    eval q(( &__SHIFTIN($op,  &FUTEX_OP_OP_MASK) |  &__SHIFTIN($oparg,  &FUTEX_OP_OPARG_MASK) |  &__SHIFTIN($cmp,  &FUTEX_OP_CMP_MASK) |  &__SHIFTIN($cmparg,  &FUTEX_OP_CMPARG_MASK)));
    }' unless defined(&FUTEX_OP);
    eval 'sub FUTEX_OP_SET () {0;}' unless defined(&FUTEX_OP_SET);
    eval 'sub FUTEX_OP_ADD () {1;}' unless defined(&FUTEX_OP_ADD);
    eval 'sub FUTEX_OP_OR () {2;}' unless defined(&FUTEX_OP_OR);
    eval 'sub FUTEX_OP_ANDN () {3;}' unless defined(&FUTEX_OP_ANDN);
    eval 'sub FUTEX_OP_XOR () {4;}' unless defined(&FUTEX_OP_XOR);
    eval 'sub FUTEX_OP_OPARG_SHIFT () {8;}' unless defined(&FUTEX_OP_OPARG_SHIFT);
    eval 'sub FUTEX_OP_CMP_EQ () {0;}' unless defined(&FUTEX_OP_CMP_EQ);
    eval 'sub FUTEX_OP_CMP_NE () {1;}' unless defined(&FUTEX_OP_CMP_NE);
    eval 'sub FUTEX_OP_CMP_LT () {2;}' unless defined(&FUTEX_OP_CMP_LT);
    eval 'sub FUTEX_OP_CMP_LE () {3;}' unless defined(&FUTEX_OP_CMP_LE);
    eval 'sub FUTEX_OP_CMP_GT () {4;}' unless defined(&FUTEX_OP_CMP_GT);
    eval 'sub FUTEX_OP_CMP_GE () {5;}' unless defined(&FUTEX_OP_CMP_GE);
    eval 'sub FUTEX_WAITERS () {( &__BIT(31));}' unless defined(&FUTEX_WAITERS);
    eval 'sub FUTEX_OWNER_DIED () {( &__BIT(30));}' unless defined(&FUTEX_OWNER_DIED);
    eval 'sub FUTEX_SYNCOBJ_1 () {( &__BIT(29));}' unless defined(&FUTEX_SYNCOBJ_1);
    eval 'sub FUTEX_SYNCOBJ_0 () {( &__BIT(28));}' unless defined(&FUTEX_SYNCOBJ_0);
    eval 'sub FUTEX_TID_MASK () {( &__BITS(0,27));}' unless defined(&FUTEX_TID_MASK);
    eval 'sub FUTEX_BITSET_MATCH_ANY () {( &__BITS(0,31));}' unless defined(&FUTEX_BITSET_MATCH_ANY);
    eval 'sub _FUTEX_ROBUST_HEAD_LIST () {0;}' unless defined(&_FUTEX_ROBUST_HEAD_LIST);
    eval 'sub _FUTEX_ROBUST_HEAD_OFFSET () {1;}' unless defined(&_FUTEX_ROBUST_HEAD_OFFSET);
    eval 'sub _FUTEX_ROBUST_HEAD_PENDING () {2;}' unless defined(&_FUTEX_ROBUST_HEAD_PENDING);
    eval 'sub _FUTEX_ROBUST_HEAD_NWORDS () {3;}' unless defined(&_FUTEX_ROBUST_HEAD_NWORDS);
    eval 'sub _FUTEX_ROBUST_HEAD_SIZE () {( &_FUTEX_ROBUST_HEAD_NWORDS * $sizeof{\'u_long\'});}' unless defined(&_FUTEX_ROBUST_HEAD_SIZE);
    eval 'sub _FUTEX_ROBUST_HEAD_SIZE32 () {( &_FUTEX_ROBUST_HEAD_NWORDS * $sizeof{ &uint32_t});}' unless defined(&_FUTEX_ROBUST_HEAD_SIZE32);
    eval 'sub _FUTEX_ROBUST_ENTRY_PI () { &__BIT(0);}' unless defined(&_FUTEX_ROBUST_ENTRY_PI);
    if(defined(&__LIBC_FUTEX_PRIVATE)) {
    }
    if(defined(&_KERNEL)) {
    }
}
1;
