Roxen.git / server / tools / ntroxen / startdll / cmdline.cpp

version» Context lines:

Roxen.git/server/tools/ntroxen/startdll/cmdline.cpp:1030:    type = eArgPike;    return 1;    }       //'--no-threads'|'--without-threads'|'--disable-threads')    // DEFINES="`echo $DEFINES | sed -e 's/-DENABLE_THREADS//g'`"    if (Match(*argv, "--no-threads", NULL, NULL) ||    Match(*argv, "--without-threads", NULL, NULL) ||    Match(*argv, "--disable-threads", NULL, NULL) )    { +  HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);    OutputLine(hOut, "Thread support not optional -- ignoring " + *argv);    type = eArgPike;    return 1;    }       //'--with-profile'|'--profile')    // DEFINES="-DPROFILE $DEFINES"    if (Match(*argv, "--profile", NULL, NULL) ||    Match(*argv, "--with-profile", NULL, NULL) )    {
Roxen.git/server/tools/ntroxen/startdll/cmdline.cpp:1505:    // Make sure that mysql is not running    KillMySql(m_ConfigDir.c_str());       SetEnvironmentVariable("COPYCMD", "/Y");    system("rmdir /Q /S ..\\var\\test_config >NUL:");       std::string setupCmd = m_SelfTestDir + "\\scripts\\setup.pike";    DWORD attr = GetFileAttributes(setupCmd.c_str());    if (attr != -1 && !(attr & FILE_ATTRIBUTE_DIRECTORY))    { -  setupCmd += stracat(" ", m_saPikeDefines.GetList()); +  // NB: Same behavior as stracat(), but I don't trust stracat(). +  // /grubba 2018-04-13 +  char **arr = m_saPikeDefines.GetList(); +  while (*arr) { +  if (strchr(*arr, ' ')) { +  setupCmd += " \"" + *arr + "\""; +  } else { +  setupCmd += " " + *arr; +  } +  arr++; +  }    setupCmd += " " + selfTestDirUnx + " ../var";    CRoxen::RunPike(setupCmd.c_str());    }       }    //OutputLineFmt(hOut, ".BSelfTest argument: %sB.", argv[i]);    break;       case eArgHelp:    // No extra handling here