summaryrefslogtreecommitdiff
path: root/engine/SCons/Conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'engine/SCons/Conftest.py')
-rw-r--r--engine/SCons/Conftest.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/engine/SCons/Conftest.py b/engine/SCons/Conftest.py
index abaf00d..1163aa3 100644
--- a/engine/SCons/Conftest.py
+++ b/engine/SCons/Conftest.py
@@ -136,7 +136,7 @@ def CheckBuilder(context, text = None, language = None):
if not text:
text = """
-int main() {
+int main(void) {
return 0;
}
"""
@@ -157,7 +157,7 @@ def CheckCC(context):
"""
context.Display("Checking whether the C compiler works... ")
text = """
-int main()
+int main(void)
{
return 0;
}
@@ -177,7 +177,7 @@ def CheckSHCC(context):
"""
context.Display("Checking whether the (shared) C compiler works... ")
text = """
-int foo()
+int foo(void)
{
return 0;
}
@@ -197,7 +197,7 @@ def CheckCXX(context):
"""
context.Display("Checking whether the C++ compiler works... ")
text = """
-int main()
+int main(void)
{
return 0;
}
@@ -217,7 +217,7 @@ def CheckSHCXX(context):
"""
context.Display("Checking whether the (shared) C++ compiler works... ")
text = """
-int main()
+int main(void)
{
return 0;
}
@@ -290,7 +290,7 @@ char %s();""" % function_name
#include <assert.h>
%(hdr)s
-int main() {
+int main(void) {
#if defined (__stub_%(name)s) || defined (__stub___%(name)s)
fail fail fail
#else
@@ -354,7 +354,7 @@ def CheckHeader(context, header_name, header = None, language = None,
context.Display("Checking for %s header file %s... " % (lang, header_name))
ret = context.CompileProg(text, suffix)
- _YesNoResult(context, ret, "HAVE_" + header_name, text,
+ _YesNoResult(context, ret, "HAVE_" + header_name, text,
"Define to 1 if you have the <%s> header file." % header_name)
return ret
@@ -400,7 +400,7 @@ def CheckType(context, type_name, fallback = None,
%(include)s
%(header)s
-int main() {
+int main(void) {
if ((%(name)s *) 0)
return 0;
if (sizeof (%(name)s))
@@ -439,7 +439,7 @@ def CheckTypeSize(context, type_name, header = None, language = None, expect = N
Returns:
status : int
0 if the check failed, or the found size of the type if the check succeeded."""
-
+
# Include "confdefs.h" first, so that the header can use HAVE_HEADER_H.
if context.headerfilename:
includetext = '#include "%s"' % context.headerfilename
@@ -454,8 +454,8 @@ def CheckTypeSize(context, type_name, header = None, language = None, expect = N
context.Display("Cannot check for %s type: %s\n" % (type_name, msg))
return msg
- src = includetext + header
- if not expect is None:
+ src = includetext + header
+ if expect is not None:
# Only check if the given size is the right one
context.Display('Checking %s is %d bytes... ' % (type_name, expect))
@@ -465,7 +465,7 @@ def CheckTypeSize(context, type_name, header = None, language = None, expect = N
src = src + r"""
typedef %s scons_check_type;
-int main()
+int main(void)
{
static int test_array[1 - 2 * !(((long int) (sizeof(scons_check_type))) == %d)];
test_array[0] = 0;
@@ -477,7 +477,7 @@ int main()
st = context.CompileProg(src % (type_name, expect), suffix)
if not st:
context.Display("yes\n")
- _Have(context, "SIZEOF_%s" % type_name, expect,
+ _Have(context, "SIZEOF_%s" % type_name, expect,
"The size of `%s', as computed by sizeof." % type_name)
return expect
else:
@@ -498,7 +498,7 @@ int main()
src = src + """
#include <stdlib.h>
#include <stdio.h>
-int main() {
+int main(void) {
printf("%d", (int)sizeof(""" + type_name + """));
return 0;
}
@@ -541,7 +541,7 @@ def CheckDeclaration(context, symbol, includes = None, language = None):
Returns:
status : bool
True if the check failed, False if succeeded."""
-
+
# Include "confdefs.h" first, so that the header can use HAVE_HEADER_H.
if context.headerfilename:
includetext = '#include "%s"' % context.headerfilename
@@ -556,11 +556,11 @@ def CheckDeclaration(context, symbol, includes = None, language = None):
context.Display("Cannot check for declaration %s: %s\n" % (symbol, msg))
return msg
- src = includetext + includes
+ src = includetext + includes
context.Display('Checking whether %s is declared... ' % symbol)
src = src + r"""
-int main()
+int main(void)
{
#ifndef %s
(void) %s;
@@ -677,7 +677,7 @@ return 0;
"Define to 1 if you have the `%s' library." % lib_name)
if oldLIBS != -1 and (ret or not autoadd):
context.SetLIBS(oldLIBS)
-
+
if not ret:
return ret
@@ -704,7 +704,7 @@ def CheckProg(context, prog_name):
#
def _YesNoResult(context, ret, key, text, comment = None):
- """
+ r"""
Handle the result of a test with a "yes" or "no" result.
:Parameters:
@@ -723,7 +723,7 @@ def _YesNoResult(context, ret, key, text, comment = None):
def _Have(context, key, have, comment = None):
- """
+ r"""
Store result of a test in context.havedict and context.headerfilename.
:Parameters:
@@ -751,7 +751,7 @@ def _Have(context, key, have, comment = None):
line = "#define %s %d\n" % (key_up, have)
else:
line = "#define %s %s\n" % (key_up, str(have))
-
+
if comment is not None:
lines = "\n/* %s */\n" % comment + line
else: