[m-dev.] for review: add make_command_string

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Feb 20 23:00:57 AEDT 2001


On 20-Feb-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> Fix a bug where fact tables weren't working for MSVC version of the
> compiler.
> 
> compiler/passes_aux.m:
>     Add a new predicate make_command_string which will optionally wrap a
>     shell string with a call to sh -c, if the shell string is being
>     constructed in a win32 environment.
> 
> compiler/fact_table.m:
> compiler/llds_out.m:
> compiler/modules.m:
>     Call the make_command_string predicate.

I don't understand how the changes to llds_out.m and modules.m relate
to the bug fix for fact tables.  Why did you change those modules?
Is your change fixing bugs in them too?

> Index: fact_table.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/compiler/fact_table.m,v
> retrieving revision 1.38
> diff -u -r1.38 fact_table.m
> --- fact_table.m	2000/12/07 12:59:06	1.38
> +++ fact_table.m	2001/02/20 10:02:06
> @@ -1134,9 +1134,9 @@
>  	{ map__lookup(ProcTable0, ProcID, ProcInfo0) },
>  	io__output_stream_name(Stream, FileName),
>  	io__close_output(Stream),
> -	{ string__format(
> -	    "sort -o %s %s && cut -d'~' -f1 %s | sort -cu >/dev/null 2>&1",
> -	    [s(FileName), s(FileName), s(FileName)], Command) },
> +	{ make_command_string(string__format(
> +		"sort -o %s %s && echo hi | sort -cu >/dev/null 2>&1",
> +		[s(FileName), s(FileName)]), double, Command) },

The "echo hi" in the middle there looks like a mistake.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list