From 6576ec9db70c231c0f3acf719f89a80683688156 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 17 Jul 2018 11:48:13 -0500 Subject: [PATCH] Fix for Windows and VxWorks (setenv is not portable) --- testCa/testCaProvider.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testCa/testCaProvider.cpp b/testCa/testCaProvider.cpp index 5a1664f..200441b 100644 --- a/testCa/testCaProvider.cpp +++ b/testCa/testCaProvider.cpp @@ -23,6 +23,7 @@ #define EXIT_TESTS 0 #include #include + #include #include extern "C" int testIoc_registerRecordDeviceDriver(struct dbBase *pbase); @@ -700,8 +701,8 @@ void TestIoc::start() arch = getenv("EPICS_HOST_ARCH"); if (!arch) testAbort("Environment variable $EPICS_HOST_ARCH not defined"); - setenv("EPICS_CA_ADDR_LIST", "localhost", 1); - setenv("EPICS_CA_AUTO_ADDR_LIST", "NO", 1); + epicsEnvSet("EPICS_CA_ADDR_LIST", "localhost"); + epicsEnvSet("EPICS_CA_AUTO_ADDR_LIST", "NO"); thread = std::auto_ptr(new epicsThread( *this,