lib/replace: force to unset defines if check has failed
authorAlexander Bokovoy <ab@samba.org>
Thu, 6 Sep 2018 09:07:28 +0000 (09:07 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 8 Sep 2018 06:44:16 +0000 (08:44 +0200)
For HAVE_WORKING_STRPTIME and HAVE_INCOHERENT_MMAP we always want to
have their defines unset as the code is using '#ifdef' rather than just
'#if'. Setting them to 0 means #ifdef will succeed due to a difference
how '#ifdef' and '#if' are working.

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/replace/wscript

index 3d47c37504470e96471ba59dc1bdd750161b5e57..cbb6fd5be0bd9ab93da511157d3bbade5f32484f 100644 (file)
@@ -616,6 +616,7 @@ def configure(conf):
                        define='HAVE_WORKING_STRPTIME',
                        execute=True,
                        addmain=False,
+                       always=True,
                        msg='Checking for working strptime')
 
     conf.CHECK_C_PROTOTYPE('gettimeofday',
@@ -646,7 +647,7 @@ def configure(conf):
     # OpenBSD (and I've heard HPUX) doesn't sync between mmap and write.
     # FIXME: Anything other than a 0 or 1 exit code should abort configure!
     conf.CHECK_CODE('#include "test/incoherent_mmap.c"',
-                    addmain=False, add_headers=False, execute=True,
+                    addmain=False, add_headers=False, execute=True, always=True,
                     define='HAVE_INCOHERENT_MMAP',
                     msg="Checking for HAVE_INCOHERENT_MMAP")