mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
meson: We actually support 7+, not Vista+
https://gitlab.gnome.org/GNOME/glib/issues/504#note_225707
This commit is contained in:
parent
545641a8fb
commit
2e5454f892
11
meson.build
11
meson.build
@ -359,7 +359,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
|
||||||
@ -438,8 +438,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)
|
||||||
@ -1375,8 +1378,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')
|
||||||
|
Loading…
Reference in New Issue
Block a user