require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_DEV_I2C_I2C_IO_H_)) {
    eval 'sub _DEV_I2C_I2C_IO_H_ () {1;}' unless defined(&_DEV_I2C_I2C_IO_H_);
    require 'sys/ioccom.ph';
    eval("sub I2C_OP_READ () { 0; }") unless defined(&I2C_OP_READ);
    eval("sub I2C_OP_READ_WITH_STOP () { 1; }") unless defined(&I2C_OP_READ_WITH_STOP);
    eval("sub I2C_OP_WRITE () { 2; }") unless defined(&I2C_OP_WRITE);
    eval("sub I2C_OP_WRITE_WITH_STOP () { 3; }") unless defined(&I2C_OP_WRITE_WITH_STOP);
    eval 'sub I2C_OP_READ_P {
        my($x) = @_;
	    eval q(((($x) & 2) == 0));
    }' unless defined(&I2C_OP_READ_P);
    eval 'sub I2C_OP_WRITE_P {
        my($x) = @_;
	    eval q((!  &I2C_OP_READ_P($x)));
    }' unless defined(&I2C_OP_WRITE_P);
    eval 'sub I2C_OP_STOP_P {
        my($x) = @_;
	    eval q(((($x) & 1) != 0));
    }' unless defined(&I2C_OP_STOP_P);
    if(defined(&notyet)) {
	eval 'sub I2C_EXEC_MAX_CMDLEN () {32;}' unless defined(&I2C_EXEC_MAX_CMDLEN);
	eval 'sub I2C_EXEC_MAX_BUFLEN () {32;}' unless defined(&I2C_EXEC_MAX_BUFLEN);
	eval 'sub I2C_IOCTL_EXEC () { &_IOW(ord(\'I\'), 0,  &i2c_ioctl_exec_t);}' unless defined(&I2C_IOCTL_EXEC);
    }
}
1;
