From 1032bc5b7e875d67fe47d51e78e9e75c0eec8e3c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 19 Jun 2020 21:58:41 +0200 Subject: Use strict function checks This makes the function checks work with strict warnings and Werror, but is also stronger because checks will fail if the function prototypes are not as expected (though this is incredibly unlikely since these are all standard functions). --- wscript | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wscript b/wscript index 1eae95d..00bedf1 100644 --- a/wscript +++ b/wscript @@ -106,18 +106,24 @@ def configure(conf): header_name = ['sys/stat.h'], defines = defines, define_name = 'HAVE_LSTAT', + return_type = 'int', + arg_types = 'const char*, struct stat*', mandatory = False) conf.check_function('c', 'flock', header_name = 'sys/file.h', defines = defines, define_name = 'HAVE_FLOCK', + return_type = 'int', + arg_types = 'int, int', mandatory = False) conf.check_function('c', 'fileno', header_name = 'stdio.h', defines = defines, define_name = 'HAVE_FILENO', + return_type = 'int', + arg_types = 'FILE*', mandatory = False) conf.check_function('c', 'clock_gettime', @@ -126,6 +132,8 @@ def configure(conf): define_name = 'HAVE_CLOCK_GETTIME', uselib_store = 'CLOCK_GETTIME', lib = rt_lib, + return_type = 'int', + arg_types = 'clockid_t, struct timespec*', mandatory = False) conf.check_cc(define_name = 'HAVE_LIBDL', -- cgit v1.2.1