From d1ddaa8a0eca167db6669f42ff57f478500ca323 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 8 Apr 2024 01:28:49 +0300 Subject: [PATCH] Fix Cygwin failures --- test/parsers_test.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/parsers_test.cpp b/test/parsers_test.cpp index 8f01731..7eaaaeb 100644 --- a/test/parsers_test.cpp +++ b/test/parsers_test.cpp @@ -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; @@ -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("PO_TEST_FOO=1"));