Skip Menu |

This queue is for tickets about the Net-LDAPapi CPAN distribution.

Report information
The Basics
Id: 719
Status: resolved
Priority: 0/
Queue: Net-LDAPapi

People
Owner: Nobody in particular
Requestors: selsky [...] columbia.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.42
Fixed in: 2.00



Subject: module doesn't work with perl5.6.1
The syntax for perl internals has changed in perl5.6.1 The variables need to have the "PL_" prefix. I tested this patch against Net::LDAPapi 1.43 on solaris8 and perl5.6.1 $ uname -a SunOS hazelnut 5.8 Generic_108528-13 sun4u sparc $ perl -v This is perl, v5.6.1 built for sun4-solaris [snip] Without this patch you cannot compile Net::LDAPapi with perl5.6.1 By the way, I am building against the openldap-1.0.12 libraries.
--- LDAPapi.xs 2001/06/20 19:00:58 1.1 +++ LDAPapi.xs 2001/06/20 19:16:12 1.2 @@ -103,7 +103,7 @@ ldap_value_count++) { ldap_current_value_sv = av_fetch(ldap_value_array_av,ldap_value_count,0); - ldap_current_value_char = SvPV(*ldap_current_value_sv,na); + ldap_current_value_char = SvPV(*ldap_current_value_sv,PL_na); ldap_pvlen = SvCUR(*ldap_current_value_sv); if (strcmp(ldap_current_value_char,"") != 0) { @@ -212,7 +212,7 @@ } else { if (cont) return NULL; - if (strcmp(SvPV(ldap_value_ref,na),"") == 0) + if (strcmp(SvPV(ldap_value_ref,PL_na),"") == 0) { if (ldap_add_func != 1) { @@ -229,7 +229,7 @@ ldap_current_mod->mod_op = LDAP_MOD_REPLACE; } New(1,ldap_current_mod->mod_values,2,char *); - ldap_current_mod->mod_values[0] = SvPV(ldap_value_ref,na); + ldap_current_mod->mod_values[0] = SvPV(ldap_value_ref,PL_na); ldap_current_mod->mod_values[1] = NULL; } } @@ -595,7 +595,7 @@ for (count=0;count <= arraylen; count++) { current = av_fetch((AV *)SvRV(attrs),count,0); - attrs_char[count] = SvPV(*current,na); + attrs_char[count] = SvPV(*current,PL_na); } attrs_char[arraylen+1] = NULL; } @@ -631,7 +631,7 @@ for (count=0;count <= arraylen; count++) { current = av_fetch((AV *)SvRV(attrs),count,0); - attrs_char[count] = SvPV(*current,na); + attrs_char[count] = SvPV(*current,PL_na); } attrs_char[arraylen+1] = NULL; } @@ -677,7 +677,7 @@ for (count=0;count <= arraylen; count++) { current = av_fetch((AV *)SvRV(attrs),count,0); - attrs_char[count] = SvPV(*current,na); + attrs_char[count] = SvPV(*current,PL_na); } attrs_char[arraylen+1] = NULL; } @@ -852,7 +852,7 @@ RETVAL = newSVpv(dn,0); ldap_memfree(dn); } else { - RETVAL = &sv_undef; + RETVAL = &PL_sv_undef; } } OUTPUT: @@ -946,7 +946,7 @@ RETVAL = newSVpv(attr,0); ldap_memfree(attr); } else { - RETVAL = &sv_undef; + RETVAL = &PL_sv_undef; } } OUTPUT: @@ -968,7 +968,7 @@ RETVAL = newSVpv(attr,0); ldap_memfree(attr); } else { - RETVAL = &sv_undef; + RETVAL = &PL_sv_undef; } } OUTPUT: @@ -1178,7 +1178,7 @@ #endif ldap_free_urldesc(realcomp); } else { - RETVAL = &sv_undef; + RETVAL = &PL_sv_undef; } } OUTPUT:
From: john [...] edm1.com
[guest - Fri Jun 7 03:20:06 2002]: Thank you very much for posting your timely patch, I appreciate it greatly. By replacing all occurances of ",na" with ",PL_na" and "sv_undef" with "PL_sv_undef" I was able to successfully make the module. I was not able to complete the make without the changes. $ uname -a Linux imap.edm1.com 2.2.16-3 #1 Mon Jun 19 18:10:14 EDT 2000 i686 unknown $ perl -v This is perl, version 5.005_03 built for i386-linux I am building with UMich LDAP libraries. Successfully compliled, installed and tested. Show quoted text
> The syntax for perl internals has changed in perl5.6.1 The variables > need to have the "PL_" prefix. I tested this patch against > Net::LDAPapi 1.43 on solaris8 and perl5.6.1 > > $ uname -a > SunOS hazelnut 5.8 Generic_108528-13 sun4u sparc > $ perl -v > > This is perl, v5.6.1 built for sun4-solaris > [snip] > > Without this patch you cannot compile Net::LDAPapi with perl5.6.1 By > the way, I am building against the openldap-1.0.12 libraries.
[guest - Fri Jun 7 03:20:06 2002]: Show quoted text
> The syntax for perl internals has changed in perl5.6.1 The variables > need to have the "PL_" prefix. I tested this patch against > Net::LDAPapi 1.43 on solaris8 and perl5.6.1
Btw, i don't know where to find the version 1.43 of Net::LDAPapi, so here is a patch for the 1.42 version available on CPAN.
--- LDAPapi.xs.orig Mon Aug 19 09:19:56 2002 +++ LDAPapi.xs Mon Aug 19 09:21:09 2002 @@ -92,7 +92,7 @@ ldap_value_count++) { ldap_current_value_sv = av_fetch(ldap_value_array_av,ldap_value_count,0); - ldap_current_value_char = SvPV(*ldap_current_value_sv,na); + ldap_current_value_char = SvPV(*ldap_current_value_sv,PL_na); ldap_pvlen = SvCUR(*ldap_current_value_sv); if (strcmp(ldap_current_value_char,"") != 0) { @@ -194,7 +194,7 @@ } } } else { - if (strcmp(SvPV(ldap_value_ref,na),"") == 0) + if (strcmp(SvPV(ldap_value_ref,PL_na),"") == 0) { if (ldap_add_func != 1) { @@ -211,7 +211,7 @@ ldap_current_mod->mod_op = LDAP_MOD_REPLACE; } New(1,ldap_current_mod->mod_values,2,char *); - ldap_current_mod->mod_values[0] = SvPV(ldap_value_ref,na); + ldap_current_mod->mod_values[0] = SvPV(ldap_value_ref,PL_na); ldap_current_mod->mod_values[1] = NULL; } } @@ -575,7 +575,7 @@ for (count=0;count <= arraylen; count++) { current = av_fetch((AV *)SvRV(attrs),count,0); - attrs_char[count] = SvPV(*current,na); + attrs_char[count] = SvPV(*current,PL_na); } attrs_char[arraylen+1] = NULL; } @@ -611,7 +611,7 @@ for (count=0;count <= arraylen; count++) { current = av_fetch((AV *)SvRV(attrs),count,0); - attrs_char[count] = SvPV(*current,na); + attrs_char[count] = SvPV(*current,PL_na); } attrs_char[arraylen+1] = NULL; } @@ -657,7 +657,7 @@ for (count=0;count <= arraylen; count++) { current = av_fetch((AV *)SvRV(attrs),count,0); - attrs_char[count] = SvPV(*current,na); + attrs_char[count] = SvPV(*current,PL_na); } attrs_char[arraylen+1] = NULL; } @@ -1134,7 +1134,7 @@ #endif ldap_free_urldesc(realcomp); } else { - RETVAL = &sv_undef; + RETVAL = &PL_sv_undef; } } OUTPUT: @@ -1218,7 +1218,7 @@ for (count=0;count <= arraylen; count++) { current = av_fetch((AV *)SvRV(attrs),count,0); - attrs_char[count] = SvPV(*current,na); + attrs_char[count] = SvPV(*current,PL_na); } attrs_char[arraylen+1] = NULL; }
Show quoted text
> Btw, i don't know where to find the version 1.43 of Net::LDAPapi, so > here is a patch for the 1.42 version available on CPAN.
http://www.netsw.org/net/ip/infoservice/ldap/interface/Net-LDAPapi-1.43.tar.gz