|From:||Lars Kanis <kanis(at)comcard(dot)de>|
|To:||NISHIYAMA Tomoaki <tomoakin(at)staff(dot)kanazawa-u(dot)ac(dot)jp>|
|Subject:||Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
> Isn't it better to check the value of macros itsef rather than checking for
> system dependent macros that does not directly relate to the issue?
> specifically for getaddrinfo.c case I think
> #if EAI_NODATA != EAI_NONAME
> is a better check than checking for
> #if !defined(__MINGW64_VERSION_MAJOR) && !defined(WIN32_ONLY_COMPILER) /* MSVC/WIN64 duplicate */
Yes it's better and it works for all described test environments.
> For the win32.h, I really don't understand why _WINSOCKAPI_ was defined before
> some google suggests that defining _WINSOCKAPI_ before <windows.h> prevents
> inclusion of winsock.h but that does not have relation to inclusion of
> <winsock2.h> and if <winsock2.h> is included first, it should be ok.
> If this guess is right, perhaps it could be better to remove the three lines.
> #if !defined(WIN64) || defined(WIN32_ONLY_COMPILER)
> #define _WINSOCKAPI_
I only changed this for consistency. For me, it works without that define in all test
> +/* __MINGW64_VERSION_MAJOR is related to both 32/64 bit gcc compiles by
> + * mingw-w64, however it gots defined only after
> Why not use __MINGW32__, which is defined without including any headers?
At least in mingw32 v4.4.4 there is no crtdefs.h. I couldn't find a proper define that relates directly
to that issue, so attached is a somewhat cumbersome MINGW version check.
|Next Message||Alexander Shulgin||2011-11-24 11:32:17||Re: Making TEXT NUL-transparent|
|Previous Message||Florian Weimer||2011-11-24 10:59:09||Re: Making TEXT NUL-transparent|