require '_h2ph_pre.ph';

if(defined(&_POSIX_SOURCE)) {
} else {
    eval 'sub MAXNAMLEN () {255;}' unless defined(&MAXNAMLEN);
}
unless(defined(&DT_UNKNOWN)) {
    sub DT_UNKNOWN () {	0;}
}
unless(defined(&DT_FIFO)) {
    sub DT_FIFO () {	1;}
}
unless(defined(&DT_CHR)) {
    sub DT_CHR () {	2;}
}
unless(defined(&DT_DIR)) {
    sub DT_DIR () {	4;}
}
unless(defined(&DT_BLK)) {
    sub DT_BLK () {	6;}
}
unless(defined(&DT_REG)) {
    sub DT_REG () {	8;}
}
unless(defined(&DT_LNK)) {
    sub DT_LNK () {	10;}
}
unless(defined(&DT_SOCK)) {
    sub DT_SOCK () {	12;}
}
unless(defined(&DT_WHT)) {
    sub DT_WHT () {	14;}
}
unless(defined(&IFTODT)) {
    sub IFTODT {
	local($mode) = @_;
	eval q(((($mode) & 0170000) >> 12));
    }
}
unless(defined(&DTTOIF)) {
    sub DTTOIF {
	local($dirtype) = @_;
	eval q((($dirtype) << 12));
    }
}
if(defined( &_KERNEL)) {
    eval 'sub DIRENT_SIZE {
        local($dp) = @_;
	    eval q((($sizeof{\'struct dirent\'} - ( &MAXNAMLEN+1)) + ((($dp)-> &d_namlen+1+ 3) &~ 3)));
    }' unless defined(&DIRENT_SIZE);
}
1;
