X-Git-Url: https://git.exim.org/users/jgh/exim.git/blobdiff_plain/76a2d7bad2f69787569f842d9d154524c4758ce3..e22ca4ac1c94f1ad4e4543d88003156ab4c26cfe:/src/src/perl.c diff --git a/src/src/perl.c b/src/src/perl.c index 5bb7ad360..4cbcec7f5 100644 --- a/src/src/perl.c +++ b/src/src/perl.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/perl.c,v 1.3 2005/01/27 15:00:39 ph10 Exp $ */ +/* $Cambridge: exim/src/src/perl.c,v 1.5 2006/07/14 14:32:09 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -113,22 +113,24 @@ init_perl(uschar *startup_code) /*********************************************************************/ /* These lines by PH added to make "warn" output go to the Exim log; I hope this doesn't break anything. */ - + sv = newSVpv( "$SIG{__WARN__} = sub { my($s) = $_[0];" - "$s =~ s/\\n$//;" + "$s =~ s/\\n$//;" "Exim::log_write($s) };", 0); PUSHMARK(SP); perl_eval_sv(sv, G_SCALAR|G_DISCARD|G_KEEPERR); SvREFCNT_dec(sv); if (SvTRUE(ERRSV)) return US SvPV(ERRSV, len); /*********************************************************************/ - + sv = newSVpv(CS startup_code, 0); PUSHMARK(SP); perl_eval_sv(sv, G_SCALAR|G_DISCARD|G_KEEPERR); SvREFCNT_dec(sv); if (SvTRUE(ERRSV)) return US SvPV(ERRSV, len); + + setlocale(LC_ALL, "C"); /* In case it got changed */ return NULL; } } @@ -182,7 +184,7 @@ call_perl_cat(uschar *yield, int *sizep, int *ptrp, uschar **errstrp, yield = string_cat(yield, sizep, ptrp, str, (int)len); FREETMPS; LEAVE; - + setlocale(LC_ALL, "C"); /* In case it got changed */ return yield; }