require '_h2ph_pre.ph';

unless(defined(&_CTYPE_H_)) {
    eval 'sub _CTYPE_H_ () {1;}' unless defined(&_CTYPE_H_);
    require 'sys/cdefs.ph';
    eval 'sub _U () {0x01;}' unless defined(&_U);
    eval 'sub _L () {0x02;}' unless defined(&_L);
    eval 'sub _N () {0x04;}' unless defined(&_N);
    eval 'sub _S () {0x08;}' unless defined(&_S);
    eval 'sub _P () {0x10;}' unless defined(&_P);
    eval 'sub _C () {0x20;}' unless defined(&_C);
    eval 'sub _X () {0x40;}' unless defined(&_X);
    eval 'sub _B () {0x80;}' unless defined(&_B);
    if(!defined( &_ANSI_SOURCE)  && !defined( &_POSIX_SOURCE)) {
    }
    eval 'sub isdigit {
        local($c) = @_;
	    eval q((( &_ctype_ + 1)[($c)] &  &_N));
    }' unless defined(&isdigit);
    eval 'sub islower {
        local($c) = @_;
	    eval q((( &_ctype_ + 1)[($c)] &  &_L));
    }' unless defined(&islower);
    eval 'sub isspace {
        local($c) = @_;
	    eval q((( &_ctype_ + 1)[($c)] &  &_S));
    }' unless defined(&isspace);
    eval 'sub ispunct {
        local($c) = @_;
	    eval q((( &_ctype_ + 1)[($c)] &  &_P));
    }' unless defined(&ispunct);
    eval 'sub isupper {
        local($c) = @_;
	    eval q((( &_ctype_ + 1)[($c)] &  &_U));
    }' unless defined(&isupper);
    eval 'sub isalpha {
        local($c) = @_;
	    eval q((( &_ctype_ + 1)[($c)] & ( &_U| &_L)));
    }' unless defined(&isalpha);
    eval 'sub isxdigit {
        local($c) = @_;
	    eval q((( &_ctype_ + 1)[($c)] & ( &_N| &_X)));
    }' unless defined(&isxdigit);
    eval 'sub isalnum {
        local($c) = @_;
	    eval q((( &_ctype_ + 1)[($c)] & ( &_U| &_L| &_N)));
    }' unless defined(&isalnum);
    eval 'sub isprint {
        local($c) = @_;
	    eval q((( &_ctype_ + 1)[($c)] & ( &_P| &_U| &_L| &_N| &_B)));
    }' unless defined(&isprint);
    eval 'sub isgraph {
        local($c) = @_;
	    eval q((( &_ctype_ + 1)[($c)] & ( &_P| &_U| &_L| &_N)));
    }' unless defined(&isgraph);
    eval 'sub iscntrl {
        local($c) = @_;
	    eval q((( &_ctype_ + 1)[($c)] &  &_C));
    }' unless defined(&iscntrl);
    eval 'sub tolower {
        local($c) = @_;
	    eval q((( &_tolower_tab_ + 1)[($c)]));
    }' unless defined(&tolower);
    eval 'sub toupper {
        local($c) = @_;
	    eval q((( &_toupper_tab_ + 1)[($c)]));
    }' unless defined(&toupper);
    if(!defined( &_ANSI_SOURCE)  && !defined ( &_POSIX_SOURCE)) {
	if((defined(&notyet) ? &notyet : 0)) {
	    eval 'sub isblank {
	        local($c) = @_;
    		eval q((( &_ctype_ + 1)[($c)] &  &_B));
	    }' unless defined(&isblank);
	}
	eval 'sub isascii {
	    local($c) = @_;
    	    eval q((($c) <= 0177));
	}' unless defined(&isascii);
	eval 'sub toascii {
	    local($c) = @_;
    	    eval q((($c) & 0177));
	}' unless defined(&toascii);
	eval 'sub _tolower {
	    local($c) = @_;
    	    eval q((($c) - ord(\'A\' + \'a\')));
	}' unless defined(&_tolower);
	eval 'sub _toupper {
	    local($c) = @_;
    	    eval q((($c) - ord(\'a\' + \'A\')));
	}' unless defined(&_toupper);
    }
}
1;
