summaryrefslogtreecommitdiff
path: root/tester
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2019-05-27 10:08:27 +1000
committerChris Johns <chrisj@rtems.org>2019-05-27 10:08:27 +1000
commitd7979dece664f3c31d7cb2f4c3b25501e1ab809a (patch)
treefc62cfdbdaaf8cca1382984863beabf218ab2407 /tester
parent6c79a16e209e9f61904114ad82bac650417508e2 (diff)
waf: Update the check_cc tests to a newer method supported by waf.
- Fix a minor issue in covoar's use of 64bit calls.
Diffstat (limited to 'tester')
-rw-r--r--tester/covoar/CoverageReaderQEMU.cc2
-rw-r--r--tester/covoar/wscript12
2 files changed, 11 insertions, 3 deletions
diff --git a/tester/covoar/CoverageReaderQEMU.cc b/tester/covoar/CoverageReaderQEMU.cc
index 3d3b50f..7c344e4 100644
--- a/tester/covoar/CoverageReaderQEMU.cc
+++ b/tester/covoar/CoverageReaderQEMU.cc
@@ -21,7 +21,7 @@
#include "qemu-traces.h"
-#if HAVE_STAT64
+#if HAVE_OPEN64
#define OPEN fopen64
#else
#define OPEN fopen
diff --git a/tester/covoar/wscript b/tester/covoar/wscript
index 6f722c2..7efa0dd 100644
--- a/tester/covoar/wscript
+++ b/tester/covoar/wscript
@@ -54,8 +54,16 @@ def options(opt):
def configure(conf):
conf.load('compiler_cxx')
- conf.check_cc(function_name='open64', header_name="stdlib.h", mandatory = False)
- conf.check_cc(function_name='stat64', header_name="stdlib.h", mandatory = False)
+ conf.check_cc(fragment = '''
+ #include <stdlib.h>
+ int main() { FILE* f = fopen64("name", "r"); } ''',
+ cflags = '-Wall', define_name = 'HAVE_OPEN64',
+ msg = 'Checking for fopen64', mandatory = False)
+ conf.check_cc(fragment = '''
+ #include <sys/stat.h>
+ int main() { struct stat64 sb; int f = 3; int r = stat64(f, &sb); } ''',
+ cflags = '-Wall', define_name = 'HAVE_STAT64',
+ msg = 'Checking for stat64', mandatory = False)
conf.write_config_header('covoar-config.h')
def build(bld):