# HG changeset patch # User Andre Heinecke # Date 1396609322 0 # Node ID f17226aa2e091f476a350d0e23aa1d6dec70d90e # Parent 4033c16beb04e466d59d10d72ed6865b2d9cce8d Temporary build fix for windows. Also Use putenv in test diff -r 4033c16beb04 -r f17226aa2e09 cinst/main.c --- a/cinst/main.c Fri Apr 04 12:20:19 2014 +0200 +++ b/cinst/main.c Fri Apr 04 11:02:02 2014 +0000 @@ -262,7 +262,9 @@ ERRORPRINTF ("Failed to write windows stores retval: %i\n", ret); } #endif +#ifndef WIN32 /* TODO Remove ifdef once it is implemented */ ret = write_stores_nss (NULL, all_valid_certs); +#endif return ret; } @@ -305,8 +307,9 @@ ERRORPRINTF ("Failed to write windows stores retval: %i\n", ret); } #endif +#ifndef WIN32 /* TODO Remove ifdef once it is implemented */ ret = write_stores_nss (to_install, to_remove); - +#endif if (ret != 0) { ERRORPRINTF ("Failed to write nss stores"); diff -r 4033c16beb04 -r f17226aa2e09 ui/tests/cinstprocesstest.cpp --- a/ui/tests/cinstprocesstest.cpp Fri Apr 04 12:20:19 2014 +0200 +++ b/ui/tests/cinstprocesstest.cpp Fri Apr 04 11:02:02 2014 +0000 @@ -8,6 +8,8 @@ #include #include +#include + #define CINST_PATH_CANDIDATES "../../cinst/cinst" << \ "cinst" << "../../cinst/cinst.exe" << "cinst.exe"; @@ -100,7 +102,11 @@ /* Set HOME or APPDATA so that nss stores are not touched * see nsstest for the real test of that code */ #ifdef WIN32 - QVERIFY(!setenv ("APPDATA", fakeHome.path().toLocal8Bit().constData(), 1)); + { + char buf[255]; + snprintf(buf, 255, "APPDATA=%s",fakeHome.path().toLocal8Bit().constData()); + QVERIFY(_putenv (buf) != -1); + } #else QVERIFY(!setenv ("HOME", fakeHome.path().toLocal8Bit().constData(), 1)); #endif