Boost logo

Boost-Build :

From: bill_kempf (williamkempf_at_[hidden])
Date: 2002-03-08 10:07:12


--- In jamboost_at_y..., "David Abrahams" <david.abrahams_at_r...> wrote:
>
> ----- Original Message -----
> From: "bill_kempf" <williamkempf_at_h...>
>
> > > > it's an obsolete header that does nothing but include
<io.h>. So
> > I
> > > > made a local change to pwd.c to include <io.h> instead, and
> > > > everything compiles, though I receive the following warning:
> > > >
> > > > pwd.c(18) : warning C4047: '==' : 'int ' differs in levels of
> > > > indirection from '
> > > > void *'
> >
> > Actually, you don't even need to include <io.h>, so I'm not sure
why
> > the include for <dir.h> was even there.
>
> Actually, there is no <dir.h> in my MSVC installation: the correct
> header for getcwd() on Windows would be <direct.h> according to my
MSDN.
> I don't understand the relationship (if any) to io.h.

Again, the only <dir.h> on my system was a mingw directory that
indicated it was an oboleted header and should be replaced by <io.h>,
then proceeded to do just that. Not knowing why <dir.h> was included
I just replaced it with <io.h>. Then out of curiousity I tried to
figure out why <io.h> was needed and discovered it wasn't. You can
comment out the include and everything compiles with out errors (and
appears to produce a working executable). However, the warning does
occur.

> When I change <dir.h> to <direct.h>, everything compiles with zero
> errors.
> I can't reproduce the warning you were seeing.

I had assumed that <direct.h> was included through some other file
that was already included. That seemed to be the case since the code
did compile. However, adding <direct.h> removes the warning I was
getting, so I'm not entirely sure how/why it compiles with out it.

Bill Kempf

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk