summaryrefslogtreecommitdiff
path: root/numpy/distutils/command/config.py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-09-21 11:39:08 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-09-21 11:39:08 +0000
commit1a555279787f77ecd8b26b30ad7edb36d73d5374 (patch)
treebb12b3b55843e525f067725167d72e7b3438e8be /numpy/distutils/command/config.py
parentbb8440cc9d9c25d671020dbe5a8e64a69488133c (diff)
downloadnumpy-1a555279787f77ecd8b26b30ad7edb36d73d5374.tar.gz
Handle msvc intrisincs in check_func.
Diffstat (limited to 'numpy/distutils/command/config.py')
-rw-r--r--numpy/distutils/command/config.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/distutils/command/config.py b/numpy/distutils/command/config.py
index bfc3a20e9..b88741e88 100644
--- a/numpy/distutils/command/config.py
+++ b/numpy/distutils/command/config.py
@@ -126,6 +126,13 @@ int main()
body = []
if decl:
body.append("int %s ();" % func)
+ # Handle MSVC intrisincs: force MS compiler to make a function call.
+ # Useful to test for some functions when built with optimization on, to
+ # avoid build error because the intrisinc and our 'fake' test
+ # declaration do not match.
+ body.append("#ifdef _MSC_VER")
+ body.append("#define function(%s)" % func)
+ body.append("#endif")
body.append("int main (void) {")
if call:
if call_args is None: