require '_h2ph_pre.ph';

unless(defined(&_LINUX_CTYPE_H)) {
    eval 'sub _LINUX_CTYPE_H () {1;}' unless defined(&_LINUX_CTYPE_H);
    eval 'sub _U () {0x1;}' unless defined(&_U);
    eval 'sub _L () {0x2;}' unless defined(&_L);
    eval 'sub _D () {0x4;}' unless defined(&_D);
    eval 'sub _C () {0x8;}' unless defined(&_C);
    eval 'sub _P () {0x10;}' unless defined(&_P);
    eval 'sub _S () {0x20;}' unless defined(&_S);
    eval 'sub _X () {0x40;}' unless defined(&_X);
    eval 'sub _SP () {0x80;}' unless defined(&_SP);
    eval 'sub __ismask {
        local($x) = @_;
	    eval q(( $_ctype[($x)]));
    }' unless defined(&__ismask);
    eval 'sub isalnum {
        local($c) = @_;
	    eval q((( &__ismask($c)( &_U| &_L| &_D)) != 0));
    }' unless defined(&isalnum);
    eval 'sub isalpha {
        local($c) = @_;
	    eval q((( &__ismask($c)( &_U| &_L)) != 0));
    }' unless defined(&isalpha);
    eval 'sub iscntrl {
        local($c) = @_;
	    eval q((( &__ismask($c)( &_C)) != 0));
    }' unless defined(&iscntrl);
    eval 'sub isdigit {
        local($c) = @_;
	    eval q((( &__ismask($c)( &_D)) != 0));
    }' unless defined(&isdigit);
    eval 'sub isgraph {
        local($c) = @_;
	    eval q((( &__ismask($c)( &_P| &_U| &_L| &_D)) != 0));
    }' unless defined(&isgraph);
    eval 'sub islower {
        local($c) = @_;
	    eval q((( &__ismask($c)( &_L)) != 0));
    }' unless defined(&islower);
    eval 'sub isprint {
        local($c) = @_;
	    eval q((( &__ismask($c)( &_P| &_U| &_L| &_D| &_SP)) != 0));
    }' unless defined(&isprint);
    eval 'sub ispunct {
        local($c) = @_;
	    eval q((( &__ismask($c)( &_P)) != 0));
    }' unless defined(&ispunct);
    eval 'sub isspace {
        local($c) = @_;
	    eval q((( &__ismask($c)( &_S)) != 0));
    }' unless defined(&isspace);
    eval 'sub isupper {
        local($c) = @_;
	    eval q((( &__ismask($c)( &_U)) != 0));
    }' unless defined(&isupper);
    eval 'sub isxdigit {
        local($c) = @_;
	    eval q((( &__ismask($c)( &_D| &_X)) != 0));
    }' unless defined(&isxdigit);
    eval 'sub isascii {
        local($c) = @_;
	    eval q(((($c))<=0x7f));
    }' unless defined(&isascii);
    eval 'sub toascii {
        local($c) = @_;
	    eval q(((($c))&0x7f));
    }' unless defined(&toascii);
    eval 'sub tolower {
        local($c) = @_;
	    eval q( &__tolower($c));
    }' unless defined(&tolower);
    eval 'sub toupper {
        local($c) = @_;
	    eval q( &__toupper($c));
    }' unless defined(&toupper);
}
1;
