From d7979dece664f3c31d7cb2f4c3b25501e1ab809a Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Mon, 27 May 2019 10:08:27 +1000 Subject: waf: Update the check_cc tests to a newer method supported by waf. - Fix a minor issue in covoar's use of 64bit calls. --- tester/covoar/CoverageReaderQEMU.cc | 2 +- tester/covoar/wscript | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'tester') 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 + int main() { FILE* f = fopen64("name", "r"); } ''', + cflags = '-Wall', define_name = 'HAVE_OPEN64', + msg = 'Checking for fopen64', mandatory = False) + conf.check_cc(fragment = ''' + #include + 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): -- cgit v1.2.3