Commit 68c2cfad authored by Povilas Kanapickas's avatar Povilas Kanapickas
Browse files

meson: Make sure defines are either set to 1 or not defined



This will make the behavior of meson consistent with autotools. The
configuration macros are exposed to public headers so any inconsistency
is likely to break code for anyone who's not careful to use #ifdef
instead of #if.
Signed-off-by: Povilas Kanapickas's avatarPovilas Kanapickas <povilas@radix.lt>
parent faff5bbd
This diff is collapsed.
......@@ -19,34 +19,34 @@ srcs_os = [
'log.c',
]
# Wrapper code for missing C library functions
# Wrapper code for missing C library functions. Note that conf_data contains either '1' or false.
srcs_libc = []
if not conf_data.get('HAVE_REALLOCARRAY')
if conf_data.get('HAVE_REALLOCARRAY') == false
srcs_libc += 'reallocarray.c'
endif
if not conf_data.get('HAVE_STRCASECMP')
if conf_data.get('HAVE_STRCASECMP') == false
srcs_libc += 'strcasecmp.c'
endif
if not conf_data.get('HAVE_STRCASESTR')
if conf_data.get('HAVE_STRCASESTR') == false
srcs_libc += 'strcasestr.c'
endif
if not conf_data.get('HAVE_STRLCAT')
if conf_data.get('HAVE_STRLCAT') == false
srcs_libc += 'strlcat.c'
endif
if not conf_data.get('HAVE_STRLCPY')
if conf_data.get('HAVE_STRLCPY') == false
srcs_libc += 'strlcpy.c'
endif
if not conf_data.get('HAVE_STRNDUP')
if conf_data.get('HAVE_STRNDUP') == false
srcs_libc += 'strndup.c'
endif
if not conf_data.get('HAVE_TIMINGSAFE_MEMCMP')
if conf_data.get('HAVE_TIMINGSAFE_MEMCMP') == false
srcs_libc += 'timingsafe_memcmp.c'
endif
if not conf_data.get('HAVE_POLL')
if conf_data.get('HAVE_POLL') == false
srcs_os += 'xserver_poll.c'
endif
if conf_data.get('BUSFAULT')
if conf_data.get('BUSFAULT') != false
srcs_os += 'busfault.c'
endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment