require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_SYS_DIR_H_)) {
    eval 'sub _SYS_DIR_H_ () {1;}' unless defined(&_SYS_DIR_H_);
    if(defined(&_KERNEL)) {
	die("Please use <sys/dirent.h> instead");
    }
    require 'dirent.ph';
    eval 'sub direct () { &dirent;}' unless defined(&direct);
    undef(&DIRSIZ) if defined(&DIRSIZ);
    eval 'sub DIRSIZ {
        my($dp) = @_;
	    eval q((($sizeof{\'struct direct\'} - ( &MAXNAMLEN+1)) + ((($dp)-> &d_namlen+1+ 3) &~ 3)));
    }' unless defined(&DIRSIZ);
}
1;
