[m-rev.] for review: windows compatibility
Julien Fischer
juliensf at cs.mu.OZ.AU
Tue Sep 6 17:34:14 AEST 2005
On Tue, 6 Sep 2005, Ian MacLarty wrote:
> For review by anyone.
>
> These changes make it possible to compile Mercury programs without cygwin
> (using mingw gcc). Cygwin is still required to build the compiler of course.
> mmc also obviously doesn't work since it's a bash script (you have to
> set all the appropriate environment variables manually and call
> mercury_compile.exe directly).
>
> I was thinking of changing mmc to a C program to make it more portable. Would
> there be any objections to this?
>
Not from me, although you would (eventually) need to do the same for the
rest mprof, mdb etc.
> Fact tables will not work on windows since the code relies on some unix
> commands (like sort).
>
> Estimated hours taken: 10
> Branches: main and 0.12
>
> Various changes to make Mercury more compatible with Windows.
>
> configure.in:
> Turn off symbolic links when compiling in cygwin.
> Previously the configure script checked for certain compiler
> names or whether the --mno-cygwin option was passed to gcc,
> however this check is not good enough since the user may specify
> the mingw version of gcc using the --with-cc option.
But won't that stop use using symlinks in cygwin normally?
Could we at least have another option, '--cyginw-use-symlinks'
that allowed us turn them back on manually?
> compiler/mercury_compile.m:
> mdbcomp/trace_counts.m:
> Use rstrip to remove trailing newlines, since on Windows there
> may be more than one character at the end of each line
> (a newline and a carriage return or line feed
> - I can't remember which).
>
Is the trace count mechanism still broken on Windows?
> compiler/passes_aux.m:
> Remove invoke_shell_command since it is not used anywhere and
> according to the comment won't work on Windows.
>
> If on windows do not use `2>&1' to redirect standard error since this
> doesn't work on windows 98 and 95 (and possibly other versions too).
>
I don't think we should worry about supporting older versions of
Windows (although then Mercury would run on my desktop at home, albeit
very slowly).
> runtime/mercury_conf_param.h:
> Use #ifdef instead of just #if when checking for _WIN32.
> Previously this caused Mercury to use `/' as the directory
> separator on Windows when it should have used `\'.
>
Julien.
--------------------------------------------------------------------------
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