Fix non-OS Perl xsubpp issue

This should be the right fix.
Also cleaned up compile warnings from Clang in the cap5 build.
This commit is contained in:
Andrew Johnson
2014-12-02 11:03:16 -06:00
parent 69eaaa17ba
commit c1d33e614c
2 changed files with 17 additions and 16 deletions

View File

@@ -462,7 +462,7 @@ SV * CA_new(const char *class, const char *name, ...) {
SvREFCNT_dec(ca_ref);
if (pch->conn_sub)
SvREFCNT_dec(pch->conn_sub);
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
return ca_ref;
@@ -491,7 +491,7 @@ void CA_DESTROY(SV *ca_ref) {
Safefree(pch);
if (status != ECA_NORMAL)
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
@@ -516,7 +516,7 @@ void CA_change_connection_event(SV *ca_ref, SV *sub) {
status = ca_change_connection_event(pch->chan, handler);
if (status != ECA_NORMAL) {
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
}
@@ -600,7 +600,7 @@ void CA_put(SV *ca_ref, SV *val, ...) {
Safefree(p.dbr);
}
if (status != ECA_NORMAL) {
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
XSRETURN(0);
}
@@ -695,7 +695,7 @@ void CA_put_callback(SV *ca_ref, SV *sub, SV *val, ...) {
}
if (status != ECA_NORMAL) {
SvREFCNT_dec(put_sub);
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
XSRETURN(0);
}
@@ -736,7 +736,7 @@ void CA_put_acks(SV *ca_ref, SV *sevr, ...) {
status = ca_put(DBR_PUT_ACKS, pch->chan, &acks);
if (status != ECA_NORMAL)
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
XSRETURN(0);
}
@@ -760,7 +760,7 @@ void CA_put_ackt(SV *ca_ref, int ack, ...) {
status = ca_put(DBR_PUT_ACKS, pch->chan, &ackt);
if (status != ECA_NORMAL)
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
XSRETURN(0);
}
@@ -788,7 +788,7 @@ void CA_get(SV *ca_ref) {
status = ca_get(best_type(pch), pch->chan, &pch->data);
}
if (status != ECA_NORMAL) {
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
}
@@ -869,7 +869,7 @@ void CA_get_callback(SV *ca_ref, SV *sub, ...) {
exit_croak:
SvREFCNT_dec(get_sub);
croak(croak_msg);
croak("%s", croak_msg);
}
@@ -953,7 +953,7 @@ SV * CA_create_subscription(SV *ca_ref, const char *mask_str, SV *sub, ...) {
exit_croak:
SvREFCNT_dec(mon_ref);
SvREFCNT_dec(mon_sub);
croak(croak_msg);
croak("%s", croak_msg);
}
@@ -970,7 +970,7 @@ void CA_clear_subscription(const char *class, SV *mon_ref) {
status = ca_clear_subscription(event);
if (status != ECA_NORMAL) {
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
}
@@ -980,7 +980,7 @@ void CA_clear_subscription(const char *class, SV *mon_ref) {
void CA_pend_io(const char *class, double timeout) {
int status = ca_pend_io(timeout);
if (status != ECA_NORMAL) {
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
}
@@ -995,7 +995,7 @@ int CA_test_io(const char *class) {
void CA_pend_event(const char *class, double timeout) {
int status = ca_pend_event(timeout);
if (status != ECA_TIMEOUT) {
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
}
@@ -1089,7 +1089,7 @@ void CA_add_exception_event(const char *class, SV *sub) {
if (status != ECA_NORMAL) {
SvREFCNT_dec(exception_sub);
exception_sub = NULL;
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
}
@@ -1147,7 +1147,7 @@ void CA_replace_printf_handler(const char *class, SV *sub) {
if (status != ECA_NORMAL) {
SvREFCNT_dec(printf_sub);
printf_sub = NULL;
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
}

View File

@@ -53,7 +53,8 @@ include $(TOP)/configure/RULES
ifdef T_A
EXTUTILS = $(shell $(PERL) ../perlConfig.pl privlib)/ExtUtils
XSUBPP = $(firstword $(wildcard /usr/bin/xsubpp $(EXTUTILS)/xsubpp))
PERLBIN = $(shell $(PERL) ../perlConfig.pl bin)
XSUBPP = $(firstword $(wildcard $(PERLBIN)/xsubpp $(EXTUTILS)/xsubpp))
%.c: ../%.xs
$(RM) $@ $@_new