require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_EFIIO_H)) {
    eval 'sub _SYS_EFIIO_H () {1;}' unless defined(&_SYS_EFIIO_H);
    require 'sys/types.ph';
    require 'sys/ioccom.ph';
    require 'sys/uuid.ph';
    eval 'sub EFI_VARIABLE_NON_VOLATILE () {0x1;}' unless defined(&EFI_VARIABLE_NON_VOLATILE);
    eval 'sub EFI_VARIABLE_BOOTSERVICE_ACCESS () {0x2;}' unless defined(&EFI_VARIABLE_BOOTSERVICE_ACCESS);
    eval 'sub EFI_VARIABLE_RUNTIME_ACCESS () {0x4;}' unless defined(&EFI_VARIABLE_RUNTIME_ACCESS);
    eval 'sub EFI_VARIABLE_HARDWARE_ERROR_RECORD () {0x8;}' unless defined(&EFI_VARIABLE_HARDWARE_ERROR_RECORD);
    eval 'sub EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS () {0x10;}' unless defined(&EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS);
    eval 'sub EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS () {0x20;}' unless defined(&EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS);
    eval 'sub EFI_VARIABLE_APPEND_WRITE () {0x40;}' unless defined(&EFI_VARIABLE_APPEND_WRITE);
    eval 'sub EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS () {0x80;}' unless defined(&EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS);
    eval 'sub EFIIOC_GET_TABLE () { &_IOWR(ord(\'e\'), 1, \'struct efi_get_table_ioc\');}' unless defined(&EFIIOC_GET_TABLE);
    eval 'sub EFIIOC_VAR_GET () { &_IOWR(ord(\'e\'), 4, \'struct efi_var_ioc\');}' unless defined(&EFIIOC_VAR_GET);
    eval 'sub EFIIOC_VAR_NEXT () { &_IOWR(ord(\'e\'), 5, \'struct efi_var_ioc\');}' unless defined(&EFIIOC_VAR_NEXT);
    eval 'sub EFIIOC_VAR_SET () { &_IOWR(ord(\'e\'), 7, \'struct efi_var_ioc\');}' unless defined(&EFIIOC_VAR_SET);
}
1;
