cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: probs. building libcurl w/gssapi on win32

From: Yang Tse <yangsita_at_gmail.com>
Date: Thu, 22 May 2008 06:28:27 +0200

2008/5/21, David Rosenstrauch wrote:

> As promised, here's my patch of tweaks required for building libcurl with
> SPNEGO support on Windows Visual C++. Although I initially did this work
> for libcurl 7.15.4, which we're still using here at work, I ported my fixes
> to the latest CVS for the patch I'm sending.
>
> [...]
>
> Any questions/issues, please let me know.

As others have already stated, and you have verified, the problem is
that the GSS MIT headers pollutes namespace on WIN32 builds using
them.

The following is a different approach that would most probably work
even when cross-compiling a WIN32 target.

It seems that the origin of the problem mostly comes from the
inclusion of win-mac.h in GSS headers. So lets go to the origin and
prevent its inclusion by the GSS headers when building libcurl. This
will surely kill too many definitions, but there will only be a bunch
which are actually needed and that could be defined in a libcurl
header.

This can be done with something like the following in libcurl's urldata.h

#ifdef HAVE_GSSAPI
# ifdef HAVE_GSSGNU
# include <gss.h>
# elif defined HAVE_GSSMIT
# ifdef WIN32
# define _KRB5_WIN_MAC_H 1
# include "libcurl_gssmit_win_mac.h"
# endif
# include <gssapi/gssapi.h>
# include <gssapi/gssapi_generic.h>
# else
# include <gssapi.h>
# endif
#endif

You would only need to provide in libcurl_gssmit_win_mac.h or
whichever file name you chose the definitions that are truly needed.
The compiler will help you finding them out.

The trick is to use GSSMIT's win_mac.h when building the GSSMIT libs,
and using libcurl's one when building libcurl.

Could you give this approach a try ?

-- 
-=[Yang]=-
Received on 2008-05-22