Skip to content

Commit

Permalink
Fix Cygwin failures
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Apr 8, 2024
1 parent c832f18 commit d1ddaa8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/parsers_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ void test_config_file(const char* config_file)
check_value(a2[6], "m1.v3", "3");
}

#if defined(__CYGWIN__)
extern "C" int putenv (char *__string);
#endif

void test_environment()
{
options_description desc;
Expand All @@ -308,7 +312,7 @@ void test_environment()
("bar", new untyped_value, "")
;

#if (defined(_WIN32) && ! defined(BOOST_BORLANDC) && ! defined(BOOST_EMBTC)) || (defined(__CYGWIN__))
#if defined(_WIN32) && ! defined(BOOST_BORLANDC) && ! defined(BOOST_EMBTC)
_putenv("PO_TEST_FOO=1");
#else
putenv(const_cast<char*>("PO_TEST_FOO=1"));
Expand Down

0 comments on commit d1ddaa8

Please sign in to comment.