[m-rev.] diff: fix fact_table.m portability bug

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Jul 21 15:32:51 AEST 2003


Estimated hours taken: 0.5
Branches: main

compiler/fact_table.m:
	Set LC_ALL to C before invoking "sort".
	This is needed on Red Hat Linux 8.0 to ensure that
	"sort" uses the traditional lexicographical ordering.

Workspace: /home/ceres/fjh/mercury
Index: compiler/fact_table.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/fact_table.m,v
retrieving revision 1.47
diff -u -d -r1.47 fact_table.m
--- compiler/fact_table.m	26 May 2003 08:59:54 -0000	1.47
+++ compiler/fact_table.m	21 Jul 2003 05:23:39 -0000
@@ -1153,7 +1153,8 @@
 	io__output_stream_name(Stream, FileName),
 	io__close_output(Stream),
 	{ make_command_string(string__format(
-		"sort -o %s %s && cut -d'~' -f1 %s | sort -cu >/dev/null 2>&1",
+		"LC_ALL=C sort -o %s %s && " ++
+		"cut -d'~' -f1 %s | LC_ALL=C sort -cu >/dev/null 2>&1",
 		[s(FileName), s(FileName), s(FileName)]), double, Command) },
 	globals__io_lookup_bool_option(verbose, Verbose),
 	maybe_write_string(Verbose, "% Invoking system command `"),

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list