Fix build with perl 5.14.

This commit is contained in:
hiramatsu 2011-12-19 15:26:51 +00:00
parent d92241c25f
commit aad8a1cb28
4 changed files with 77 additions and 2 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.21 2011/08/14 12:26:13 obache Exp $
# $NetBSD: Makefile,v 1.22 2011/12/19 15:26:51 hiramatsu Exp $
#
DISTNAME= perldap-1.2.2
@ -12,6 +12,7 @@ EXTRACT_SUFX= .tgz
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.mozilla.org/directory/perldap.html
COMMENT= Perl5 module to build LDAP clients with perl
LICENSE= mpl-1.0
PKG_DESTDIR_SUPPORT= user-destdir

View file

@ -1,6 +1,8 @@
$NetBSD: distinfo,v 1.3 2005/02/23 22:24:26 agc Exp $
$NetBSD: distinfo,v 1.4 2011/12/19 15:26:51 hiramatsu Exp $
SHA1 (perldap-1.2.2.tgz) = 71511b4c2c246db1b520732c3797551d35c26ae7
RMD160 (perldap-1.2.2.tgz) = 834941555053f0b101712d0caeb26c86c22c65d7
Size (perldap-1.2.2.tgz) = 74058 bytes
SHA1 (patch-API.xs) = 761a7f1aef91c8c017f921d39fc899cd59e9a15f
SHA1 (patch-aa) = 430f7e2e41087ca3a3eba19b012ba4f96c0a1de3
SHA1 (patch-typemap) = 9255e0d9c53d57ee90f27f5e544867ca51d92d8c

View file

@ -0,0 +1,51 @@
$NetBSD: patch-API.xs,v 1.1 2011/12/19 15:26:51 hiramatsu Exp $
Modification to be built with Perl 5.14 API.
--- API.xs.orig 2011-12-19 09:59:44.000000000 +0000
+++ API.xs
@@ -107,7 +107,7 @@ char ** avref2charptrptr(SV *avref)
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] = strdup(SvPV(*current_val,PL_na));
}
tmp_cpp[ix_av] = NULL;
@@ -135,7 +135,7 @@ struct berval ** avref2berptrptr(SV *avr
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);
+ tmp_char = SvPV(*current_val,PL_na);
val_len = SvCUR(*current_val);
Newz(1,tmp2,val_len+1,char);
@@ -272,7 +272,7 @@ LDAPMod *parse1mod(SV *ldap_value_ref,ch
} 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)
{
@@ -289,7 +289,7 @@ LDAPMod *parse1mod(SV *ldap_value_ref,ch
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_ref,na));
+ ldap_current_mod->mod_values[0] = strdup(SvPV(ldap_value_ref,PL_na));
ldap_current_mod->mod_values[1] = NULL;
}
}
@@ -1528,7 +1528,7 @@ ldap_url_parse(url)
hv_store(FullHash,options_key,strlen(options_key),options,0);
ldap_free_urldesc(realcomp);
} else {
- RETVAL = &sv_undef;
+ RETVAL = &PL_sv_undef;
}
}
OUTPUT:

View file

@ -0,0 +1,21 @@
$NetBSD: patch-typemap,v 1.1 2011/12/19 15:26:51 hiramatsu Exp $
Modification to be built with Perl 5.14 API.
--- typemap.orig 2011-12-19 09:59:47.000000000 +0000
+++ typemap
@@ -54,11 +54,11 @@ struct timeval T_timeval
#########
INPUT
T_timeval
- $var.tv_sec = atof((char *)SvPV($arg,na));
+ $var.tv_sec = atof((char *)SvPV($arg,PL_na));
$var.tv_usec = 0
T_berval
- $var.bv_val = (char *)SvPV($arg,na);
- $var.bv_len = na
+ $var.bv_val = (char *)SvPV($arg,PL_na);
+ $var.bv_len = PL_na
T_charptrptr
$var = (char **)avref2charptrptr($arg)
T_bervalptrptr