Created attachment 58448 [details] [review] Fix compilation with mingw-w64 Avoid duplicated case values to fix compilation with mingw-w64
Am I right in thinking that the reason for this patch is: historically, Unix only had EWHATEVER and Windows only had WSAEWHATEVER, but recent mingw-w64 defines EWHATEVER to be WSAEWHATEVER as well? If that's what you're dealing with here, this change looks like a reasonable way to fix that, although I'd prefer it with "#elif defined(WSAEADDRINUSE)" to avoid the extra level of nesting. Would you mind revising the patch to use #elif, and mention why this change is needed in the commit message? (Some notes on good commit messages: <http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html>; a good example of a commit message in dbus.git: <http://cgit.freedesktop.org/dbus/dbus/commit/?id=a8423067ceac1af6176e14fbc334fe5b82431e3d>)
At least on the 2.x branch of mingw-w64, both ESOMETHING and WSASOMETHING are defined (I was also surprised to see that). I will first double check with mingw-w64's maintainers whether this is intended or a bug.
Created attachment 59068 [details] [review] Fix compilation with mingw-w64 Fixed unneeded nesting and commit message. Mingw maintainers that this double definition is correct from their side. From mingw-w64: ylatuya: hi, I have proposed the following patch for DBUS to fix the compilation with mingw-w64: https://bugs.freedesktop.org/show_bug.cgi?id=47321 ylatuya: it looks like ESOMETHING and WSASOMETHING are both defined in mingw-w64, is that correct? jon_y: ylatuya: yes
(In reply to comment #3) > Mingw maintainers that this double definition is correct from their side. This should be read: Mingw maintainers confirm that
Comment on attachment 59068 [details] [review] Fix compilation with mingw-w64 Review of attachment 59068 [details] [review]: ----------------------------------------------------------------- Looks great, I'll merge it. Thanks!
Fixed in 1.4.20, 1.5.12
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.