[m-rev.] for review: bootstrap with MSVC as C compiler.
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Nov 8 00:36:48 AEDT 2002
On 07-Nov-2002, Peter Moulder <pmoulder at csse.monash.edu.au> wrote:
> > [code for sleep or Sleep]
> > +#else
> > + /*
> > + ** busy-wait for a few billion cycles, which should hopefully
> > + ** take a second or more.
> > + */
> > + volatile int i;
> > + for (i = 0; i < 100000000; i++)
> > + {}
> > #endif
>
> I'm inclined to think that #error (or at least #warning, though my
> inclination is for #error) is the right thing here. By all means
> leave some example code someone can use as a last resort.
The drawback of #error is that it prevents compilation.
This makes it more difficult for users to port Mercury to new systems.
Generally, when porting Mercury to a new system, worrying about the
vim support in the debugger is not your highest priority, but using
#error here would force it to be your highest priority -- even if
vim itself was not supported on the system that you are trying to port to.
> Rationale for drawing attention: The context of this code is waiting
> for a forked vim process to have started. If fork exists but sleep
> doesn't (according to configure) then there's a good chance that it's
> just an error with the makefiles or configuration process, which the
> user would probably want to fix.
The code in question is not inside #ifdef MR_HAVE_FORK.
It uses system("... &") to invoke the server.
So I do not think it would be a good idea to use #error.
> [various suggestions on how to improve the code for this case]
These suggestions are good suggestions; complete, tested patches which
implement these suggestions would be welcome.
However, quality of the debugging support on systems that don't have sleep()
or _Sleep() is not a major priority, IMHO; developers are likely to
do their development on Linux or Windows and then port to other systems.
--
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