Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-06-02 01:23:17


The program options library now fails a single test on Darwin, with this
output:

../libs/program_options/test/parsers_test.cpp(205): fatal error in
"call_test_main": test p.options.size() == 1 failed

*** 1 failure detected in test case "call_test_main"

The code in question is:

    putenv("PO_TEST_FOO=1");
    parsed_options p = parse_environment(desc, "PO_TEST_");

    BOOST_REQUIRE(p.options.size() == 1);

So, it seems that after "putenv", the string is is not available in the
'environ' variable. The variable is declared like this:

#if defined(__APPLE__) && defined(__DYNAMIC__)
#include <crt_externs.h>
static char** environ = *_NSGetEnviron();
#else
extern char** environ;
#endif

The Darwin-specific conditinal was sent by Michael LaSpina, so I don't know
what it really does, and so don't know why the test fails. I'd appreciate any
suggestions.

Thanks in advance,
Volodya


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk