neon 0.29 build broken on Windows

Stefan Kueng tortoisesvn at gmail.com
Sat Sep 26 13:06:55 EDT 2009


On 25.09.2009 13:27, Joe Orton wrote:
> On Sat, Sep 19, 2009 at 05:58:09PM +0200, Stefan Kueng wrote:
>> neon 0.29 doesn't compile on Windows if ipv6 isn't enabled.
>
> Hi Stefan - thanks for the report.
>
>> There are several issues:
>> config.hw.in, line 80:
>> #define socklen_t                       int
>> should be replaced with
>> typedef int socklen_t;
>> since the Win7 SDK has that typedef and with the define, the compiler
>> throws an error in the header about 'int followed by int is illegal'.
>
> OK - if Win7 defines socklen_t could config.hw simply omit that
> altogether with a suitable
>
> #if defined(_MSC_VER)&&  _MSC_VER>= XXXX
>
> then?  If so, what'd be a suitable _MSC_VER value, do you know?

The _MSC_VER indicates the version of the compiler, not the SDK used.
AFAIK there is no define for the SDK version.
Maybe there will be in the near future:
http://blogs.msdn.com/jsacks/archive/2007/09/30/coming-soon-probably-windows-sdk-version-header.aspx

Even though that blog post is two years old, a quick search for the 
header file and a test with the defines showed that it's not done in the 
Win7 SDK yet.

But just using the typedef instead of the define should work on older 
SDKs too.


>> I can work around this problem. But not around the next ones:
>>
>> if neither ipv6 is enabled nor USE_GETADDRINFO is defined, neon won't
>> compile due to the function inet_aton() not being available.
>> If USE_GETADDRINFO is defined, neon compiles with a few warnings but
>> fails to link because inet_pton() isn't found.
>
> Can you try the attached patch?  It should fix both the with-USE_GAI and
> without- case.

It's fixed for with USE_GAI, but not for without it. Without it, I first 
get a compiler warning:
src\ne_cocket.c(1088) : warning C4013: 'inet_aton' undefined; assuming 
extern returning int

and then later a link error because inet_aton couldn't be found.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net



More information about the neon mailing list