This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: Replace fork with try_fork in testsuite?


Paolo Carlini wrote:
Benjamin Kosnik wrote:


Maybe you want also to have a look to
libstdc++/19781 (talking of try_mkfifo and mkfifo: maybe we can do better)?



We could just test for mkfifo and fork directly as part of configure, and use _GLIBCXXX_HAVE_MKFIFO and _GLIBCXX_HAVE_FORK.


Indeed, something along this way should work. But I don't want to interfere with Mark's plans and, anyway, definitely cannot do the work *right now*...

It's just a detail of how we actually handle the #ifdef-ery. I can add the proper configure magic, if people consider that preferable to the try_mkfifo approach, which is just:


#if defined (_NEWLIB_VERSION) || defined (__MINGW32_VERSION)
    /* Newlib and MinGW32 do not have mkfifo.  */
    exit(0);
#else
    return mkfifo(filename, mode);
#endif

If you want me to add HAVE_{MKFIFO,FORK} let me know, and I'll fix try_mkfifo while I'm at it. This will mean, however, that these defines end up in c++config.h, even though they'll be unused in the library proper.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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