require '_h2ph_pre.ph';

unless(defined(&_DIRENT_H_)) {
    eval 'sub _DIRENT_H_ () {1;}' unless defined(&_DIRENT_H_);
    unless(defined(&_POSIX_SOURCE)) {
	require 'sys/types.ph';
    }
    require 'sys/dirent.ph';
    if(defined(&_POSIX_SOURCE)) {
    } else {
	eval 'sub d_ino () { &d_fileno;}' unless defined(&d_ino);
	eval 'sub DIRBLKSIZ () {1024;}' unless defined(&DIRBLKSIZ);
	eval 'sub dirfd {
	    local($dirp) = @_;
    	    eval q((($dirp)-> &dd_fd));
	}' unless defined(&dirfd);
	eval 'sub DTF_HIDEW () {0x0001;}' unless defined(&DTF_HIDEW);
	eval 'sub DTF_NODUP () {0x0002;}' unless defined(&DTF_NODUP);
	eval 'sub DTF_REWIND () {0x0004;}' unless defined(&DTF_REWIND);
	eval 'sub __DTF_READALL () {0x0008;}' unless defined(&__DTF_READALL);
	unless(defined(&NULL)) {
	    if(defined(&__GNUG__)) {
		eval 'sub NULL () { &__null;}' unless defined(&NULL);
	    } else {
		eval 'sub NULL () {0;}' unless defined(&NULL);
	    }
	}
    }
    unless(defined(&_KERNEL)) {
	require 'sys/cdefs.ph';
	unless(defined(&_POSIX_SOURCE)) {
	}
    }
}
1;
