This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/56475] Incorrect result of configure test for /dev/random (_GLIBCXX_USE_RANDOM_TR1) for MinGW platform (and others?)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56475

--- Comment #3 from Kai Tietz <ktietz at gcc dot gnu.org> 2013-02-27 19:45:53 UTC ---
(In reply to comment #1)
> We had an AC_TRY_RUN test, but such kind of test give a lot of problems and we
> removed it. We had:
> 
>   AC_TRY_RUN([#include <stdio.h>
>           int main()
>           {
>                 return !(fopen("/dev/random", "r")
>                          && fopen("/dev/urandom", "r"));
>           }          
>          ],
>              [ac_random_tr1=yes], [ac_random_tr1=no],
>          [ac_random_tr1=no])
>   ])
> 
> Kai, can you suggest something working on MinGW and not using an AC_TRY_RUN? Or
> you can just special case MinGW. I have no way of testing such fixes, sorry.

Well, AC_TRY_RUN is for sure the wrong approach here.  As such tests are
failing badly on cross-compilers.
I think sanest way to solve this is by special-casing mingw targets.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]