Roman Kennke wrote:
> This fixes two little issues that I had when porting the LocalSocketImpl
> to JamaicaVM:
> 
> - It only loads the library dynamically when actually supported by the
> runtime.
> - It includes config.h unconditionally. Actually it doesn't seem to make
> sense to do:
> 
> #if HAVE_CONFIG_H
> #include config.h
> #endif
> 
> since HAVE_CONFIG_H is defined in config.h.
> 

You should leave the #if around the #include (actually, it should be
#ifdef, I think). You'll notice that HAVE_CONFIG_H is defined on the gcc
command line in Classpath; autoconf/autoheader adds that to your
compile-time flags so you know when you can include config.h. If it's
biting you that HAVE_CONFIG_H isn't defined, and you need to include
config.h, you should define it, then ;-)

I think this is "the autoconf way:" you don't #include or use something
unless you have a HAVE_ macro telling you it's OK. I mean, you could
very well just use gcc flags at compile time *instead* of config.h; the
latter just makes it easy to have lots of conditionals. I also think
this is typical GNU practice, so please leave the conditionals in.

Thanks.

Reply via email to