require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_STDDEF_H_)) {
    eval 'sub _STDDEF_H_ () {1;}' unless defined(&_STDDEF_H_);
    require 'sys/cdefs.ph';
    require 'sys/_types.ph';
    unless(defined(&_PTRDIFF_T_DEFINED_)) {
	eval 'sub _PTRDIFF_T_DEFINED_ () {1;}' unless defined(&_PTRDIFF_T_DEFINED_);
    }
    unless(defined(&_SIZE_T_DEFINED_)) {
	eval 'sub _SIZE_T_DEFINED_ () {1;}' unless defined(&_SIZE_T_DEFINED_);
    }
    if(!defined( &_WCHAR_T_DEFINED_)  && !defined( &__cplusplus)) {
	eval 'sub _WCHAR_T_DEFINED_ () {1;}' unless defined(&_WCHAR_T_DEFINED_);
    }
    unless(defined(&_WINT_T_DEFINED_)) {
	eval 'sub _WINT_T_DEFINED_ () {1;}' unless defined(&_WINT_T_DEFINED_);
    }
    unless(defined(&_MBSTATE_T_DEFINED_)) {
	eval 'sub _MBSTATE_T_DEFINED_ () {1;}' unless defined(&_MBSTATE_T_DEFINED_);
    }
    unless(defined(&NULL)) {
	if(defined(&__GNUG__)) {
	    eval 'sub NULL () { &__null;}' unless defined(&NULL);
	} else {
	    eval 'sub NULL () {0;}' unless defined(&NULL);
	}
    }
    eval 'sub offsetof {
        my($type, $member) = @_;
	    eval q((((($type *)0)->$member)));
    }' unless defined(&offsetof);
}
1;
