require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_WCHAR_H_)) {
    eval 'sub _WCHAR_H_ () {1;}' unless defined(&_WCHAR_H_);
    require 'sys/cdefs.ph';
    require 'sys/_types.ph';
    unless(defined(&NULL)) {
	if(defined(&__GNUG__)) {
	    eval 'sub NULL () { &__null;}' unless defined(&NULL);
	} else {
	    eval 'sub NULL () {0;}' unless defined(&NULL);
	}
    }
    require 'stdio.ph';
    if(!defined( &_WCHAR_T_DEFINED_)  && !defined( &__cplusplus)) {
	eval 'sub _WCHAR_T_DEFINED_ () {1;}' unless defined(&_WCHAR_T_DEFINED_);
    }
    unless(defined(&_MBSTATE_T_DEFINED_)) {
	eval 'sub _MBSTATE_T_DEFINED_ () {1;}' unless defined(&_MBSTATE_T_DEFINED_);
    }
    unless(defined(&_WINT_T_DEFINED_)) {
	eval 'sub _WINT_T_DEFINED_ () {1;}' unless defined(&_WINT_T_DEFINED_);
    }
    unless(defined(&_SIZE_T_DEFINED_)) {
	eval 'sub _SIZE_T_DEFINED_ () {1;}' unless defined(&_SIZE_T_DEFINED_);
    }
    unless(defined(&WEOF)) {
	eval 'sub WEOF () {(( &wint_t)-1);}' unless defined(&WEOF);
    }
    if((defined( &__GNUC__)  && (defined(&__GNUC__) ? &__GNUC__ : 0) >= 2 && !defined( &__STRICT_ANSI__)) || (defined(&__ISO_C_VISIBLE) ? &__ISO_C_VISIBLE : 0) >= 1999) {
    }
    eval 'sub getwc {
        my($f) = @_;
	    eval q( &fgetwc($f));
    }' unless defined(&getwc);
    eval 'sub getwchar () {
        eval q( &getwc( &stdin));
    }' unless defined(&getwchar);
    eval 'sub putwc {
        my($wc, $f) = @_;
	    eval q( &fputwc(($wc), ($f)));
    }' unless defined(&putwc);
    eval 'sub putwchar {
        my($wc) = @_;
	    eval q( &putwc(($wc),  &stdout));
    }' unless defined(&putwchar);
}
1;
