[m-dev.] For review: using alternate installation dirs, round 2

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Jul 25 10:51:57 AEST 1999


On 24-Jul-1999, Warwick Harvey <wharvey at cs.monash.edu.au> wrote:
> Fergus wrote:
> > On 23-Jul-1999, Warwick Harvey <wharvey at cs.monash.edu.au> wrote:
> > > +++ mkinit.c	1999/07/23 02:46:57
> > > @@ -23,6 +23,8 @@
> > >  #include	<string.h>
> > >  #include	<ctype.h>
> > >  #include	<errno.h>
> > > +#include	<unistd.h>
> > > +#include	<sys/stat.h>
> > 
> > Those header files are part of POSIX, but they are not standard ANSI/ISO C,
> > so you should avoid using them if possible.
> > If not, then you really ought to use autoconf to check that they exist,
> > and protect the #include statements with #ifdefs, and do something
> > appropriate in the case when they don't exist.
> 
> Are these files not used in `library/io.m'?  `io__stream_file_size/4' uses 
> `fstat()' to determine the size of a file...  So I figured the approach I'd 
> taken was "safe".
> 
> Of course, if you want to fix io.m, I daresay I'd be happy to apply similar 
> changes to mkinit.  ;-)

Oh, fair enough I suppose.... <grumble> ;-)

The rest of it looks fine, so if you're happy with it then
go ahead and commit it.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- 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