require '_h2ph_pre.ph';

unless(defined(&_LINUX_LOOP_H)) {
    eval 'sub _LINUX_LOOP_H () {1;}' unless defined(&_LINUX_LOOP_H);
    require 'linux/kdev_t.ph';
    eval 'sub LO_NAME_SIZE () {64;}' unless defined(&LO_NAME_SIZE);
    eval 'sub LO_KEY_SIZE () {32;}' unless defined(&LO_KEY_SIZE);
    eval 'sub LO_FLAGS_DO_BMAP () {1;}' unless defined(&LO_FLAGS_DO_BMAP);
    eval 'sub LO_FLAGS_READ_ONLY () {2;}' unless defined(&LO_FLAGS_READ_ONLY);
    if((defined(&__GLIBC__) ? &__GLIBC__ : 0) >= 2 && !defined( &dev_t)) {
	die("Wrong dev_t in loop.h");
    }
    eval 'sub LO_CRYPT_NONE () {0;}' unless defined(&LO_CRYPT_NONE);
    eval 'sub LO_CRYPT_XOR () {1;}' unless defined(&LO_CRYPT_XOR);
    eval 'sub LO_CRYPT_DES () {2;}' unless defined(&LO_CRYPT_DES);
    eval 'sub LO_CRYPT_FISH2 () {3;}' unless defined(&LO_CRYPT_FISH2);
    eval 'sub LO_CRYPT_BLOW () {4;}' unless defined(&LO_CRYPT_BLOW);
    eval 'sub LO_CRYPT_CAST128 () {5;}' unless defined(&LO_CRYPT_CAST128);
    eval 'sub LO_CRYPT_IDEA () {6;}' unless defined(&LO_CRYPT_IDEA);
    eval 'sub LO_CRYPT_DUMMY () {9;}' unless defined(&LO_CRYPT_DUMMY);
    eval 'sub LO_CRYPT_SKIPJACK () {10;}' unless defined(&LO_CRYPT_SKIPJACK);
    eval 'sub MAX_LO_CRYPT () {20;}' unless defined(&MAX_LO_CRYPT);
    eval 'sub LOOP_SET_FD () {0x4c00;}' unless defined(&LOOP_SET_FD);
    eval 'sub LOOP_CLR_FD () {0x4c01;}' unless defined(&LOOP_CLR_FD);
    eval 'sub LOOP_SET_STATUS () {0x4c02;}' unless defined(&LOOP_SET_STATUS);
    eval 'sub LOOP_GET_STATUS () {0x4c03;}' unless defined(&LOOP_GET_STATUS);
    eval 'sub LOOP_CHANGE_FD () {0x4c04;}' unless defined(&LOOP_CHANGE_FD);
}
1;
