Re: FILE_NAME_INFO struct in 'glib/gmessages.c'



Hi John,

John Emmas 於 2017/9/15 下午 08:44 寫道:
I just tried building Glib from git master (non-meson build at the moment).

In 'config.h.win32.in' it looks like the value of _WIN32_WINNT got increased to 0x601.  This means that when building 'glib/gmessages.c' the struct _FILE_NAME_INFO is no longer defined. However... it's still getting referenced in the function 'win32_is_pipe_tty()'

Similarly... HAVE_IF_NAMETOINDEX is defined to '1' in a couple of places - which means that in 'gio/gsocket.c' the function 'if_nametoindex()' is NOT defined.  But again it gets called in a couple of places.  It looks like the Glib definition was maybe intended to support older versions of MSVC (I'm using VC-8).  So does this mean that VC-8 will be getting dropped soon?  Thanks,

The items you mentioned are done as fallbacks as XP did not support these items, hence we mimic them in the code, so yes, the plan is to drop these *XP fallbacks* (but not necessarily *Visual Studio 2005*, at the moment).

It has been brought up on quite a number of occasions (and over quite some time) that XP support should have been dropped, and nowadays Windows 7 is the oldest supported version of Windows by Microsoft, hence the bump of _WIN32_WINNT to 0x0601.  I think it is best to do this kind of bump early on in the cycle to reduce surprises to people.

Are you using the Windows SDK that came with your Visual Studio 2005?  These items that you mentioned are in the Server 2008 (7.0) SDKs, which work with Visual Studio 2005 (and the Windows 7 (7.1) SDKs does work with 2005 as well)--I built GLib-2.54.0 with Meson-generated *config.h files (which also had #define _WIN32_WINNT 0x0601) with Visual C++ 2008 against the Server 2008 and ran the test programs and they work better than builds using the the older *config.h files.  Code-wise, as long as there is no drop of the 2008~2012 projects (or things like a sufficiently C99-compliant compiler is required), 2005 should most probably work (with these later SDKs installed and used).

Hope this clears up things.

With blessings, and cheers!


.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]