curl-library
Re: probs. building libcurl w/gssapi on win32
Date: Wed, 21 May 2008 15:41:56 -0700
On Wed, May 21, 2008 at 05:49:20PM -0400, David Rosenstrauch wrote:
> Dan Fandrich wrote:
>> For these
>> cases, it's probably better to surround those #defines with an #ifdef on
>> the macro itself, i.e.
>>
>> #ifndef HAVE_STDLIB_H
>> #define HAVE_STDLIB_H 1
>> #endif
>>
>> instead of
>>
>> #ifndef HAVE_GSSMIT
>> #define HAVE_STDLIB_H 1
>> #endif
>
>
> Apologies if I'm in error here - my C++ knowledge is weak - but wouldn't
> that not compile? I'm assuming that VC would process curl's
> config-win32.h file first and define HAVE_STDLIB_H, and then later (via
> an include) try to process KFW's win-mac.h file and try to define that
> directive again. Or am I misunderstanding the way VC does preprocessing?
You're absolutely right--I assumed that the GSS header files would be
included first, but of course curl includes its own first. I still don't
get a good feeling about this whole approach, though. If the next GSS
release fixes these namespace pollution problems then the assumption made
by #ifndef HAVE_GSSMIT blocks that macros like HAVE_STDLIB_H will be
defined by GSS will no longer be true and will break curl compiles. The
converse is also true--libcurl's defining its own HAVE_* macros for private
use could (theoretically) cause GSS header compilation problems.
There must be some way to isolate these broken header files. It seems that
the root is that they're required in urldata.h which is included just
about everywhere. If the dependencies could be kept only krb5.c, that
would isolate including these files and any the ugly workarounds to that
location only.
> Sounds good. Do you want to update this, or do I need to generate a new
> patch and resend? (BTW, I've attached KFW's win-mac.h file to reference
> if you want to make sure you choose something that doesn't give a name
> clash.)
I've already checked in a fix for this.
>>> Dan
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2008-05-22