From a248007e1e2f6b86bcbbca757a4c0e5bfa37690d Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 1 Sep 2004 10:01:48 +0000 Subject: [PATCH] [project @ 2004-09-01 10:01:48 by simonmar] Apply the fix from [ 1015205 ] ghc-split fails to quote path when used as regex namely escape backslashes in the pathname $Tmp_prefix before using it as a regex. The fix doesn't look like it solves the general case, but it'll do for now. --- ghc/driver/split/ghc-split.lprl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ghc/driver/split/ghc-split.lprl b/ghc/driver/split/ghc-split.lprl index 195edf3..58c603f 100644 --- a/ghc/driver/split/ghc-split.lprl +++ b/ghc/driver/split/ghc-split.lprl @@ -45,6 +45,11 @@ sub split_asm_file { # &tidy_up_and_die(1,"$Pgm: no split markers in .s file!\n") # if $prologue_stuff eq $s_stuff; + # about to use $Tmp_prefix in a regex - make sure backslashes don't get + # interpreted in a strange way. ToDo: what about other regex + # characters, eg. '.'? + $Tmp_prefix =~ s/\\/\\\\/g; + # lie about where this stuff came from $prologue_stuff =~ s|"${Tmp_prefix}\.c"|"$ifile_root\.hc"|g; -- 1.7.10.4