[m-rev.] diff: fix Solaris 2.8 bootstrap failure

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Aug 29 17:55:16 AEST 2002


Estimated hours taken: 0.5
Branches: main

tools/make_port_code:
	Avoid the use of "echo -n", since that construct isn't portable
	(e.g. it doesn't work on i386-pc-solaris2.8).

Workspace: /home/ceres/fjh/ws-ceres2/mercury
Index: tools/make_port_code
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/make_port_code,v
retrieving revision 1.2
diff -u -d -r1.2 make_port_code
--- tools/make_port_code	16 Aug 2002 02:43:16 -0000	1.2
+++ tools/make_port_code	29 Aug 2002 07:51:51 -0000
@@ -197,34 +197,34 @@
                 echo
                 echo "extern void MR_CALL"
                 echo "${prefix}${hlcname}("
-                echo -n "    "
+                line="    "
                 n=1
                 for arg in ${inputs} ${outputs}
                 do
                     if test $n -gt 1
                     then
-                        echo -n ", void *arg${n}"
+                        line="${line}, void *arg${n}"
                     else
-                        echo -n "void *arg${n}"
+                        line="${line}void *arg${n}"
                     fi
                     n=`expr $n + 1`
                 done
-                echo ");"
+                echo "${line});"
                 echo "void MR_CALL"
                 echo "${prefix}${hlcname}("
-                echo -n "    "
+                line="    "
                 n=1
                 for arg in ${inputs} ${outputs}
                 do
                     if test $n -gt 1
                     then
-                        echo -n ", void *arg${n}"
+                        line="${line}, void *arg${n}"
                     else
-                        echo -n "void *arg${n}"
+                        line="${line}void *arg${n}"
                     fi
                     n=`expr $n + 1`
                 done
-                echo ")"
+                echo "${line})"
                 echo "{ MR_fatal_error(\"call to ${prefix}${hlcname}\"); }"
             ) >> ${tmp_hlc}
         done

-- 
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