Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1a55527

Browse files
committed
Handle msvc intrisincs in check_func.
1 parent bb8440c commit 1a55527

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

numpy/distutils/command/config.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@ def check_func(self, func,
126126
body = []
127127
if decl:
128128
body.append("int %s ();" % func)
129+
# Handle MSVC intrisincs: force MS compiler to make a function call.
130+
# Useful to test for some functions when built with optimization on, to
131+
# avoid build error because the intrisinc and our 'fake' test
132+
# declaration do not match.
133+
body.append("#ifdef _MSC_VER")
134+
body.append("#define function(%s)" % func)
135+
body.append("#endif")
129136
body.append("int main (void) {")
130137
if call:
131138
if call_args is None:

0 commit comments

Comments
 (0)