From b4f80a79e1e86a4ac0cba1677239ab2251ac5b64 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sun, 10 Dec 2023 15:33:22 -0800 Subject: Address mwichmann's feedback. Annotate with changed version and remove now obsolete note about function prototype --- SCons/Conftest.py | 3 +++ doc/man/scons.xml | 25 ++++++++++--------------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/SCons/Conftest.py b/SCons/Conftest.py index cd122e7f4..79ede9968 100644 --- a/SCons/Conftest.py +++ b/SCons/Conftest.py @@ -244,6 +244,9 @@ def CheckFunc(context, function_name, header = None, language = None, funcargs = Note that this uses the current value of compiler and linker flags, make sure $CFLAGS, $CPPFLAGS and $LIBS are set correctly. Returns an empty string for success, an error message for failure. + + .. versionchanged:: 4.7.0 + The ``funcargs`` parameter was added. """ # Remarks from autoconf: diff --git a/doc/man/scons.xml b/doc/man/scons.xml index 81a9d0edb..e2e6a57fb 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -3974,11 +3974,6 @@ If omitted, the default stanza will be (with function_name appropriately substituted): - - The optional funcargs can be defined to specify an argument list for the generated - function invocation. - - #ifdef __cplusplus extern "C" @@ -3986,20 +3981,20 @@ extern "C" char function_name(void); + + The optional funcargs can be defined to specify an argument list for the generated + function invocation. + + Note: if header is supplied, -it should not -include the standard header file that declares -function_name, -and it should include a -dummy prototype similar to the default case. -Compilers reject builds where a function call does -not match the declared prototype as happens -if the "real" header is included, -and modern compilers are now rejecting -implicit function declarations. + and the function_name being called takes any parameters, appropriate values for those + function arguments should be supplied + by using the funcargs. +Changed in version 4.7.0: added the funcargs. + Returns a boolean indicating success or failure. -- cgit v1.2.3