You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
distutils.ccompiler: Make has_function work with more C99 compilers
C99 removed support for implicit function declarations. This means
that just calling a function, without declaring the function first,
can result in a compilation error. Today, has_function works with
most compilers because they issue just a warning, create an object
file, and attempt a link, which then detects available of the symbol
at link time, as intended. With future compilers, compilation will
already fail, and no link test is performed.
The has_function interface provides the caller with a way to supply
a list of header files to include. However, even with today's
compilers, this only works if the function does not expect any
parameters. Otherwise, the function call in the C fragment created
by has_function will not supply the correct argument list and fail
compilation. Therefore, this change supplies and incorrect prototype
without arguments. This is what autoconf does today in a very
similar situation, so it is quite likely that compilers will support
this construct in this context in the future.
The includes and include_dirs arguments are deprecated because of
the parameter list mismatch issue.
Fixes#3648.
0 commit comments