require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&__NETBSD_DM_H__)) {
    eval 'sub __NETBSD_DM_H__ () {1;}' unless defined(&__NETBSD_DM_H__);
    require 'sys/ioccom.ph';
    require 'prop/proplib.ph';
    eval 'sub DM_IOCTL () {0xfd;}' unless defined(&DM_IOCTL);
    eval 'sub DM_IOCTL_CMD () {0;}' unless defined(&DM_IOCTL_CMD);
    eval 'sub NETBSD_DM_IOCTL () { &_IOWR( &DM_IOCTL,  &DM_IOCTL_CMD, \'struct plistref\');}' unless defined(&NETBSD_DM_IOCTL);
    eval 'sub DM_IOCTL_COMMAND () {"command";}' unless defined(&DM_IOCTL_COMMAND);
    eval 'sub DM_IOCTL_VERSION () {"version";}' unless defined(&DM_IOCTL_VERSION);
    eval 'sub DM_IOCTL_OPEN () {"open_count";}' unless defined(&DM_IOCTL_OPEN);
    eval 'sub DM_IOCTL_MINOR () {"minor";}' unless defined(&DM_IOCTL_MINOR);
    eval 'sub DM_IOCTL_NAME () {"name";}' unless defined(&DM_IOCTL_NAME);
    eval 'sub DM_IOCTL_UUID () {"uuid";}' unless defined(&DM_IOCTL_UUID);
    eval 'sub DM_IOCTL_TARGET_COUNT () {"target_count";}' unless defined(&DM_IOCTL_TARGET_COUNT);
    eval 'sub DM_IOCTL_EVENT () {"event_nr";}' unless defined(&DM_IOCTL_EVENT);
    eval 'sub DM_IOCTL_FLAGS () {"flags";}' unless defined(&DM_IOCTL_FLAGS);
    eval 'sub DM_IOCTL_CMD_DATA () {"cmd_data";}' unless defined(&DM_IOCTL_CMD_DATA);
    eval 'sub DM_TARGETS_NAME () {"name";}' unless defined(&DM_TARGETS_NAME);
    eval 'sub DM_TARGETS_VERSION () {"ver";}' unless defined(&DM_TARGETS_VERSION);
    eval 'sub DM_DEV_NEWNAME () {"newname";}' unless defined(&DM_DEV_NEWNAME);
    eval 'sub DM_DEV_NAME () {"name";}' unless defined(&DM_DEV_NAME);
    eval 'sub DM_DEV_DEV () {"dev";}' unless defined(&DM_DEV_DEV);
    eval 'sub DM_TABLE_TYPE () {"type";}' unless defined(&DM_TABLE_TYPE);
    eval 'sub DM_TABLE_START () {"start";}' unless defined(&DM_TABLE_START);
    eval 'sub DM_TABLE_STAT () {"status";}' unless defined(&DM_TABLE_STAT);
    eval 'sub DM_TABLE_LENGTH () {"length";}' unless defined(&DM_TABLE_LENGTH);
    eval 'sub DM_TABLE_PARAMS () {"params";}' unless defined(&DM_TABLE_PARAMS);
    eval 'sub DM_READONLY_FLAG () {(1<< 0);}' unless defined(&DM_READONLY_FLAG);
    eval 'sub DM_SUSPEND_FLAG () {(1<< 1);}' unless defined(&DM_SUSPEND_FLAG);
    eval 'sub DM_EXISTS_FLAG () {(1<< 2);}' unless defined(&DM_EXISTS_FLAG);
    eval 'sub DM_PERSISTENT_DEV_FLAG () {(1<< 3);}' unless defined(&DM_PERSISTENT_DEV_FLAG);
    eval 'sub DM_STATUS_TABLE_FLAG () {(1<< 4);}' unless defined(&DM_STATUS_TABLE_FLAG);
    eval 'sub DM_ACTIVE_PRESENT_FLAG () {(1<< 5);}' unless defined(&DM_ACTIVE_PRESENT_FLAG);
    eval 'sub DM_INACTIVE_PRESENT_FLAG () {(1<< 6);}' unless defined(&DM_INACTIVE_PRESENT_FLAG);
    eval 'sub DM_BUFFER_FULL_FLAG () {(1<< 8);}' unless defined(&DM_BUFFER_FULL_FLAG);
    eval 'sub DM_SKIP_BDGET_FLAG () {(1<< 9);}' unless defined(&DM_SKIP_BDGET_FLAG);
    eval 'sub DM_SKIP_LOCKFS_FLAG () {(1<< 10);}' unless defined(&DM_SKIP_LOCKFS_FLAG);
    eval 'sub DM_NOFLUSH_FLAG () {(1<< 11);}' unless defined(&DM_NOFLUSH_FLAG);
    eval 'sub DM_QUERY_INACTIVE_TABLE_FLAG () {(1<< 12);}' unless defined(&DM_QUERY_INACTIVE_TABLE_FLAG);
}
1;
