Re: C++ and read redefinition

2020-12-25 Thread Bruno Haible
> 2020-12-25 Bruno Haible > > Make it possible to turn off each of the Windows oldnames workarounds. And likewise for 'mkdir'. 2020-12-25 Bruno Haible Make it possible to turn off the mkdir override on Windows. * lib/sys_stat.in.h (mkdir): Conditionalize through GNU

Re: C++ and read redefinition

2020-12-25 Thread Bruno Haible
On 2020-12-06 I committed this: > * lib/fcntl.in.h (creat, open): In C++ mode, when GNULIB_NAMESPACE is > defined: 1. Define a symbol in this namespace. 2. Don't redirect using > a preprocessor #define. > * lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise. > ... The

Re: C++ and read redefinition

2020-12-07 Thread Bruno Haible
Hello Daniel, > I made the changes, and it almost works (at least errors which where > generated before are gone). > But now I get these: > ... Probably you're using a different version of mingw than I do. I'm adding this change. Hope it helps. 2020-12-06 Bruno Haible Tweak the Win

Re: C++ and read redefinition

2020-12-07 Thread Daniel R. Hurtmans
Hello Bruno, Works wonderfully! For the record I'm using x86_64-w64-mingw32-g++ (GCC) 10.2.0 Thanks again, Daniel On 07/12/2020 13:54, Bruno Haible wrote: Hello Daniel, I made the changes, and it almost works (at least errors which where generated before are gone). But now I get these: ...

Re: C++ and read redefinition

2020-12-07 Thread Daniel R. Hurtmans
Hello Bruno, Thanks for your reactivity! I made the changes, and it almost works (at least errors which where generated before are gone). But now I get these: ../lib/stdlib.h: In member function ‘gnulib::_gl_putenv_wrapper::operator gnulib::_gl_putenv_wrapper::type() const’: ../lib/std

Re: C++ and read redefinition

2020-12-06 Thread Bruno Haible
Daniel R. Hurtmans wrote: > undefined reference to `std::basic_ifstream > >::_close()' Oh, so the OpenMP #pragma is not the only problem. It potentially affects all of the symbols that are #defined. I'm committing the attached two patches. The idea is to not use #defines for redirecting functio

Re: C++ and read redefinition

2020-12-05 Thread Daniel R. Hurtmans
Hi, Thanks Bruno for your clarifications and the tentative workaround. Actually it didn't fully work. It certainly helped solving the armadillo #pragma problem but eventually I got a bunch of undefined references or even unresolved functions at link time: undefined reference to `std::basic_i

Re: C++ and read redefinition

2020-12-04 Thread Bruno Haible
Hi, Daniel R. Hurtmans wrote: > 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

C++ and read redefinition

2020-12-03 Thread Daniel R. Hurtmans
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