require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_IOCTL_H_)) {
    eval 'sub _SYS_IOCTL_H_ () {1;}' unless defined(&_SYS_IOCTL_H_);
    require 'sys/ttycom.ph';
    eval 'sub TIOCGSIZE () { &TIOCGWINSZ;}' unless defined(&TIOCGSIZE);
    eval 'sub TIOCSSIZE () { &TIOCSWINSZ;}' unless defined(&TIOCSSIZE);
    require 'sys/ioccom.ph';
    require 'sys/dkio.ph';
    require 'sys/filio.ph';
    require 'sys/sockio.ph';
    eval 'sub PTIOCNETBSD () { &_IOW(ord(\'Z\'), 0, \'struct ioctl_pt\');}' unless defined(&PTIOCNETBSD);
    eval 'sub PTIOCSUNOS () { &_IOW(ord(\'Z\'), 1, \'struct ioctl_pt\');}' unless defined(&PTIOCSUNOS);
    eval 'sub PTIOCSVR4 () { &_IOW(ord(\'Z\'), 2, \'struct ioctl_pt\');}' unless defined(&PTIOCSVR4);
    eval 'sub PTIOCLINUX () { &_IOW(ord(\'Z\'), 3, \'struct ioctl_pt\');}' unless defined(&PTIOCLINUX);
    eval 'sub PTIOCFREEBSD () { &_IOW(ord(\'Z\'), 4, \'struct ioctl_pt\');}' unless defined(&PTIOCFREEBSD);
    eval 'sub PTIOCOSF1 () { &_IOW(ord(\'Z\'), 5, \'struct ioctl_pt\');}' unless defined(&PTIOCOSF1);
    eval 'sub PTIOCULTRIX () { &_IOW(ord(\'Z\'), 6, \'struct ioctl_pt\');}' unless defined(&PTIOCULTRIX);
    eval 'sub PTIOCWIN32 () { &_IOW(ord(\'Z\'), 7, \'struct ioctl_pt\');}' unless defined(&PTIOCWIN32);
    unless(defined(&_KERNEL)) {
	require 'sys/cdefs.ph';
    }
}
if(defined(&_KERNEL_OPT)) {
    require './sys/opt_compat_freebsd.ph';
    require './sys/opt_compat_sunos.ph';
    require './sys/opt_compat_43.ph';
    require './sys/opt_modular.ph';
}
if(defined(&USE_OLD_TTY) || defined(&COMPAT_43) || defined(&COMPAT_SUNOS) || defined(&COMPAT_FREEBSD) || defined(&MODULAR)) {
    require 'sys/ioctl_compat.ph';
}
1;
