Again: FFI syntax
Manuel M. T. Chakravarty
chak at cse.unsw.edu.au
Wed May 30 08:59:37 EDT 2001
"Simon Marlow" <simonmar at microsoft.com> wrote,
> > * But all of these things can be done in a C header file. So all we
> > *need*
> > is the ability to include a single header file, gotten from the
> > current directory
> >
> > foo.h
>
> We don't want to force you to write a wrapper header file in the case
> where it would just contain a single #include and nothing else - just
> cut out the middle man and write the name of the include file you really
> wanted in the first place. But this requires allowing <> style includes
> (I guess - I admit I'm not up on the precise meaning of <> vs "").
No, it does not necessarily require <>. If you write
#include "foo.h"
the C compiler will *also* look in all places where it would
look for
#include <foo.h>
The only case where <> is needed is where there are two
versions of `foo.h'. One where only "foo.h" will find it
and one in the system search path used by <foo.h>. In this
case, "foo.h" and <foo.h> will find different versions.
So, it all boils down to the question of whether this
(probably rare) case justifies the (not very large) extra
complexity of allowing header file names enclosed in <>.
I am happy either way, but slightly tend to the simpler
solution (not allowing <>). Would everybody who prefers to
have <> please say so and briefly say why?
Thanks,
Manuel
More information about the FFI
mailing list