Merge branch 'nirbheek/windows-7-not-vista' into 'master'

meson: We actually support 7+, not Vista+

See merge request GNOME/glib!39
This commit is contained in:
Philip Withnall 2018-05-29 12:25:08 +00:00
commit 6054d11001

View File

@ -363,7 +363,7 @@ add_project_arguments(cc.get_supported_arguments(test_c_args), language: 'c')
# improve this. # improve this.
glib_link_flags = cc.get_supported_link_arguments(test_c_link_args) glib_link_flags = cc.get_supported_link_arguments(test_c_link_args)
# Windows Support (Vista+) # Windows Support (7+)
if host_system == 'windows' if host_system == 'windows'
glib_conf.set('_WIN32_WINNT', '0x0601') glib_conf.set('_WIN32_WINNT', '0x0601')
endif endif
@ -441,8 +441,11 @@ if host_system == 'windows'
iphlpapi_dep = cc.find_library('iphlpapi') iphlpapi_dep = cc.find_library('iphlpapi')
iphlpapi_funcs = ['if_nametoindex', 'if_indextoname'] iphlpapi_funcs = ['if_nametoindex', 'if_indextoname']
foreach ifunc : iphlpapi_funcs foreach ifunc : iphlpapi_funcs
iphl_prefix = '''#define _WIN32_WINNT @0@
#include <winsock2.h>
#include <iphlpapi.h>'''.format(glib_conf.get('_WIN32_WINNT'))
if cc.has_function(ifunc, if cc.has_function(ifunc,
prefix : '#define _WIN32_WINNT 0x0601\n#include <winsock2.h>\n#include <iphlpapi.h>', prefix : iphl_prefix,
dependencies : iphlpapi_dep) dependencies : iphlpapi_dep)
idefine = 'HAVE_' + ifunc.underscorify().to_upper() idefine = 'HAVE_' + ifunc.underscorify().to_upper()
glib_conf.set(idefine, 1) glib_conf.set(idefine, 1)
@ -1378,8 +1381,8 @@ if has_syspoll and has_systypes
#include<sys/types.h>''' #include<sys/types.h>'''
elif has_winsock2 elif has_winsock2
poll_includes = ''' poll_includes = '''
#define _WIN32_WINNT 0x0600 #define _WIN32_WINNT @0@
#include <winsock2.h>''' #include <winsock2.h>'''.format(glib_conf.get('_WIN32_WINNT'))
else else
# FIXME? # FIXME?
error('FIX POLL* defines') error('FIX POLL* defines')