forked from ariadne/pkgconf
meson: fix detection of strndup() on windows
parent
4fb7683c3e
commit
82d57184e7
1
NEWS
1
NEWS
|
@ -14,6 +14,7 @@ Changes from 1.6.3 to 1.7.0:
|
||||||
- Return the default personality if loading a cross-compile
|
- Return the default personality if loading a cross-compile
|
||||||
personality file failed.
|
personality file failed.
|
||||||
- Do not complain about newlines when validating package versions.
|
- Do not complain about newlines when validating package versions.
|
||||||
|
- Properly detect strndup() on Windows when building with Meson.
|
||||||
|
|
||||||
* Enhancements:
|
* Enhancements:
|
||||||
- A new --shared option and WantDefaultStatic cross-compile
|
- A new --shared option and WantDefaultStatic cross-compile
|
||||||
|
|
10
meson.build
10
meson.build
|
@ -28,14 +28,14 @@ foreach h : check_headers
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
check_functions = [
|
check_functions = [
|
||||||
['HAVE_CYGWIN_CONV_PATH', 'cygwin_conv_path', '#include<sys/cygwin.h>'],
|
['HAVE_CYGWIN_CONV_PATH', 'cygwin_conv_path', 'sys/cygwin.h'],
|
||||||
['HAVE_STRLCAT', 'strlcat', '#include<string.h>'],
|
['HAVE_STRLCAT', 'strlcat', 'string.h'],
|
||||||
['HAVE_STRLCPY', 'strlcpy', '#include<string.h>'],
|
['HAVE_STRLCPY', 'strlcpy', 'string.h'],
|
||||||
['HAVE_STRNDUP', 'strndup', '#include<string.h>'],
|
['HAVE_STRNDUP', 'strndup', 'string.h'],
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach f : check_functions
|
foreach f : check_functions
|
||||||
if cc.has_function(f.get(1), prefix : f.get(2))
|
if cc.has_function(f.get(1), prefix : '#include <' + f.get(2) + '>') and cc.has_header_symbol(f.get(2), f.get(1))
|
||||||
cdata.set(f.get(0), 1)
|
cdata.set(f.get(0), 1)
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
Loading…
Reference in New Issue