ports/175709: build fix for databases/p5-DBD-Oracle (currently marked BROKEN)
Tim
tez at netbsd.org
Wed Jan 30 19:40:01 UTC 2013
>Number: 175709
>Category: ports
>Synopsis: build fix for databases/p5-DBD-Oracle (currently marked BROKEN)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Wed Jan 30 19:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Tim
>Release: 8.3-RELEASE-p5
>Organization:
>Environment:
n/a
>Description:
databases/p5-DBD-Oracle is maked as broken.
It fails to build with the current default version of perl.
The attached patches fix this problem.
>How-To-Repeat:
n/a
>Fix:
add attached patches to the port
(also bump PORTREVISION and remove the BROKEN= in the Makefile of course)
Patch attached with submission follows:
--- Oracle.xs.orig 2006-10-02 07:08:50.000000000 -0500
+++ Oracle.xs 2013-01-28 09:02:11.000000000 -0600
@@ -114,7 +114,7 @@
neatsvpv(DBIc_ERR(imp_sth),0), neatsvpv(DBIc_ERRSTR(imp_sth),0));
void
-ora_execute_array(sth, tuples, exe_count, tuples_status, cols=&sv_undef)
+ora_execute_array(sth, tuples, exe_count, tuples_status, cols=&PL_sv_undef)
SV * sth
SV * tuples
IV exe_count
@@ -145,7 +145,7 @@
SV * sth
CODE:
D_imp_sth(sth);
- ST(0) = dbd_st_cancel(sth, imp_sth) ? &sv_yes : &sv_no;
+ ST(0) = dbd_st_cancel(sth, imp_sth) ? &PL_sv_yes : &PL_sv_no;
MODULE = DBD::Oracle PACKAGE = DBD::Oracle::db
@@ -157,7 +157,7 @@
char * pwd
CODE:
D_imp_dbh(dbh);
- ST(0) = ora_db_reauthenticate(dbh, imp_dbh, uid, pwd) ? &sv_yes : &sv_no;
+ ST(0) = ora_db_reauthenticate(dbh, imp_dbh, uid, pwd) ? &PL_sv_yes : &PL_sv_no;
void
ora_lob_write(dbh, locator, offset, data)
@@ -185,7 +185,7 @@
OCILobCharSetForm_log_stat( imp_dbh->envhp, imp_dbh->errhp, locator, &csform, status );
if (status != OCI_SUCCESS) {
oci_error(dbh, imp_dbh->errhp, status, "OCILobCharSetForm");
- ST(0) = &sv_undef;
+ ST(0) = &PL_sv_undef;
return;
}
#ifdef OCI_ATTR_CHARSET_ID
@@ -193,7 +193,7 @@
OCILobCharSetId_log_stat( imp_dbh->envhp, imp_dbh->errhp, locator, &csid, status );
if (status != OCI_SUCCESS) {
oci_error(dbh, imp_dbh->errhp, status, "OCILobCharSetId");
- ST(0) = &sv_undef;
+ ST(0) = &PL_sv_undef;
return;
}
#endif /* OCI_ATTR_CHARSET_ID */
@@ -207,10 +207,10 @@
(ub2)0, csform , status);
if (status != OCI_SUCCESS) {
oci_error(dbh, imp_dbh->errhp, status, "OCILobWrite");
- ST(0) = &sv_undef;
+ ST(0) = &PL_sv_undef;
}
else {
- ST(0) = &sv_yes;
+ ST(0) = &PL_sv_yes;
}
void
@@ -241,7 +241,7 @@
OCILobCharSetForm_log_stat( imp_dbh->envhp, imp_dbh->errhp, locator, &csform, status );
if (status != OCI_SUCCESS) {
oci_error(dbh, imp_dbh->errhp, status, "OCILobCharSetForm");
- ST(0) = &sv_undef;
+ ST(0) = &PL_sv_undef;
return;
}
#ifdef OCI_ATTR_CHARSET_ID
@@ -249,7 +249,7 @@
OCILobCharSetId_log_stat( imp_dbh->envhp, imp_dbh->errhp, locator, &csid, status );
if (status != OCI_SUCCESS) {
oci_error(dbh, imp_dbh->errhp, status, "OCILobCharSetId");
- ST(0) = &sv_undef;
+ ST(0) = &PL_sv_undef;
return;
}
#endif /* OCI_ATTR_CHARSET_ID */
@@ -262,16 +262,16 @@
csid, csform, status);
if (status != OCI_SUCCESS) {
oci_error(dbh, imp_dbh->errhp, status, "OCILobWriteAppend");
- ST(0) = &sv_undef;
+ ST(0) = &PL_sv_undef;
}
else {
- ST(0) = &sv_yes;
+ ST(0) = &PL_sv_yes;
}
#else
OCILobGetLength_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator, &startp, status);
if (status != OCI_SUCCESS) {
oci_error(dbh, imp_dbh->errhp, status, "OCILobGetLength");
- ST(0) = &sv_undef;
+ ST(0) = &PL_sv_undef;
} else {
/* start one after the end -- the first position in the LOB is 1 */
startp++;
@@ -284,10 +284,10 @@
csid, csform , status);
if (status != OCI_SUCCESS) {
oci_error(dbh, imp_dbh->errhp, status, "OCILobWrite");
- ST(0) = &sv_undef;
+ ST(0) = &PL_sv_undef;
}
else {
- ST(0) = &sv_yes;
+ ST(0) = &PL_sv_yes;
}
}
#endif
@@ -321,7 +321,7 @@
OCILobCharSetForm_log_stat( imp_dbh->envhp, imp_dbh->errhp, locator, &csform, status );
if (status != OCI_SUCCESS) {
oci_error(dbh, imp_dbh->errhp, status, "OCILobCharSetForm");
- dest_sv = &sv_undef;
+ dest_sv = &PL_sv_undef;
return;
}
OCILobRead_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator,
@@ -330,7 +330,7 @@
0, 0, (ub2)0, csform, status);
if (status != OCI_SUCCESS) {
oci_error(dbh, imp_dbh->errhp, status, "OCILobRead");
- dest_sv = &sv_undef;
+ dest_sv = &PL_sv_undef;
}
else {
SvCUR(dest_sv) = amtp; /* always bytes here */
@@ -353,10 +353,10 @@
OCILobTrim_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator, length, status);
if (status != OCI_SUCCESS) {
oci_error(dbh, imp_dbh->errhp, status, "OCILobTrim");
- ST(0) = &sv_undef;
+ ST(0) = &PL_sv_undef;
}
else {
- ST(0) = &sv_yes;
+ ST(0) = &PL_sv_yes;
}
void
@@ -371,7 +371,7 @@
OCILobGetLength_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator, &len, status);
if (status != OCI_SUCCESS) {
oci_error(dbh, imp_dbh->errhp, status, "OCILobTrim");
- ST(0) = &sv_undef;
+ ST(0) = &PL_sv_undef;
}
else {
ST(0) = sv_2mortal(newSVuv(len));
--- dbdimp.c.orig 2006-11-03 08:05:46.000000000 -0600
+++ dbdimp.c 2013-01-28 09:05:25.000000000 -0600
@@ -190,7 +190,7 @@
dTHR;
/* The disconnect_all concept is flawed and needs more work */
- if (!dirty && !SvTRUE(perl_get_sv("DBI::PERL_ENDING",0))) {
+ if (!PL_dirty && !SvTRUE(perl_get_sv("DBI::PERL_ENDING",0))) {
DBIh_SET_ERR_CHAR(drh, (imp_xxh_t*)imp_drh, Nullch, 1, "disconnect_all not implemented", Nullch, Nullch);
return FALSE;
}
@@ -904,7 +904,7 @@
*svp = retsv;
(void)SvREFCNT_inc(retsv); /* so sv_2mortal won't free it */
}
- if (retsv == &sv_yes || retsv == &sv_no)
+ if (retsv == &PL_sv_yes || retsv == &PL_sv_no)
return retsv; /* no need to mortalize yes or no */
return sv_2mortal(retsv);
}
@@ -939,7 +939,7 @@
phs_tpl.imp_sth = imp_sth;
phs_tpl.ftype = imp_dbh->ph_type;
phs_tpl.csform = imp_dbh->ph_csform;
- phs_tpl.sv = &sv_undef;
+ phs_tpl.sv = &PL_sv_undef;
src = statement;
dest = imp_sth->statement;
@@ -1104,7 +1104,7 @@
if (!SvPOK(phs->sv)) { /* normalizations for special cases */
if (SvOK(phs->sv)) { /* ie a number, convert to string ASAP */
if (!(SvROK(phs->sv) && phs->is_inout))
- sv_2pv(phs->sv, &na);
+ sv_2pv(phs->sv, &PL_na);
}
else /* ensure we're at least an SVt_PV (so SvPVX etc work) */
SvUPGRADE(phs->sv, SVt_PV);
@@ -1499,7 +1499,7 @@
croak("Can't bind unknown placeholder '%s' (%s)", name, neatsvpv(ph_namesv,0));
phs = (phs_t*)(void*)SvPVX(*phs_svp); /* placeholder struct */
- if (phs->sv == &sv_undef) { /* first bind for this placeholder */
+ if (phs->sv == &PL_sv_undef) { /* first bind for this placeholder */
phs->is_inout = is_inout;
if (is_inout) {
/* phs->sv assigned in the code below */
@@ -1562,11 +1562,11 @@
phs->maxlen = maxlen; /* 0 if not inout */
if (!is_inout) { /* normal bind so take a (new) copy of current value */
- if (phs->sv == &sv_undef) /* (first time bind) */
+ if (phs->sv == &PL_sv_undef) /* (first time bind) */
phs->sv = newSV(0);
sv_setsv(phs->sv, newvalue);
if (SvAMAGIC(phs->sv)) /* overloaded. XXX hack, logic ought to be pushed deeper */
- sv_pvn_force(phs->sv, &na);
+ sv_pvn_force(phs->sv, &PL_na);
}
else if (newvalue != phs->sv) {
if (phs->sv)
@@ -1835,7 +1835,7 @@
init_bind_for_array_exec(phs)
phs_t *phs;
{
- if (phs->sv == &sv_undef) { /* first bind for this placeholder */
+ if (phs->sv == &PL_sv_undef) { /* first bind for this placeholder */
phs->is_inout = 0;
phs->maxlen = 1;
/* treat Oracle7 SQLT_CUR as SQLT_RSET for Oracle8 */
@@ -2166,7 +2166,7 @@
if (fbh->fetch_cleanup) fbh->fetch_cleanup(sth, fbh);
}
- if (dirty) /* don't walk on the wild side */
+ if (PL_dirty) /* don't walk on the wild side */
return 1;
if (!DBIc_ACTIVE(imp_dbh)) /* no longer connected */
@@ -2244,10 +2244,10 @@
if (DBIc_DBISTATE(imp_sth)->debug >= 6)
PerlIO_printf(DBIc_LOGPIO(imp_sth), " dbd_st_destroy %s\n",
- (dirty) ? "(OCIHandleFree skipped during global destruction)" :
+ (PL_dirty) ? "(OCIHandleFree skipped during global destruction)" :
(imp_sth->nested_cursor) ?"(OCIHandleFree skipped for nested cursor)" : "");
- if (!dirty) { /* XXX not ideal, leak may be a problem in some cases */
+ if (!PL_dirty) { /* XXX not ideal, leak may be a problem in some cases */
if (!imp_sth->nested_cursor) {
OCIHandleFree_log_stat(imp_sth->stmhp, OCI_HTYPE_STMT, status);
if (status != OCI_SUCCESS)
@@ -2282,7 +2282,7 @@
I32 retlen;
hv_iterinit(hv);
while( (sv = hv_iternextsv(hv, &key, &retlen)) != NULL ) {
- if (sv != &sv_undef) {
+ if (sv != &PL_sv_undef) {
phs_t *phs = (phs_t*)(void*)SvPVX(sv);
@@ -2342,7 +2342,7 @@
/* we can't return Nullsv here because the xs code will */
/* then just pass the attribute name to DBI for FETCH. */
croak("Describe failed during %s->FETCH(%s): %ld: %s",
- SvPV(sth,na), key, (long)SvIV(DBIc_ERR(imp_sth)),
+ SvPV(sth,PL_na), key, (long)SvIV(DBIc_ERR(imp_sth)),
SvPV(DBIc_ERRSTR(imp_sth),lna)
);
}
--- oci8.c.orig 2006-10-13 07:12:20.000000000 -0500
+++ oci8.c 2013-01-28 09:07:04.000000000 -0600
@@ -104,7 +104,7 @@
#endif
}
sv = sv_2mortal(newSViv((IV)hdtype));
- return SvPV(sv,na);
+ return SvPV(sv,PL_na);
}
@@ -199,7 +199,7 @@
sv_insert(sqlsv, parse_error_offset, 0, "<*>", 3);
sv_catsv(msgsv, sqlsv);
sv_catpv(msgsv, "'");
- return SvPV(msgsv,na);
+ return SvPV(msgsv,PL_na);
#else
imp_sth = imp_sth; /* not unused */
return msg;
@@ -742,7 +742,7 @@
if (!SvPOK(phs->sv)) { /* normalizations for special cases */
if (SvOK(phs->sv)) { /* ie a number, convert to string ASAP */
if (!(SvROK(phs->sv) && phs->is_inout))
- sv_2pv(phs->sv, &na);
+ sv_2pv(phs->sv, &PL_na);
}
else { /* ensure we're at least an SVt_PV (so SvPVX etc work) */
SvUPGRADE(phs->sv, SVt_PV);
@@ -1538,7 +1538,7 @@
p = "Field %d has an Oracle type (%d) which is not explicitly supported%s";
if (DBIS->debug >= 1)
PerlIO_printf(DBILOGFP, p, i, fbh->dbtype, "\n");
- if (dowarn)
+ if (PL_dowarn)
warn(p, i, fbh->dbtype, "");
break;
}
@@ -2058,7 +2058,7 @@
while( (sv = hv_iternextsv(imp_sth->all_params_hv, &p, &i)) != NULL ) {
int matched = 0;
phs_t *phs = (phs_t*)(void*)SvPVX(sv);
- if (sv == &sv_undef || !phs)
+ if (sv == &PL_sv_undef || !phs)
croak("panic: unbound params");
if (phs->ftype != SQLT_CLOB && phs->ftype != SQLT_BLOB)
continue;
@@ -2067,9 +2067,9 @@
while( (sv = hv_iternextsv(lob_cols_hv, &p, &i)) != NULL ) {
char sql_field[200];
if (phs->ora_field) { /* must match this phs by field name */
- char *ora_field_name = SvPV(phs->ora_field,na);
+ char *ora_field_name = SvPV(phs->ora_field,PL_na);
if (SvCUR(phs->ora_field) != SvCUR(sv)
- || ibcmp(ora_field_name, SvPV(sv,na), (I32)SvCUR(sv) ) )
+ || ibcmp(ora_field_name, SvPV(sv,PL_na), (I32)SvCUR(sv) ) )
continue;
}
else /* basic dumb match by type */
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list