Re: [PATCH/RFC 01/11] mingw: add network-wrappers for daemon
From: Erik Faye-Lund <hidden>
Date: 2016-06-15 22:47:46
On Thu, Nov 26, 2009 at 9:24 AM, Martin Storsjö [off-list ref] 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!
On Thu, 26 Nov 2009, Erik Faye-Lund wrote:quoted
+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