Revert "wafsamba/samba_autoconf: when setting undefined result, use empty tuple"
authorStefan Metzmacher <metze@samba.org>
Mon, 10 Sep 2018 08:22:16 +0000 (10:22 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 10 Sep 2018 17:28:14 +0000 (19:28 +0200)
This reverts commit 95ba6b97441b75f28aef5ec1ee5a9442683f3763.

There was already a better fix under discusion.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
buildtools/wafsamba/samba_autoconf.py

index 6bc34c086f04d66c3eedeb61c3f359af26d8e9e5..6b940e53c00200de2b0f19f11951ae51c6eceafb 100644 (file)
@@ -445,12 +445,8 @@ def CHECK_CODE(conf, code, define,
                      exec_args=exec_args,
                      define_ret=define_ret)
     except Exception:
-        # Even when exception happened, conf.check might have set the define
-        # already to int(ret). We want to undefine it in the case of 'always'.
-        # Otherwise, we'd get defines set to 0 when they should be undefined
-        # and it foils #ifdef check
         if always:
-            conf.undefine(define)
+            conf.DEFINE(define, 0)
         conf.COMPOUND_END(False)
         if mandatory:
             raise