On Tue, May 03, 2005 at 05:03:57PM +0100, Angus Leeming wrote:
> Does this work for you? (Everything is, of course, fine here.)

Couldn't you simply 

#define POPEN ::popen
#define POPEN ::_popen
#define POPEN bark

and use 

        FILE * inf = POPEN(cmd.c_str(), os::popen_read_mode());

instead of

        +#if defined (HAVE_POPEN)
                FILE * inf = ::popen(cmd.c_str(), os::popen_read_mode());
        +#elif defined (HAVE__POPEN)
        +       FILE * inf = ::_popen(cmd.c_str(), os::popen_read_mode());
        +#else
        +#error No popen() function.
        +#endif

in the actual code? At least the 'user' code looks nicer that wy imo and
we seem to use macros anyway here.

Andre'

Reply via email to