ph10 2004/12/20 11:46:22 GMT
Modified files:
exim-doc/doc-txt ChangeLog
exim-src/src perl.c
exim-test-orig/AutoTest/aux 904.pl
exim-test-orig/AutoTest/scripts 904
exim-test-orig/AutoTest/stderr 904
exim-test-orig/AutoTest/stdout 904
Log:
Reset locale after calling embedded Perl, in case it was changed.
Revision Changes Path
1.44 +3 -0 exim/exim-doc/doc-txt/ChangeLog
1.2 +2 -1 exim/exim-src/src/perl.c
1.2 +4 -1 exim/exim-test-orig/AutoTest/aux/904.pl
1.2 +2 -0 exim/exim-test-orig/AutoTest/scripts/904
1.2 +2 -2 exim/exim-test-orig/AutoTest/stderr/904
1.2 +4 -2 exim/exim-test-orig/AutoTest/stdout/904
Index: ChangeLog
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- ChangeLog 17 Dec 2004 14:52:44 -0000 1.43
+++ ChangeLog 20 Dec 2004 11:46:21 -0000 1.44
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.43 2004/12/17 14:52:44 ph10 Exp $
+$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.44 2004/12/20 11:46:21 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -186,6 +186,9 @@
< 0 before doing a fflush(). This bug looks as though it goes back to the
introduction of TLS in release 3.20, but "sometimes" must have been rare
because the tests only now provoked it.
+
+46. Reset the locale to "C" after calling embedded Perl, in case it was changed
+ (this can affect the format of dates).
Exim version 4.43
Index: perl.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/perl.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- perl.c 7 Oct 2004 10:39:01 -0000 1.1
+++ perl.c 20 Dec 2004 11:46:21 -0000 1.2
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/perl.c,v 1.1 2004/10/07 10:39:01 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/perl.c,v 1.2 2004/12/20 11:46:21 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -167,7 +167,8 @@
yield = string_cat(yield, sizep, ptrp, str, (int)len);
FREETMPS;
LEAVE;
-
+
+ setlocale(LC_ALL, "C"); /* In case it got changed */
return yield;
}
Index: 904.pl
===================================================================
RCS file: /home/cvs/exim/exim-test-orig/AutoTest/aux/904.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 904.pl 8 Oct 2004 14:04:55 -0000 1.1
+++ 904.pl 20 Dec 2004 11:46:21 -0000 1.2
@@ -1,3 +1,5 @@
+use POSIX qw(locale_h);
+
sub foo { "Subroutine foo called with args: @_"; }
sub foo_undef { $x; }
@@ -17,4 +19,5 @@
sub debug_write { Exim::debug_write("$_[0]"); "Wrote debug"; }
sub log_write { Exim::log_write("$_[0]"); "Wrote log"; }
-
+
+sub change_locale { setlocale(LC_TIME, "fr_FR"); "Changed locale"; }
Index: 904
===================================================================
RCS file: /home/cvs/exim/exim-test-orig/AutoTest/scripts/904,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 904 8 Oct 2004 14:49:53 -0000 1.1
+++ 904 20 Dec 2004 11:46:22 -0000 1.2
@@ -16,6 +16,8 @@
${perl{return_list}}
${perl{return_variable_vector}}
${perl{return_hash}}
+
+$tod_full // ${perl{change_locale}} // $tod_full
****
0
exim -d-all+expand -be
Index: 904
===================================================================
RCS file: /home/cvs/exim/exim-test-orig/AutoTest/stderr/904,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 904 8 Oct 2004 14:50:08 -0000 1.1
+++ 904 20 Dec 2004 11:46:22 -0000 1.2
@@ -1,8 +1,8 @@
Exim version x.yz uid=1169 gid=1169 pid=pppp D=100
-Lookups: lsearch wildlsearch nwildlsearch cdb dbm dbmnz dnsdb dsearch ldap ldapdn ldapm mysql passwd pgsql testdb
+Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch ldap ldapdn ldapm mysql passwd pgsql testdb
Fixed never_users: 0
configuration file is /source/exim4/AutoTest/confs/904
-log selector = 103319d8
+log selectors = xxxxxxxx xxxxxxxx
admin user
expanding: foo
result: foo
Index: 904
===================================================================
RCS file: /home/cvs/exim/exim-test-orig/AutoTest/stdout/904,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 904 8 Oct 2004 14:50:14 -0000 1.1
+++ 904 20 Dec 2004 11:46:22 -0000 1.2
@@ -1,12 +1,12 @@
> Subroutine foo called with args:
> Subroutine foo called with args: arg1
> Failed: Perl subroutine "foo_undef" returned undef to force failure
-> Failed: expiring... at /source/exim4/AutoTest/aux/904.pl line 5.
+> Failed: expiring... at /source/exim4/AutoTest/aux/904.pl line 7.
> Failed: Undefined subroutine &main::unknown called.
> myhost.test.ex
-> Failed: syntax error in Exim::expand_string argument: unknown variable name "notexists" at /source/exim4/AutoTest/aux/904.pl line 7.
+> Failed: syntax error in Exim::expand_string argument: unknown variable name "notexists" at /source/exim4/AutoTest/aux/904.pl line 9.
>
> Failed: missing or misplaced { or }
@@ -17,6 +17,8 @@
> 30
> 3
> 2/8
+>
+> Tue, 2 Mar 1999 09:44:33 +0000 // Changed locale // Tue, 2 Mar 1999 09:44:33 +0000
>
> Subroutine foo called with args: arg1
> Failed: Perl subroutine "foo_undef" returned undef to force failure