mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 10:14:52 +00:00
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 <povilas@radix.lt>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user