43 lines
1.2 KiB
Diff
43 lines
1.2 KiB
Diff
--- a/numexpr/msvc_function_stubs.hpp
|
|
+++ b/numexpr/msvc_function_stubs.hpp
|
|
@@ -14,7 +14,7 @@
|
|
definitions in <math.h> are actually #define'd and are not usable
|
|
as function pointers :-/ */
|
|
|
|
-#if _MSC_VER < 1400 // 1310 == MSVC 7.1
|
|
+#if defined(_MSC_VER) && _MSC_VER < 1400 // 1310 == MSVC 7.1
|
|
/* Apparently, single precision functions are not included in MSVC 7.1 */
|
|
|
|
#define sqrtf(x) ((float)sqrt((double)(x)))
|
|
--- a/numexpr/numexpr_config.hpp
|
|
+++ b/numexpr/numexpr_config.hpp
|
|
@@ -27,13 +27,15 @@
|
|
// constant. If numpy raises NPY_MAXARGS, we should notice and raise this as well
|
|
#define NE_MAXARGS 64
|
|
|
|
-#if defined(_WIN32)
|
|
+#if defined(_MSC_VER)
|
|
#include "win32/pthread.h"
|
|
#include <process.h>
|
|
#define getpid _getpid
|
|
#else
|
|
#include <pthread.h>
|
|
#include "unistd.h"
|
|
+ typedef int sigset_t;
|
|
+ static inline int sigfillset(sigset_t *sigs) { return 0; }
|
|
#endif
|
|
|
|
#ifdef USE_VML
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -44,8 +44,7 @@
|
|
# For MSVC only
|
|
if "MSC" in platform.python_compiler():
|
|
extra_cflags = ['/O2']
|
|
- extra_link_args = []
|
|
- sources.append('numexpr/win32/pthread.c')
|
|
+ extra_link_args = ['-pthread']
|
|
else:
|
|
extra_cflags = []
|
|
extra_link_args = []
|