On pe, 07 syys 2018, Andrew Bartlett wrote: > The branch, master has been updated > via 4847daf wafsamba/samba_waf18: redefine flex function > via 364077d lib/replace/wscript: fix detection of a fallthrough > attribute for clang > via 311e1eb wafsamba/samba_autoconf: when setting undefined result, > use empty tuple > via 193fdbf s3/wscript: fix flex detection > via e761271 s3/wscript: fix bison detection > from 4a63ab9 s4/selftest/tests: Enabled samba.tests.samba_tool.computer > > https://git.samba.org/?p=samba.git;a=shortlog;h=master While Andrew pushed the current patch set, Metze pointed out that it didn't solve the issue with CONFIG_SET() still reporting undefined defines are set if they were stored in the cache as '0'.
Attached patch should fix the issue. On FreeBSD 11.2 I now have: $ egrep '(HAVE_BSD_STRTOLL|INCOHERENT_MMAP|WORKING_STRPTIME)' bin/default/include/config.h bin/c4che/default_cache.py bin/default/include/config.h:#define HAVE_BSD_STRTOLL 1 bin/default/include/config.h:/* #undef HAVE_WORKING_STRPTIME */ bin/default/include/config.h:/* #undef HAVE_INCOHERENT_MMAP */ bin/c4che/default_cache.py:HAVE_BSD_STRTOLL = 1 bin/c4che/default_cache.py:HAVE_INCOHERENT_MMAP = () bin/c4che/default_cache.py:HAVE_WORKING_STRPTIME = () -- / Alexander Bokovoy
>From 92f2b9b2bac513412169de959285c35a40ea9d07 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy <[email protected]> Date: Fri, 7 Sep 2018 14:34:48 +0000 Subject: [PATCH] buildtools/wafsamba: undefine a define for a failed test unless asked to keep it If conf.CHECK_CODE() is called without `always=True` and the test has failed, undefine the define already set to '0' by conf.check_code(). This restores expectations that undefined symbols are not considered to be set by CONFIG_SET() method. Signed-off-by: Alexander Bokovoy <[email protected]> --- buildtools/wafsamba/samba_autoconf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index 6b940e53c00..ced824d593d 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -447,6 +447,8 @@ def CHECK_CODE(conf, code, define, except Exception: if always: conf.DEFINE(define, 0) + else: + conf.undefine(define) conf.COMPOUND_END(False) if mandatory: raise -- 2.18.0
