File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1+ Restore quoted ``#include `` argument to ``has_function ``.
Original file line number Diff line number Diff line change @@ -860,7 +860,7 @@ def has_function( # noqa: C901
860860 f = os .fdopen (fd , "w" )
861861 try :
862862 for incl in includes :
863- f .write ("""#include %s \n """ % incl )
863+ f .write ("""#include "%s" \n """ % incl )
864864 if not includes :
865865 # Use "char func(void);" as the prototype to follow
866866 # what autoconf does. This prototype does not match
Original file line number Diff line number Diff line change @@ -66,15 +66,15 @@ def test_has_function_prototype():
6666 assert compiler .has_function ('exit' )
6767 with pytest .deprecated_call (match = 'includes is deprecated' ):
6868 # abort() is a valid expression with the <stdlib.h> prototype.
69- assert compiler .has_function ('abort' , includes = ['< stdlib.h> ' ])
69+ assert compiler .has_function ('abort' , includes = ['stdlib.h' ])
7070 with pytest .deprecated_call (match = 'includes is deprecated' ):
7171 # But exit() is not valid with the actual prototype in scope.
72- assert not compiler .has_function ('exit' , includes = ['< stdlib.h> ' ])
72+ assert not compiler .has_function ('exit' , includes = ['stdlib.h' ])
7373 # And setuptools_does_not_exist is not declared or defined at all.
7474 assert not compiler .has_function ('setuptools_does_not_exist' )
7575 with pytest .deprecated_call (match = 'includes is deprecated' ):
7676 assert not compiler .has_function (
77- 'setuptools_does_not_exist' , includes = ['< stdio.h> ' ]
77+ 'setuptools_does_not_exist' , includes = ['stdio.h' ]
7878 )
7979
8080
You can’t perform that action at this time.
0 commit comments