in reply to Re: Help compiling perldap1.4
in thread Help compiling perldap1.4
That patch is broken. You need to do s/NA/na/g to get it to apply properly. This will work:
*** typemap.orig Thu Feb 7 11:36:46 2002 --- typemap Thu Feb 7 11:37:35 2002 *************** *** 54,64 **** ######### INPUT T_timeval ! $var.tv_sec = atof((char *)SvPV($arg,na)); $var.tv_usec = 0 T_berval ! $var.bv_val = (char *)SvPV($arg,na); ! $var.bv_len = na T_charptrptr $var = (char **)avref2charptrptr($arg) T_bervalptrptr --- 54,64 ---- ######### INPUT T_timeval ! $var.tv_sec = atof((char *)SvPV($arg,PL_na)); $var.tv_usec = 0 T_berval ! $var.bv_val = (char *)SvPV($arg,PL_na); ! $var.bv_len = PL_na T_charptrptr $var = (char **)avref2charptrptr($arg) T_bervalptrptr *** API.xs.orig Thu Feb 7 11:02:26 2002 --- API.xs Thu Feb 7 11:48:20 2002 *************** *** 194,200 **** for (ix_av = 0;ix_av <= avref_arraylen;ix_av++) { current_val = av_fetch((AV *)SvRV(avref),ix_av,0); ! tmp_cpp[ix_av] = StrDup(SvPV(*current_val,na)); } tmp_cpp[ix_av] = NULL; --- 194,200 ---- for (ix_av = 0;ix_av <= avref_arraylen;ix_av++) { current_val = av_fetch((AV *)SvRV(avref),ix_av,0); ! tmp_cpp[ix_av] = StrDup(SvPV(*current_val,PL_na)); } tmp_cpp[ix_av] = NULL; *************** *** 224,230 **** New(1,tmp_ber[ix_av],1,struct berval); current_val = av_fetch((AV *)SvRV(avref),ix_av,0); ! tmp_char = SvPV(*current_val,na); val_len = SvCUR(*current_val); Newz(1,tmp2,val_len+1,char); --- 224,230 ---- New(1,tmp_ber[ix_av],1,struct berval); current_val = av_fetch((AV *)SvRV(avref),ix_av,0); ! tmp_char = SvPV(*current_val,PL_na); val_len = SvCUR(*current_val); Newz(1,tmp2,val_len+1,char); *************** *** 366,372 **** } else { if (cont) return NULL; ! if (strcmp(SvPV(ldap_value_ref,na),"") == 0) { if (ldap_add_func != 1) { --- 366,372 ---- } else { if (cont) return NULL; ! if (strcmp(SvPV(ldap_value_ref,PL_na),"") == 0) { if (ldap_add_func != 1) { *************** *** 383,389 **** ldap_current_mod->mod_op = LDAP_MOD_REPLACE; } New(1,ldap_current_mod->mod_values,2,char *); ! ldap_current_mod->mod_values[0] = StrDup(SvPV(ldap_value_re +f,na)); ldap_current_mod->mod_values[1] = NULL; } } --- 383,389 ---- ldap_current_mod->mod_op = LDAP_MOD_REPLACE; } New(1,ldap_current_mod->mod_values,2,char *); ! ldap_current_mod->mod_values[0] = StrDup(SvPV(ldap_value_re +f,PL_na)); ldap_current_mod->mod_values[1] = NULL; } } *************** *** 1716,1722 **** hv_store(FullHash,options_key,strlen(options_key),option +s,0); ldap_free_urldesc(realcomp); } else { ! RETVAL = &sv_undef; } } OUTPUT: --- 1716,1722 ---- hv_store(FullHash,options_key,strlen(options_key),option +s,0); ldap_free_urldesc(realcomp); } else { ! RETVAL = &PL_sv_undef; } } OUTPUT:
cheers
tachyon
|
|---|