diff options
author | Ralf Gommers <ralf.gommers@gmail.com> | 2022-01-23 19:01:22 +0100 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@gmail.com> | 2022-01-23 19:36:35 +0100 |
commit | 0dba00e4c7ba711e858d622b15cab9618b14bd21 (patch) | |
tree | 3e089cfd4ba4259b6d2b196c18238d39ef6b3115 /numpy/array_api/_constants.py | |
parent | 85518d6f34f4bdf1a81eecebf261fa71422197eb (diff) | |
download | numpy-0dba00e4c7ba711e858d622b15cab9618b14bd21.tar.gz |
BUG: fix f2py's define for threading when building with Mingw
Closes https://github.com/rgommers/scipy/issues/125
This is a follow-up of gh-18910 (included in 1.20.3 and 1.21.0), which
looks incorrect.
This fixes warnings like these when building SciPy with Mingw-w64:
```
[94/1557] Compiling C object scipy/linalg/_flapack.cp39-win_amd64.pyd.p/meson-generated_..__flapackmodule.c.obj
In file included from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:4,
from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:12,
from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4,
from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\f2py\src/fortranobject.h:13,
from scipy/linalg/_flapackmodule.c:16:
scipy/linalg/_flapackmodule.c:1248:1: warning: 'thread' attribute directive ignored [-Wattributes]
1248 | static F2PY_THREAD_LOCAL_DECL cb_cselect_in_gees__user__routines_t *_active_cb_cselect_in_gees__user__routines = NULL;
| ^~~~~~
scipy/linalg/_flapackmodule.c:1410:1: warning: 'thread' attribute directive ignored [-Wattributes]
1410 | static F2PY_THREAD_LOCAL_DECL cb_zselect_in_gees__user__routines_t *_active_cb_zselect_in_gees__user__routines = NULL;
| ^~~~~~
scipy/linalg/_flapackmodule.c:1572:1: warning: 'thread' attribute directive ignored [-Wattributes]
1572 | static F2PY_THREAD_LOCAL_DECL cb_sselect_in_gees__user__routines_t *_active_cb_sselect_in_gees__user__routines = NULL;
| ^~~~~~
scipy/linalg/_flapackmodule.c:1738:1: warning: 'thread' attribute directive ignored [-Wattributes]
1738 | static F2PY_THREAD_LOCAL_DECL cb_dselect_in_gees__user__routines_t *_active_cb_dselect_in_gees__user__routines = NULL;
| ^~~~~~
...
```
Also fixes gh-19437, where `__STDC_NO_THREADS__` should be defined but
isn't (this seems to be more common, e.g. one can reports for ICC about
this).
Diffstat (limited to 'numpy/array_api/_constants.py')
0 files changed, 0 insertions, 0 deletions