Re: [PATCH/RFC 01/11] mingw: add network-wrappers for daemon
- From
Erik Faye-Lund <kusmabite@googlemail.com>
- Date
- Nov 26, 2009, 10:46 UTC
- Message-ID
- <40aa078e0911260246j47fa36d5t421de7c1d07d5cca@mail.gmail.com>
- In-Reply-To
- <alpine.DEB.2.00.0911261015140.14228@cone.home.martin.st>
On Thu, Nov 26, 2009 at 9:24 AM, Martin Storsjö <martin@martin.st> wrote:
> Hi, > > First of all, great that you're working on adding daemon support for > windows!
Thanks. I meant to send this out a couple of weeks ago, but I wasn't able to find the time until now.
Also, I wouldn't have come this far without going tired of it without Mike's patches, so some credit should go to him for doing good initial work!
Show 20 quoted lines
> On Thu, 26 Nov 2009, Erik Faye-Lund wrote:
>
>> +static void wsa_init(void)
>> {
>> + static int initialized = 0;
>> WSADATA wsa;
>>
>> + if (initialized)
>> + return;
>> +
>> if (WSAStartup(MAKEWORD(2,2), &wsa))
>> die("unable to initialize winsock subsystem, error %d",
>> WSAGetLastError());
>> atexit((void(*)(void)) WSACleanup);
>> + initialized = 1;
>> +}
>
> Something similar to this was merged into master recently as part of my
> mingw/ipv6 patches, so by rebasing your patch on top of that, this patch
> will probably get a bit smaller.Yeah, I saw your patches, and realized that I needed to rebase my work at some point, but none of the repos I usually pull from seems to contain the patches yet. Rebasing will be a requirement before this can be applied for sure.
> > Also, the getaddrinfo-compatibility wrappers perhaps may need some minor > updates to handle the use cases needed for setting up listening sockets.
I expect you're referring to IPv6 support in the wrappers this patch adds? Unfortunately IPv6 isn't something I'm very familiar with, but I'll give it a go unless someone else provides some patches...
-- Erik "kusma" Faye-Lund