diff options
| author | Noah Misch | 2016-11-08 01:27:30 +0000 |
|---|---|---|
| committer | Noah Misch | 2016-11-08 01:27:30 +0000 |
| commit | 650b96707672599e290c982dd63e3a896dbbaba6 (patch) | |
| tree | fe85309ff92e4ddfad903b44d00fb6f96dc0adf3 /src/tools | |
| parent | e3e66d8a9813d22c2aa027d8f373a96d4d4c1b15 (diff) | |
Change qr/foo$/m to qr/foo\n/m, for Perl 5.8.8.
In each case, absence of a trailing newline would itself constitute a
PostgreSQL bug. Therefore, this slightly enhances the changed tests.
This works around a bug that last appeared in Perl 5.8.8, fixing
src/test/modules/test_pg_dump when run against that version. Commit
e7293e3271bf618eeb2d4779a15fc516a69fe463 worked around the bug, but the
subsequent addition of test_pg_dump introduced affected code. As that
commit had shown, slight increases in pattern complexity can suppress
the bug. This commit edits qr/foo$/m patterns too complex to encounter
the bug today, for style consistency and robustness against unrelated
pattern changes. Back-patch to 9.6, where test_pg_dump was introduced.
As of this writing, a fresh MSYS installation includes an affected Perl
5.8.8. The Perl 5.8.8 in Red Hat Enterprise Linux 5.11 carries a patch
that renders it unaffected, but the Perl 5.8.5 of Red Hat Enterprise
Linux 4.4 is affected.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/msvc/Project.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/msvc/Project.pm b/src/tools/msvc/Project.pm index a4eb653c26..faf1a683f6 100644 --- a/src/tools/msvc/Project.pm +++ b/src/tools/msvc/Project.pm @@ -256,7 +256,7 @@ sub AddDir # Match rules that pull in source files from different directories, eg # pgstrcasecmp.c rint.c snprintf.c: % : $(top_srcdir)/src/port/% my $replace_re = - qr{^([^:\n\$]+\.c)\s*:\s*(?:%\s*: )?\$(\([^\)]+\))\/(.*)\/[^\/]+$}m; + qr{^([^:\n\$]+\.c)\s*:\s*(?:%\s*: )?\$(\([^\)]+\))\/(.*)\/[^\/]+\n}m; while ($mf =~ m{$replace_re}m) { my $match = $1; |
