Print this page
3900 illumos will not build against gcc compiled perl
*** 19,28 ****
--- 19,29 ----
* CDDL HEADER END
*/
/*
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014 Racktop Systems.
*/
/*
* Kstat.xs is a Perl XS (eXStension module) that makes the Solaris
* kstat(3KSTAT) facility available to Perl scripts. Kstat is a general-purpose
*** 892,929 ****
static int
apply_to_ties(SV *self, ATTCb_t cb, void *arg)
{
HV *hash1;
HE *entry1;
- long s;
int ret;
hash1 = (HV *)SvRV(self);
hv_iterinit(hash1);
ret = 1;
/* Iterate over each module */
! while (entry1 = hv_iternext(hash1)) {
HV *hash2;
HE *entry2;
hash2 = (HV *)SvRV(hv_iterval(hash1, entry1));
hv_iterinit(hash2);
/* Iterate over each module:instance */
! while (entry2 = hv_iternext(hash2)) {
HV *hash3;
HE *entry3;
hash3 = (HV *)SvRV(hv_iterval(hash2, entry2));
hv_iterinit(hash3);
/* Iterate over each module:instance:name */
! while (entry3 = hv_iternext(hash3)) {
HV *hash4;
MAGIC *mg;
- HV *tie;
/* Get the tie */
hash4 = (HV *)SvRV(hv_iterval(hash3, entry3));
mg = mg_find((SV *)hash4, 'P');
PERL_ASSERTMSG(mg != 0,
--- 893,928 ----
static int
apply_to_ties(SV *self, ATTCb_t cb, void *arg)
{
HV *hash1;
HE *entry1;
int ret;
hash1 = (HV *)SvRV(self);
hv_iterinit(hash1);
ret = 1;
/* Iterate over each module */
! while ((entry1 = hv_iternext(hash1))) {
HV *hash2;
HE *entry2;
hash2 = (HV *)SvRV(hv_iterval(hash1, entry1));
hv_iterinit(hash2);
/* Iterate over each module:instance */
! while ((entry2 = hv_iternext(hash2))) {
HV *hash3;
HE *entry3;
hash3 = (HV *)SvRV(hv_iterval(hash2, entry2));
hv_iterinit(hash3);
/* Iterate over each module:instance:name */
! while ((entry3 = hv_iternext(hash3))) {
HV *hash4;
MAGIC *mg;
/* Get the tie */
hash4 = (HV *)SvRV(hv_iterval(hash3, entry3));
mg = mg_find((SV *)hash4, 'P');
PERL_ASSERTMSG(mg != 0,
*** 974,1002 ****
hash1 = (HV *)SvRV(self);
hv_iterinit(hash1);
ret = 0;
/* Iterate over each module */
! while (entry1 = hv_iternext(hash1)) {
HV *hash2;
HE *entry2;
module = HePV(entry1, PL_na);
hash2 = (HV *)SvRV(hv_iterval(hash1, entry1));
hv_iterinit(hash2);
/* Iterate over each module:instance */
! while (entry2 = hv_iternext(hash2)) {
HV *hash3;
HE *entry3;
instance = HePV(entry2, PL_na);
hash3 = (HV *)SvRV(hv_iterval(hash2, entry2));
hv_iterinit(hash3);
/* Iterate over each module:instance:name */
! while (entry3 = hv_iternext(hash3)) {
HV *hash4;
MAGIC *mg;
HV *tie;
name = HePV(entry3, PL_na);
--- 973,1001 ----
hash1 = (HV *)SvRV(self);
hv_iterinit(hash1);
ret = 0;
/* Iterate over each module */
! while ((entry1 = hv_iternext(hash1))) {
HV *hash2;
HE *entry2;
module = HePV(entry1, PL_na);
hash2 = (HV *)SvRV(hv_iterval(hash1, entry1));
hv_iterinit(hash2);
/* Iterate over each module:instance */
! while ((entry2 = hv_iternext(hash2))) {
HV *hash3;
HE *entry3;
instance = HePV(entry2, PL_na);
hash3 = (HV *)SvRV(hv_iterval(hash2, entry2));
hv_iterinit(hash3);
/* Iterate over each module:instance:name */
! while ((entry3 = hv_iternext(hash3))) {
HV *hash4;
MAGIC *mg;
HV *tie;
name = HePV(entry3, PL_na);
*** 1082,1092 ****
value = newSVpv(KSTAT_NAMED_STR_PTR(knp),
KSTAT_NAMED_STR_BUFLEN(knp) -1);
break;
default:
PERL_ASSERTMSG(0, "kstat_read: invalid data type");
! break;
}
hv_store(self, knp->name, strlen(knp->name), value, 0);
}
}
--- 1081,1091 ----
value = newSVpv(KSTAT_NAMED_STR_PTR(knp),
KSTAT_NAMED_STR_BUFLEN(knp) -1);
break;
default:
PERL_ASSERTMSG(0, "kstat_read: invalid data type");
! continue;
}
hv_store(self, knp->name, strlen(knp->name), value, 0);
}
}
*** 1623,1633 ****
HE *he;
PPCODE:
self = SvRV(self);
read_kstats((HV *)self, FALSE);
hv_iterinit((HV *)self);
! if (he = hv_iternext((HV *)self)) {
EXTEND(SP, 1);
PUSHs(hv_iterkeysv(he));
}
#
--- 1622,1632 ----
HE *he;
PPCODE:
self = SvRV(self);
read_kstats((HV *)self, FALSE);
hv_iterinit((HV *)self);
! if ((he = hv_iternext((HV *)self))) {
EXTEND(SP, 1);
PUSHs(hv_iterkeysv(he));
}
#
*** 1640,1650 ****
SV* lastkey;
PREINIT:
HE *he;
PPCODE:
self = SvRV(self);
! if (he = hv_iternext((HV *)self)) {
EXTEND(SP, 1);
PUSHs(hv_iterkeysv(he));
}
--- 1639,1649 ----
SV* lastkey;
PREINIT:
HE *he;
PPCODE:
self = SvRV(self);
! if ((he = hv_iternext((HV *)self))) {
EXTEND(SP, 1);
PUSHs(hv_iterkeysv(he));
}