summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-09-17 14:13:57 (GMT)
committerSteven Knight <knight@baldmt.com>2004-09-17 14:13:57 (GMT)
commitf60958ba86ac7d131bdcbce5a40bd820b23ff9dd (patch)
tree3392ab4df5bb1d830751fdca495f7d5619e1d485 /src
parent4b31e93c1ad6509ef1998955673696b121faad40 (diff)
downloadSCons-f60958ba86ac7d131bdcbce5a40bd820b23ff9dd.zip
SCons-f60958ba86ac7d131bdcbce5a40bd820b23ff9dd.tar.gz
SCons-f60958ba86ac7d131bdcbce5a40bd820b23ff9dd.tar.bz2
Fix inconsistency in conf.CheckFunc().
Diffstat (limited to 'src')
-rw-r--r--src/CHANGES.txt4
-rw-r--r--src/engine/SCons/SConf.py4
-rw-r--r--src/engine/SCons/SConfTests.py2
3 files changed, 8 insertions, 2 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 6ee412c..b035acb 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -49,6 +49,10 @@ RELEASE 0.97 - XXX
"{building,cleaning} terminated because of errors" to "done
{building,cleaning} targets (errors occurred during {build,clean})."
+ - Allow Configure.CheckFunc() to take an optional header argument
+ (already supported by Conftest.py) to specify text at the top of
+ the compiled test file.
+
From Elliot Murphy:
- Enhance the tests to guarantee persistence of ListOption
diff --git a/src/engine/SCons/SConf.py b/src/engine/SCons/SConf.py
index 4d6c831..76df30a 100644
--- a/src/engine/SCons/SConf.py
+++ b/src/engine/SCons/SConf.py
@@ -768,8 +768,8 @@ class CheckContext:
#### End of stuff used by Conftest.py.
-def CheckFunc(context, function_name, language = None):
- res = SCons.Conftest.CheckFunc(context, function_name, language = language)
+def CheckFunc(context, function_name, header = None, language = None):
+ res = SCons.Conftest.CheckFunc(context, function_name, header = header, language = language)
context.did_show_result = 1
return not res
diff --git a/src/engine/SCons/SConfTests.py b/src/engine/SCons/SConfTests.py
index 1f6e65c..b704f62 100644
--- a/src/engine/SCons/SConfTests.py
+++ b/src/engine/SCons/SConfTests.py
@@ -475,6 +475,8 @@ int main() {
# CheckFunc()
r = sconf.CheckFunc('strcpy')
assert r, "did not find strcpy"
+ r = sconf.CheckFunc('strcpy', '/* header */ char strcpy();')
+ assert r, "did not find strcpy"
r = sconf.CheckFunc('hopefullynofunction')
assert not r, "unexpectedly found hopefullynofunction"