require '_h2ph_pre.ph';

unless(defined(&KADM_DEFS)) {
    eval 'sub KADM_DEFS () {1;}' unless defined(&KADM_DEFS);
    require 'kerberosIV/krb_db.ph';
    eval 'sub MAX_KPW_LEN () {128;}' unless defined(&MAX_KPW_LEN);
    eval 'sub MIN_KPW_LEN () {6;}' unless defined(&MIN_KPW_LEN);
    eval 'sub KADM_RET_MAX () {2048;}' unless defined(&KADM_RET_MAX);
    eval 'sub KADM_VERSTR () {"KADM0.0A";}' unless defined(&KADM_VERSTR);
    eval 'sub KADM_ULOSE () {"KYOULOSE";}' unless defined(&KADM_ULOSE);
    eval 'sub KADM_VERSIZE () { &strlen( &KADM_VERSTR);}' unless defined(&KADM_VERSIZE);
    eval 'sub PWSERV_NAME () {"changepw";}' unless defined(&PWSERV_NAME);
    eval 'sub KADM_SNAME () {"kerberos_master";}' unless defined(&KADM_SNAME);
    eval 'sub KADM_PORT () {751;}' unless defined(&KADM_PORT);
    eval 'sub KADM_SINST () {"kerberos";}' unless defined(&KADM_SINST);
    eval 'sub ALLOC () {2;}' unless defined(&ALLOC);
    eval 'sub RESERVED () {3;}' unless defined(&RESERVED);
    eval 'sub DEALLOC () {4;}' unless defined(&DEALLOC);
    eval 'sub DEACTIVATED () {5;}' unless defined(&DEACTIVATED);
    eval 'sub ACTIVE () {6;}' unless defined(&ACTIVE);
    eval 'sub FLDSZ () {4;}' unless defined(&FLDSZ);
    eval 'sub EXTENDED_KADM () {1;}' unless defined(&EXTENDED_KADM);
    if(defined(&EXTENDED_KADM)) {
    }
    eval 'sub KADM_NAME () {31;}' unless defined(&KADM_NAME);
    eval 'sub KADM_INST () {30;}' unless defined(&KADM_INST);
    eval 'sub KADM_EXPDATE () {29;}' unless defined(&KADM_EXPDATE);
    eval 'sub KADM_ATTR () {28;}' unless defined(&KADM_ATTR);
    eval 'sub KADM_MAXLIFE () {27;}' unless defined(&KADM_MAXLIFE);
    eval 'sub KADM_DESKEY () {26;}' unless defined(&KADM_DESKEY);
    if(defined(&EXTENDED_KADM)) {
	eval 'sub KADM_MODDATE () {25;}' unless defined(&KADM_MODDATE);
	eval 'sub KADM_MODNAME () {24;}' unless defined(&KADM_MODNAME);
	eval 'sub KADM_MODINST () {23;}' unless defined(&KADM_MODINST);
	eval 'sub KADM_KVNO () {22;}' unless defined(&KADM_KVNO);
    }
    eval 'sub SET_FIELD {
        local($f,$d) = @_;
	    eval q(($d->[3-($f/8)]|=(1<<($f%8))));
    }' unless defined(&SET_FIELD);
    eval 'sub CLEAR_FIELD {
        local($f,$d) = @_;
	    eval q(($d->[3-($f/8)]&=(~(1<<($f%8)))));
    }' unless defined(&CLEAR_FIELD);
    eval 'sub IS_FIELD {
        local($f,$d) = @_;
	    eval q(($d->[3-($f/8)](1<<($f%8))));
    }' unless defined(&IS_FIELD);
    eval 'sub KADM_SUCCESS () {0;}' unless defined(&KADM_SUCCESS);
    eval 'sub WILDCARD_STR () {"*";}' unless defined(&WILDCARD_STR);
    eval("sub ADDACL () { 0; }") unless defined(&ADDACL);
    eval("sub GETACL () { 1; }") unless defined(&GETACL);
    eval("sub MODACL () { 2; }") unless defined(&MODACL);
    eval("sub STABACL () { 3; }") unless defined(&STABACL);
    eval("sub DELACL () { 4; }") unless defined(&DELACL);
    eval 'sub CHANGE_PW () {2;}' unless defined(&CHANGE_PW);
    eval 'sub ADD_ENT () {3;}' unless defined(&ADD_ENT);
    eval 'sub MOD_ENT () {4;}' unless defined(&MOD_ENT);
    eval 'sub GET_ENT () {5;}' unless defined(&GET_ENT);
    eval 'sub CHECK_PW () {6;}' unless defined(&CHECK_PW);
    eval 'sub CHG_STAB () {7;}' unless defined(&CHG_STAB);
    eval 'sub DEL_ENT () {8;}' unless defined(&DEL_ENT);
}
1;
