Hello,
I'm using gnulib for quite a long time now to supply missing functions
(eg: get_opt) in some C++ projects. And suddenly everything breaks down.
Apparently read is redefined to _read when compiling for Windows since
this September. I'm cross compiling with x86_64-w64-mingw32.
In some classes I'm defining read, write or open members.
After digging in the archive I found the solution of including
#include <unistd.h> before my class header. Fine.
Now I'm facing another problem... since read is now _read it breaks
pragmas...
Eg using the excellent Armadillo headers library i got this:
...
/usr/x86_64-w64-mingw32/include/armadillo_bits/arma_forward.hpp: In
member function ‘arma::state_type::operator int() const’:
/usr/x86_64-w64-mingw32/include/armadillo_bits/arma_forward.hpp:289:26:
error: expected ‘read’, ‘write’, ‘update’, ‘capture’, ‘seq_cst’,
‘acq_rel’, ‘release’, ‘relaxed’ or ‘hint’ clause
289 | #pragma omp atomic read
...
I'm including <armadillo> after <unistd.h>.
I tried defining GNULIB_NAMESPACE without success.
Any solution would be appreciated? I don't want to be stuck to a
"pre-September" version.
Thanks,
Daniel
--
/----------------------------------------------------------------------\
| Daniel R. Hurtmans http://www.ulb.ac.be/cpm |
| daniel.hurtm...@ulb.ac.be |
| |
| Université Libre de Bruxelles / SQUARES |
| |\ ___,,--, _ |
| /,`--'' \-,,__,'/ 50 Av F.D. Roosevelt CPi 160/09 |
| |,4 ) )_ ) /~-----' B-1050 Bruxelles, BELGIUM |
\-'---^~(_/-_)--(_/_)--------------------------------------------------/