--- configure- +++ configure @@ -8231,6 +8231,7 @@ $as_echo_n "checking which wxWidgets toolkit was selected... " >&6; } WX_GTKPORT1=$(expr "$WX_SELECTEDCONFIG" : ".*gtk1.*") WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*") + WX_GTKPORT3=$(expr "$WX_SELECTEDCONFIG" : ".*gtk3.*") WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*") WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*") WX_MACPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mac.*") @@ -8244,6 +8245,7 @@ $as_echo_n "checking which wxWidgets toolkit was selected... " >&6; } WX_PORT="unknown" if test "$WX_GTKPORT1" != "0"; then WX_PORT="gtk1"; fi if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi + if test "$WX_GTKPORT3" != "0"; then WX_PORT="gtk3"; fi if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi if test "$WX_MACPORT" != "0"; then WX_PORT="mac"; fi --- src/CFile.cpp- 2015-03-14 16:49:52.286459089 +0000 +++ src/CFile.cpp 2015-03-14 16:50:16.723646206 +0000 @@ -272,7 +272,7 @@ bool CFile::Open(const CPath& fileName, #ifdef __WXMSW__ m_fd = _wopen(m_filePath.GetRaw().c_str(), flags, accessMode); #else - Unicode2CharBuf tmpFileName = filename2char(m_filePath.GetRaw()); + Unicode2CharBuf tmpFileName = filename2char(m_filePath.GetRaw().c_str()); wxASSERT_MSG(tmpFileName, wxT("Convertion failed in CFile::Open")); m_fd = open(tmpFileName, flags, accessMode); #endif --- src/ClientCreditsList.cpp- 2015-03-14 16:53:54.493400852 +0000 +++ src/ClientCreditsList.cpp 2015-03-14 16:54:37.670964007 +0000 @@ -254,7 +254,7 @@ bool CClientCreditsList::CreateKeyPair() privkey.Initialize(rng, RSAKEYSIZE); // Nothing we can do against this filename2char :/ - wxCharBuffer filename = filename2char(theApp->ConfigDir + CRYPTKEY_FILENAME); + wxCharBuffer filename = filename2char((theApp->ConfigDir + CRYPTKEY_FILENAME).c_str()); CryptoPP::FileSink *fileSink = new CryptoPP::FileSink(filename); CryptoPP::Base64Encoder *privkeysink = new CryptoPP::Base64Encoder(fileSink); privkey.DEREncode(*privkeysink); @@ -307,7 +307,7 @@ void CClientCreditsList::InitalizeCrypti } // load private key - CryptoPP::FileSource filesource(filename2char(theApp->ConfigDir + CRYPTKEY_FILENAME), true, new CryptoPP::Base64Decoder); + CryptoPP::FileSource filesource(filename2char((theApp->ConfigDir + CRYPTKEY_FILENAME).c_str()), true, new CryptoPP::Base64Decoder); m_pSignkey = new CryptoPP::RSASSA_PKCS1v15_SHA_Signer(filesource); // calculate and store public key CryptoPP::RSASSA_PKCS1v15_SHA_Verifier pubkey(*static_cast(m_pSignkey)); --- src/DownloadQueue.cpp- 2015-03-14 16:57:04.670071522 +0000 +++ src/DownloadQueue.cpp 2015-03-14 16:57:47.319651839 +0000 @@ -1329,7 +1329,7 @@ void CDownloadQueue::AddToResolve(const if (ip) { OnHostnameResolved(ip); } else { - CAsyncDNS* dns = new CAsyncDNS(pszHostname, DNS_SOURCE, theApp); + CAsyncDNS* dns = new CAsyncDNS(pszHostname.c_str(), DNS_SOURCE, theApp); if ((dns->Create() != wxTHREAD_NO_ERROR) || (dns->Run() != wxTHREAD_NO_ERROR)) { dns->Delete(); @@ -1378,7 +1378,7 @@ void CDownloadQueue::OnHostnameResolved( if (tmpIP) { OnHostnameResolved(tmpIP); } else { - CAsyncDNS* dns = new CAsyncDNS(entry.strHostname, DNS_SOURCE, theApp); + CAsyncDNS* dns = new CAsyncDNS(entry.strHostname.c_str(), DNS_SOURCE, theApp); if ((dns->Create() != wxTHREAD_NO_ERROR) || (dns->Run() != wxTHREAD_NO_ERROR)) { dns->Delete(); --- src/ExternalConnector.cpp- 2015-03-14 16:28:11.599191293 +0000 +++ src/ExternalConnector.cpp 2015-03-14 16:29:53.590746977 +0000 @@ -230,7 +230,7 @@ void CaMuleExternalConnector::OnInitComm void CaMuleExternalConnector::Show(const wxString &s) { if( !m_KeepQuiet ) { - printf("%s", (const char *)unicode2char(s)); + printf("%s", (const char *)unicode2char(s.c_str())); #ifdef __WXMSW__ fflush(stdout); #endif @@ -307,7 +307,7 @@ bool CaMuleExternalConnector::Parse_Comm void CaMuleExternalConnector::GetCommand(const wxString &prompt, char* buffer, size_t buffer_size) { #ifdef HAVE_LIBREADLINE - char *text = readline(unicode2char(prompt + wxT("$ "))); + char *text = readline(unicode2char((prompt + wxT("$ ")).c_str())); if (text && *text && (m_InputLine == 0 || strcmp(text,m_InputLine) != 0)) { add_history (text); @@ -463,7 +463,7 @@ void CaMuleExternalConnector::OnInitCmdL bool CaMuleExternalConnector::OnCmdLineParsed(wxCmdLineParser& parser) { if (parser.Found(wxT("version"))) { - printf("%s %s\n", m_appname, (const char *)unicode2char(GetMuleVersion())); + printf("%s %s\n", m_appname, (const char *)unicode2char(GetMuleVersion().c_str())); return false; } @@ -475,7 +475,7 @@ bool CaMuleExternalConnector::OnCmdLineP if (parser.Found(wxT("create-config-from"), &aMuleConfigFile)) { aMuleConfigFile = FinalizeFilename(aMuleConfigFile); if (!::wxFileExists(aMuleConfigFile)) { - fprintf(stderr, "%s\n", (const char *)unicode2char(wxT("FATAL ERROR: File does not exist: ") + aMuleConfigFile)); + fprintf(stderr, "%s\n", (const char *)unicode2char((wxT("FATAL ERROR: File does not exist: ") + aMuleConfigFile).c_str())); exit(1); } CECFileConfig aMuleConfig(aMuleConfigFile); @@ -572,8 +572,8 @@ bool CaMuleExternalConnector::OnInit() #endif #endif - m_strFullVersion = strdup((const char *)unicode2char(GetMuleVersion())); - m_strOSDescription = strdup((const char *)unicode2char(wxGetOsDescription())); + m_strFullVersion = strdup((const char *)unicode2char(GetMuleVersion().c_str())); + m_strOSDescription = strdup((const char *)unicode2char(wxGetOsDescription().c_str())); // Handle uncaught exceptions InstallMuleExceptionHandler(); --- src/Logger.cpp- 2015-03-14 16:39:00.856271844 +0000 +++ src/Logger.cpp 2015-03-14 17:09:59.550488591 +0000 @@ -259,7 +259,7 @@ void CLogger::DoLine(const wxString & li // write to Stdout if (m_StdoutLog || toStdout) { - printf("%s", (const char*)unicode2char(line)); + printf("%s", (const char*)unicode2char(line.c_str())); } #ifndef AMULE_DAEMON // write to Listcontrol --- src/Logger.h- 2015-03-14 16:39:42.133878766 +0000 +++ src/Logger.h 2015-03-14 17:09:28.388512802 +0000 @@ -325,7 +325,7 @@ class CLoggingEvent : public wxEvent { public: CLoggingEvent(bool critical, bool toStdout, bool toGUI, const wxString& msg) - : wxEvent(-1, MULE_EVT_LOGLINE) + : wxEvent(-1, -1) , m_critical(critical) , m_stdout(toStdout) , m_GUI(toGUI) @@ -366,7 +366,7 @@ typedef void (wxEvtHandler::*MuleLogEven //! Event-handler for completed hashings of new shared files and partfiles. #define EVT_MULE_LOGGING(func) \ - DECLARE_EVENT_TABLE_ENTRY(MULE_EVT_LOGLINE, -1, -1, \ + DECLARE_EVENT_TABLE_ENTRY(-1, -1, -1, \ (wxObjectEventFunction) (wxEventFunction) \ wxStaticCastEvent(MuleLogEventFunction, &func), (wxObject*) NULL), --- src/LoggerConsole.cpp- 2015-03-14 16:31:07.319257360 +0000 +++ src/LoggerConsole.cpp 2015-03-14 16:31:32.917393026 +0000 @@ -62,8 +62,8 @@ void CLogger::AddLogLine( s = "Critical message: "; } printf("%s(%d): %s%s\n", - (const char *)unicode2char(file), - line, s.c_str(), (const char *)unicode2char(str)); + (const char *)unicode2char(file.c_str()), + line, s.c_str(), (const char *)unicode2char(str.c_str())); } @@ -79,7 +79,7 @@ void CLogger::AddLogLine( s = "Critical message: "; } printf("%s(%d): %s%s\n", - (const char *)unicode2char(file), + (const char *)unicode2char(file.c_str()), line, s.c_str(), msg.str().c_str()); } --- src/MD4Hash.h- 2015-03-14 16:20:11.178420888 +0000 +++ src/MD4Hash.h 2015-03-14 16:20:20.688099541 +0000 @@ -200,7 +200,7 @@ public: #ifdef USE_WX_EXTENSIONS bool Decode(const wxString& hash) { - return Decode(std::string(unicode2char(hash))); + return Decode(std::string(unicode2char(hash.c_str()))); } #endif --- src/ObservableQueue.h- 2015-03-14 16:55:31.244181087 +0000 +++ src/ObservableQueue.h 2015-03-14 16:56:26.142353923 +0000 @@ -331,14 +331,14 @@ CObservableQueue::~CObservabl template void CObservableQueue::ObserverAdded( ObserverType* o ) { - NotifyObservers( EventType( EventType::STARTING ), o ); + this->NotifyObservers( EventType( EventType::STARTING ), o ); } template void CObservableQueue::ObserverRemoved( ObserverType* o ) { - NotifyObservers( EventType( EventType::STOPPING ), o ); + this->NotifyObservers( EventType( EventType::STOPPING ), o ); } --- src/OtherFunctions.cpp- 2015-03-14 16:30:16.137985593 +0000 +++ src/OtherFunctions.cpp 2015-03-14 16:30:32.191443508 +0000 @@ -1071,7 +1071,7 @@ wxString DumpMemToStr(const void *buff, */ void DumpMem(const void *buff, int n, const wxString& msg, bool ok) { - printf("%s\n", (const char*)unicode2char(DumpMemToStr( buff, n, msg, ok )) ); + printf("%s\n", (const char*)unicode2char(DumpMemToStr( buff, n, msg, ok ).c_str()) ); } --- src/Proxy.cpp- 2015-03-14 17:10:43.775034802 +0000 +++ src/Proxy.cpp 2015-03-14 17:11:51.940793435 +0000 @@ -650,10 +650,10 @@ void CSocks5StateMachine::process_send_a // Prepare username/password buffer m_buffer[0] = SOCKS5_AUTH_VERSION_USERNAME_PASSWORD; m_buffer[offsetUser-1] = lenUser; - memcpy(m_buffer+offsetUser, unicode2char(m_proxyData.m_userName), + memcpy(m_buffer+offsetUser, unicode2char(m_proxyData.m_userName.c_str()), lenUser); m_buffer[offsetPassword-1] = lenPassword; - memcpy(m_buffer+offsetPassword, unicode2char(m_proxyData.m_password), + memcpy(m_buffer+offsetPassword, unicode2char(m_proxyData.m_password.c_str()), lenPassword); // Send the username/password packet @@ -916,7 +916,7 @@ void CSocks4StateMachine::process_send_c unsigned int offsetUser = 8; unsigned char lenUser = m_proxyData.m_userName.Len(); memcpy(m_buffer + offsetUser, - unicode2char(m_proxyData.m_userName), lenUser); + unicode2char(m_proxyData.m_userName.c_str()), lenUser); m_buffer[offsetUser + lenUser] = 0; // Special processing for SOCKS4a switch (m_proxyData.m_proxyType) { @@ -924,7 +924,7 @@ void CSocks4StateMachine::process_send_c unsigned int offsetDomain = offsetUser + lenUser + 1; unsigned char lenDomain = m_peerAddress->Hostname().Len(); memcpy(m_buffer + offsetDomain, - unicode2char(m_peerAddress->Hostname()), lenDomain); + unicode2char(m_peerAddress->Hostname().c_str()), lenDomain); m_buffer[offsetDomain + lenDomain] = 0; m_packetLenght = 1 + 1 + 2 + 4 + lenUser + 1 + lenDomain + 1; break; @@ -1088,7 +1088,7 @@ void CHttpStateMachine::process_send_com if (m_proxyData.m_enablePassword) { userPass = m_proxyData.m_userName + wxT(":") + m_proxyData.m_password; userPassEncoded = - EncodeBase64(unicode2char(userPass), userPass.Length()); + EncodeBase64(unicode2char(userPass.c_str()), userPass.Length()); } wxString msg; @@ -1116,7 +1116,7 @@ void CHttpStateMachine::process_send_com } // Send the command packet m_packetLenght = msg.Len(); - memcpy(m_buffer, unicode2char(msg), m_packetLenght+1); + memcpy(m_buffer, unicode2char(msg.c_str()), m_packetLenght+1); ProxyWrite(*m_proxyClientSocket, m_buffer, m_packetLenght); } } --- src/SafeFile.cpp- 2015-03-14 16:51:20.087538305 +0000 +++ src/SafeFile.cpp 2015-03-14 16:51:41.242834493 +0000 @@ -324,7 +324,7 @@ void CFileDataIO::WriteString(const wxSt switch (eEncode) { case utf8strRaw: case utf8strOptBOM: { - Unicode2CharBuf s(unicode2UTF8(str)); + Unicode2CharBuf s(unicode2UTF8(str.c_str())); if (s) { WriteStringCore(s, eEncode, SizeLen); break; @@ -332,7 +332,7 @@ void CFileDataIO::WriteString(const wxSt } default: { // Non UTF-8 strings are saved as Latin-1 - wxCharBuffer s1 = wxConvISO8859_1.cWC2MB(str); + wxCharBuffer s1 = wxConvISO8859_1.cWC2MB(str.c_str()); WriteStringCore(s1, utf8strNone, SizeLen); } } --- src/ServerSocket.cpp- 2015-03-14 16:59:24.659411346 +0000 +++ src/ServerSocket.cpp 2015-03-14 16:59:34.700077058 +0000 @@ -631,7 +631,7 @@ void CServerSocket::ConnectToServer(CSer if (cur_server->HasDynIP() || !cur_server->GetIP()) { m_IsSolving = true; // Send it to solving thread. - CAsyncDNS* dns = new CAsyncDNS(server->GetAddress(), DNS_SERVER_CONNECT, theApp, this); + CAsyncDNS* dns = new CAsyncDNS(server->GetAddress().c_str(), DNS_SERVER_CONNECT, theApp, this); if ( dns->Create() == wxTHREAD_NO_ERROR ) { if ( dns->Run() != wxTHREAD_NO_ERROR ) { --- src/ServerUDPSocket.cpp- 2015-03-14 16:59:59.132263616 +0000 +++ src/ServerUDPSocket.cpp 2015-03-14 17:00:08.653946594 +0000 @@ -413,7 +413,7 @@ void CServerUDPSocket::SendQueue() if (update) { if (update->GetLastDNSSolve() + DNS_SOLVE_TIME < ::GetTickCount64()) { // Its time for a new check. - CAsyncDNS* dns = new CAsyncDNS(item.addr, DNS_UDP, theApp, this); + CAsyncDNS* dns = new CAsyncDNS(item.addr.c_str(), DNS_UDP, theApp, this); if ((dns->Create() != wxTHREAD_NO_ERROR) || (dns->Run() != wxTHREAD_NO_ERROR)) { // Not much we can do here, just drop the packet. m_queue.pop_front(); --- src/StateMachine.cpp- 2015-03-14 16:48:09.982861774 +0000 +++ src/StateMachine.cpp 2015-03-14 16:48:17.919597816 +0000 @@ -75,7 +75,7 @@ void CStateMachine::Clock() { m_clocksInCurrentState = 0; printf( "%s(%04d): %d -> %d\n", - (const char *)unicode2char(m_name), + (const char *)unicode2char(m_name.c_str()), m_clockCounter, old_state, m_state); } ++m_clocksInCurrentState; --- src/TextClient.cpp- 2015-03-14 17:14:31.222553473 +0000 +++ src/TextClient.cpp 2015-03-14 17:15:32.554534861 +0000 @@ -141,7 +141,7 @@ bool CamulecmdApp::OnCmdLineParsed(wxCmd if (m_CmdString.Lower().StartsWith(wxT("help"))) { OnInitCommandSet(); - printf("%s %s\n", m_appname, (const char *)unicode2char(GetMuleVersion())); + printf("%s %s\n", m_appname, (const char *)unicode2char(GetMuleVersion().c_str())); Parse_Command(m_CmdString); exit(0); } @@ -194,7 +194,7 @@ int CamulecmdApp::ProcessCommand(int Cmd unsigned int ip[4]; unsigned int port; // Not much we can do against this unicode2char. - int result = sscanf(unicode2char(args), "%d.%d.%d.%d:%d", &ip[0], &ip[1], &ip[2], &ip[3], &port); + int result = sscanf(unicode2char(args.c_str()), "%d.%d.%d.%d:%d", &ip[0], &ip[1], &ip[2], &ip[3], &port); if (result != 5) { // Try to resolve DNS -- good for dynamic IP servers wxString serverName(args.BeforeFirst(wxT(':'))); @@ -204,7 +204,7 @@ int CamulecmdApp::ProcessCommand(int Cmd wxIPV4address a; a.Hostname(serverName); a.Service(port); - result = sscanf(unicode2char(a.IPAddress()), "%d.%d.%d.%d", &ip[0], &ip[1], &ip[2], &ip[3]); + result = sscanf(unicode2char(a.IPAddress().c_str()), "%d.%d.%d.%d", &ip[0], &ip[1], &ip[2], &ip[3]); if (serverName.IsEmpty() || !ok || (result != 4)) { Show(_("Invalid IP format. Use xxx.xxx.xxx.xxx:xxxx\n")); return 0; @@ -548,7 +548,7 @@ int CamulecmdApp::ProcessCommand(int Cmd if (args.ToULong(&id) == true && id < m_Results_map.size()) { SearchFile* file = m_Results_map[id]; - printf("Download File: %lu %s\n", id, (const char*)unicode2char(file->sFileName)); + printf("Download File: %lu %s\n", id, (const char*)unicode2char(file->sFileName.c_str())); request = new CECPacket(EC_OP_DOWNLOAD_SEARCH_RESULT); // get with id the hash and category=0 uint32 category = 0; @@ -613,7 +613,7 @@ void CamulecmdApp::ShowResults(CResultMa mb.Printf(wxT(" %d"), file->lFileSize/1024/1024); kb.Printf(wxT(".%d"), file->lFileSize/1024%1024); output = output.SubString(0, nr_max + name_max + mb_max - mb.Length() ).Append(mb).Append(kb); - printf("%s %ld\n",(const char*)unicode2char(output), file->lSourceCount ); + printf("%s %ld\n",(const char*)unicode2char(output.c_str()), file->lSourceCount ); } } --- src/amule.cpp- 2015-03-14 16:52:34.371066871 +0000 +++ src/amule.cpp 2015-03-14 16:53:11.582828713 +0000 @@ -449,7 +449,7 @@ bool CamuleApp::OnInit() ShowAlert(msg, _("WARNING"), wxCENTRE | wxOK | wxICON_ERROR); fprintf(stderr, "\n--------------------------------------------------\n"); - fprintf(stderr, "%s", (const char*)unicode2UTF8(msg)); + fprintf(stderr, "%s", (const char*)unicode2UTF8(msg.c_str())); fprintf(stderr, "\n--------------------------------------------------\n\n"); } #endif @@ -819,7 +819,7 @@ bool CamuleApp::ReinitializeNetwork(wxSt wxString error_msg; error_msg << e.what(); AddLogLineC(error_msg); - fprintf(stderr, "%s\n", (const char *)unicode2char(error_msg)); + fprintf(stderr, "%s\n", (const char *)unicode2char(error_msg.c_str())); } } #endif @@ -1942,7 +1942,7 @@ void CamuleApp::UDPSocketHandler(wxSocke void CamuleApp::OnUnhandledException() { // Call the generic exception-handler. - fprintf(stderr, "\taMule Version: %s\n", (const char*)unicode2char(GetFullMuleVersion())); + fprintf(stderr, "\taMule Version: %s\n", (const char*)unicode2char(GetFullMuleVersion().c_str())); ::OnUnhandledException(); } --- src/amuleAppCommon.cpp- 2015-03-14 17:06:12.310953965 +0000 +++ src/amuleAppCommon.cpp 2015-03-14 17:06:58.526436315 +0000 @@ -99,7 +99,7 @@ void CamuleAppCommon::AddLinksFromFile() } // Attempt to lock the ED2KLinks file. - CFileLock lock((const char*)unicode2char(fullPath)); + CFileLock lock((const char*)unicode2char(fullPath.c_str())); wxTextFile file(fullPath); if ( file.Open() ) { @@ -214,8 +214,8 @@ bool CamuleAppCommon::InitCommon(int arg theApp->SetAppName(wxT("aMule")); wxString FullMuleVersion = GetFullMuleVersion(); wxString OSDescription = wxGetOsDescription(); - strFullMuleVersion = strdup((const char *)unicode2char(FullMuleVersion)); - strOSDescription = strdup((const char *)unicode2char(OSDescription)); + strFullMuleVersion = strdup((const char *)unicode2char(FullMuleVersion.c_str())); + strOSDescription = strdup((const char *)unicode2char(OSDescription.c_str())); OSType = OSDescription.BeforeFirst( wxT(' ') ); if ( OSType.IsEmpty() ) { OSType = wxT("Unknown"); @@ -279,7 +279,7 @@ bool CamuleAppCommon::InitCommon(int arg if ( cmdline.Found(wxT("version"))) { // This looks silly with logging macros that add a timestamp. - printf("%s\n", (const char*)unicode2char(wxString(CFormat(wxT("%s (OS: %s)")) % FullMuleVersion % OSType))); + printf("%s\n", (const char*)unicode2char(wxString(CFormat(wxT("%s (OS: %s)")) % FullMuleVersion % OSType).c_str())); return false; } --- src/amuled.cpp- 2015-03-14 17:20:34.993583296 +0000 +++ src/amuled.cpp 2015-03-14 17:49:42.263079740 +0000 @@ -70,7 +70,7 @@ #include // Do_not_auto_remove #endif - #include + #include #endif BEGIN_EVENT_TABLE(CamuleDaemonApp, wxAppConsole) @@ -451,11 +451,12 @@ int CDaemonAppTraits::WaitForChild(wxExe if (result == 0) { // Add a WxEndProcessData entry to the map, so that we can // support process termination - wxEndProcessData *endProcData = new wxEndProcessData(); - endProcData->pid = execData.pid; - endProcData->process = execData.process; - endProcData->tag = 0; - endProcDataMap[execData.pid] = endProcData; + //wxEndProcessData *endProcData = new wxEndProcessData(); + //endProcData->pid = execData.pid; + //endProcData->process = execData.process; + //endProcData->tag = 0; + //endProcDataMap[execData.pid] = endProcData; + wxProcess::Kill(execData.pid, wxSIGTERM, wxKILL_CHILDREN); status = execData.pid; } else { @@ -485,23 +486,24 @@ void OnSignalChildHandler(int /*signal*/ pid_t result = AmuleWaitPid(siginfo->si_pid, &status, WNOHANG, &msg); if (result != 1 && result != 0 && (WIFEXITED(status) || WIFSIGNALED(status))) { // Fetch the wxEndProcessData structure corresponding to this pid - EndProcessDataMap::iterator it = endProcDataMap.find(siginfo->si_pid); - if (it != endProcDataMap.end()) { - wxEndProcessData *endProcData = it->second; + // EndProcessDataMap::iterator it = endProcDataMap.find(siginfo->si_pid); + // if (it != endProcDataMap.end()) { + // wxEndProcessData *endProcData = it->second; // Remove this entry from the process map - endProcDataMap.erase(siginfo->si_pid); + // endProcDataMap.erase(siginfo->si_pid); // Save the exit code for the wxProcess object to read later - endProcData->exitcode = result != -1 && WIFEXITED(status) ? - WEXITSTATUS(status) : -1; + // endProcData->exitcode = result != -1 && WIFEXITED(status) ? + // WEXITSTATUS(status) : -1; // Make things work as in wxGUI - wxHandleProcessTermination(endProcData); + // wxHandleProcessTermination(endProcData); // wxHandleProcessTermination() will "delete endProcData;" // So we do not delete it again, ok? Do not uncomment this line. //delete endProcData; - } else { - msg << wxT(" Error: the child process pid is not on the pid map."); - } + //} else { + // msg << wxT(" Error: the child process pid is not on the pid map."); + //} + wxProcess::Kill(siginfo->si_pid, wxSIGTERM, wxKILL_CHILDREN); } // Log our passage here --- src/kademlia/kademlia/Kademlia.cpp- 2015-03-14 17:01:12.139832736 +0000 +++ src/kademlia/kademlia/Kademlia.cpp 2015-03-14 17:01:21.666515515 +0000 @@ -504,7 +504,7 @@ void KadGetKeywordHash(const wxString& r #endif // This should be safe - we assume rstrKeyword is ANSI anyway. - char* ansi_buffer = strdup(unicode2UTF8(rstrKeyword)); + char* ansi_buffer = strdup(unicode2UTF8(rstrKeyword.c_str())); //printf("Kad keyword hash: UTF8 %s\n",ansi_buffer); md4_hasher.CalculateDigest(Output,(const unsigned char*)ansi_buffer,strlen(ansi_buffer)); --- src/libs/common/MD5Sum.cpp- 2015-03-14 16:16:32.100824987 +0000 +++ src/libs/common/MD5Sum.cpp 2015-03-14 16:16:43.769430573 +0000 @@ -55,7 +55,7 @@ MD5Sum::MD5Sum(const uint8* buffer, size wxString MD5Sum::Calculate(const wxString& sSource) { // Nothing we can do against this unicode2char - return Calculate( (const uint8*)(const char*)unicode2char(sSource), sSource.Length()); + return Calculate( (const uint8*)(const char*)unicode2char(sSource.c_str()), sSource.Length()); } wxString MD5Sum::Calculate(const uint8* buffer, size_t len) --- src/libs/common/MuleDebug.cpp- 2015-03-14 16:14:41.753555174 +0000 +++ src/libs/common/MuleDebug.cpp 2015-03-14 16:17:46.435312491 +0000 @@ -92,14 +92,14 @@ void OnUnhandledException() } catch (const std::exception& e) { fprintf(output, "\twhat(): %s\n", e.what()); } catch (const CMuleException& e) { - fprintf(output, "\twhat(): %s\n", (const char*)unicode2char(e.what())); + fprintf(output, "\twhat(): %s\n", (const char*)unicode2char(e.what().c_str())); } catch (const wxString& e) { - fprintf(output, "\twhat(): %s\n", (const char*)unicode2char(e)); + fprintf(output, "\twhat(): %s\n", (const char*)unicode2char(e.c_str())); } catch (...) { // Unable to retrieve cause of exception } - fprintf(output, "\tbacktrace:\n%s\n", (const char*)unicode2char(get_backtrace(1))); + fprintf(output, "\tbacktrace:\n%s\n", (const char*)unicode2char(get_backtrace(1).c_str())); } std::abort(); } --- src/libs/common/Path.cpp- 2015-03-14 16:18:25.475993019 +0000 +++ src/libs/common/Path.cpp 2015-03-14 16:19:13.028385963 +0000 @@ -256,7 +256,7 @@ CPath::CPath(const wxString& filename) return; } - wxCharBuffer fn = filename2char(filename); + wxCharBuffer fn = filename2char(filename.c_str()); if (fn) { // Filename is valid in the current locale. This means that // it either originated from a (wx)system-call, or from a @@ -274,7 +274,7 @@ CPath::CPath(const wxString& filename) m_filesystem = DeepCopy(filename); m_printable = m_filesystem; #else - fn = wxConvUTF8.cWC2MB(filename); + fn = wxConvUTF8.cWC2MB(filename.c_str()); m_filesystem = wxConvFile.cMB2WC(fn); // There's no need to try to unmangle the filename here. @@ -296,7 +296,7 @@ CPath::CPath(const CPath& other) CPath CPath::FromUniv(const wxString& path) { - wxCharBuffer fn = wxConvISO8859_1.cWC2MB(path); + wxCharBuffer fn = wxConvISO8859_1.cWC2MB(path.c_str()); return CPath(wxConvFile.cMB2WC(fn)); @@ -309,7 +309,7 @@ wxString CPath::ToUniv(const CPath& path // as a raw bytestream (which is what ISO8859-1 amounts // to), we can always recreate the on-disk filename, as // if we had read it using wx functions. - wxCharBuffer fn = wxConvFile.cWC2MB(path.m_filesystem); + wxCharBuffer fn = wxConvFile.cWC2MB(path.m_filesystem.c_str()); return wxConvISO8859_1.cMB2WC(fn); } --- src/libs/common/StringFunctions.h- 2015-03-14 16:15:43.936453071 +0000 +++ src/libs/common/StringFunctions.h 2015-03-14 16:16:10.080569319 +0000 @@ -167,7 +167,7 @@ inline size_t GetRawSize(const wxString& case utf8strOptBOM: RealLen = 3; case utf8strRaw: { - Unicode2CharBuf s(unicode2UTF8(rstr)); + Unicode2CharBuf s(unicode2UTF8(rstr.c_str())); if (s) { RealLen += strlen(s); break; @@ -176,7 +176,7 @@ inline size_t GetRawSize(const wxString& } } default: { - Unicode2CharBuf s(unicode2char(rstr)); + Unicode2CharBuf s(unicode2char(rstr.c_str())); if (s) { RealLen = strlen(s); } --- src/libs/common/TextFile.cpp- 2015-03-14 16:19:41.201433888 +0000 +++ src/libs/common/TextFile.cpp 2015-03-14 16:19:49.121166256 +0000 @@ -186,7 +186,7 @@ bool CTextFile::WriteLine(const wxString result = wxTextBuffer::GetEOL() + result; } - wxCharBuffer strBuffer = conv.cWC2MB(result); + wxCharBuffer strBuffer = conv.cWC2MB(result.c_str()); if (strBuffer) { const size_t length = strlen(strBuffer); --- src/libs/ec/cpp/ECTag.cpp- 2015-03-14 16:20:39.214473512 +0000 +++ src/libs/ec/cpp/ECTag.cpp 2015-03-14 16:21:02.735678727 +0000 @@ -157,7 +157,7 @@ CECTag::CECTag(ec_tagname_t name, const */ CECTag::CECTag(ec_tagname_t name, const wxString& data) { - ConstructStringTag(name, (const char*)unicode2UTF8(data)); + ConstructStringTag(name, (const char*)unicode2UTF8(data.c_str())); } CECTag::CECTag(ec_tagname_t name, const wxChar* data) { @@ -689,7 +689,7 @@ void CECTag::SetStringData(const wxStrin { if (IsString()) { delete [] m_tagData; - ConstructStringTag(m_tagName, (const char*)unicode2UTF8(s)); + ConstructStringTag(m_tagName, (const char*)unicode2UTF8(s.c_str())); } } --- src/utils/aLinkCreator/src/ed2khash.cpp- 2015-03-14 16:21:47.058181122 +0000 +++ src/utils/aLinkCreator/src/ed2khash.cpp 2015-03-14 16:21:54.060944514 +0000 @@ -49,7 +49,7 @@ // efe, this can be put in a separete include file, if you want to reuse static wxCSConv aMuleConv(wxS("iso8859-1")); #ifdef wxUSE_UNICODE - #define unicode2char(x) (const char*) aMuleConv.cWX2MB(x) + #define unicode2char(x) (const char*) aMuleConv.cWX2MB(x.c_str()) #define char2unicode(x) aMuleConv.cMB2WX(x) #else #define unicode2char(x) x.c_str() --- src/webserver/src/WebInterface.cpp- 2015-03-14 16:26:46.087079394 +0000 +++ src/webserver/src/WebInterface.cpp 2015-03-14 16:27:42.944159061 +0000 @@ -592,7 +592,7 @@ bool CamulewebApp::OnCmdLineParsed(wxCmd aMuleConfigFile = FinalizeFilename(aMuleConfigFile); if (!::wxFileExists(aMuleConfigFile)) { fprintf(stderr, "FATAL ERROR: file '%s' does not exist.\n", - (const char*)unicode2char(aMuleConfigFile)); + (const char*)unicode2char(aMuleConfigFile.c_str())); return false; } CECFileConfig cfg(aMuleConfigFile); @@ -606,7 +606,7 @@ bool CamulewebApp::OnCmdLineParsed(wxCmd if (!(m_TemplateOk = GetTemplateDir(m_TemplateName, m_TemplateDir))) { // no reason to run webserver without a template fprintf(stderr, "FATAL ERROR: Cannot find template: %s\n", - (const char *)unicode2char(m_TemplateName)); + (const char *)unicode2char(m_TemplateName.c_str())); return false; } return true; @@ -624,7 +624,7 @@ bool CamulewebApp::OnCmdLineParsed(wxCmd if (!(m_TemplateOk = GetTemplateDir(m_TemplateName, m_TemplateDir))) { // no reason to run webserver without a template fprintf(stderr, "FATAL ERROR: Cannot find template: %s\n", - (const char *)unicode2char(m_TemplateName)); + (const char *)unicode2char(m_TemplateName.c_str())); return true; } @@ -803,7 +803,7 @@ wxString CamulewebApp::SetLocale(const w DebugShow(wxT("*** Language set to: ") + lang + wxT(" ***\n")); #ifdef ENABLE_NLS wxString domain = wxT("amuleweb-") + m_TemplateName; - Unicode2CharBuf domainBuf = unicode2char(domain); + Unicode2CharBuf domainBuf = unicode2char(domain.c_str()); const char *c_domain = (const char *)domainBuf; // Try to find a message catalog @@ -835,7 +835,7 @@ wxString CamulewebApp::SetLocale(const w } // If we found something, then use it otherwise it may still be present at the system default location if (!dir.IsEmpty()) { - Unicode2CharBuf buffer = unicode2char(dir); + Unicode2CharBuf buffer = unicode2char(dir.c_str()); const char *c_dir = (const char *)buffer; bindtextdomain(c_domain, c_dir); } --- src/webserver/src/WebServer.cpp- 2015-03-14 16:22:37.473477748 +0000 +++ src/webserver/src/WebServer.cpp 2015-03-14 16:26:16.203088769 +0000 @@ -205,7 +205,7 @@ CParsedUrl::CParsedUrl(const wxString &u void CParsedUrl::ConvertParams(std::map &dst) { for(std::map::iterator i = m_params.begin(); i != m_params.end(); i++) { - std::string key(unicode2char(i->first)), value(unicode2char(i->second)); + std::string key(unicode2char(i->first.c_str())), value(unicode2char(i->second.c_str())); dst[key] = value; } } @@ -341,7 +341,7 @@ void CScriptWebServer::ProcessImgFileReq int img_size = 0; unsigned char* img_data = img->RequestData(img_size); // This unicode2char is ok. - Data.pSocket->SendContent(unicode2char(img->GetHTTP()), img_data, img_size); + Data.pSocket->SendContent(unicode2char(img->GetHTTP().c_str()), img_data, img_size); } else if (!session->m_loggedin) { webInterface->DebugShow(wxT("**** imgrequest: failed, not logged in\n")); ProcessURL(Data); @@ -950,7 +950,7 @@ CFileImage::CFileImage(const wxString& n Realloc(fis.Length()); m_size = fis.Read(m_data,file_size); } else { - printf("CFileImage: file %s have zero length\n", (const char *)unicode2char(m_name)); + printf("CFileImage: file %s have zero length\n", (const char *)unicode2char(m_name.c_str())); } wxString ext = m_name.Right(3).MakeLower(); if ( ext == wxT("css") ) { @@ -959,7 +959,7 @@ CFileImage::CFileImage(const wxString& n SetHttpType(wxT("image/") + ext); } } else { - printf("CFileImage: failed to open %s\n", (const char *)unicode2char(m_name)); + printf("CFileImage: failed to open %s\n", (const char *)unicode2char(m_name.c_str())); } } @@ -1866,25 +1866,25 @@ void CScriptWebServer::ProcessURL(Thread Print(_("Processing request [redirected]: ") + filename + wxT("\n")); session->m_vars["auto_refresh"] = (const char *)unicode2char( - wxString(CFormat(wxT("%d")) % webInterface->m_PageRefresh)); + wxString(CFormat(wxT("%d")) % webInterface->m_PageRefresh).c_str()); session->m_vars["content_type"] = "text/html"; wxString req_file(wxFileName(m_wwwroot, filename).GetFullPath()); if (req_file.EndsWith(wxT(".html"))) { - httpOut = ProcessHtmlRequest(unicode2char(req_file), httpOutLen); + httpOut = ProcessHtmlRequest(unicode2char(req_file.c_str()), httpOutLen); } else if (req_file.EndsWith(wxT(".php"))) { - httpOut = ProcessPhpRequest(unicode2char(req_file), session, httpOutLen); + httpOut = ProcessPhpRequest(unicode2char(req_file.c_str()), session, httpOutLen); } else if (req_file.EndsWith(wxT(".css"))) { session->m_vars["content_type"] = "text/css"; - httpOut = ProcessHtmlRequest(unicode2char(req_file), httpOutLen); + httpOut = ProcessHtmlRequest(unicode2char(req_file.c_str()), httpOutLen); } else if (req_file.EndsWith(wxT(".js"))) { session->m_vars["content_type"] = "text/javascript"; - httpOut = ProcessHtmlRequest(unicode2char(req_file), httpOutLen); + httpOut = ProcessHtmlRequest(unicode2char(req_file.c_str()), httpOutLen); } else if ( req_file.EndsWith(wxT(".dtd")) || req_file.EndsWith(wxT(".xsd")) || req_file.EndsWith(wxT(".xsl"))) { session->m_vars["content_type"] = "text/xml"; - httpOut = ProcessHtmlRequest(unicode2char(req_file), httpOutLen); + httpOut = ProcessHtmlRequest(unicode2char(req_file.c_str()), httpOutLen); } else { httpOut = GetErrorPage("aMuleweb doesn't handle the requested file type ", httpOutLen); } --- src/webserver/src/php_amule_lib.cpp- 2015-03-14 16:32:03.872347846 +0000 +++ src/webserver/src/php_amule_lib.cpp 2015-03-14 16:36:51.305644415 +0000 @@ -232,14 +232,14 @@ void php_get_amule_stats(PHP_VALUE_NODE PHP_VAR_NODE *srv_ip = array_get_by_str_key(result, "serv_addr"); value_value_free(&srv_ip->value); srv_ip->value.type = PHP_VAL_STRING; - srv_ip->value.str_val =strdup(unicode2UTF8(server->GetIPv4Data().StringIP())); + srv_ip->value.str_val =strdup(unicode2UTF8(server->GetIPv4Data().StringIP().c_str())); const CECTag *sname = server->GetTagByName(EC_TAG_SERVER_NAME); if ( sname ) { PHP_VAR_NODE *srv_name = array_get_by_str_key(result, "serv_name"); value_value_free(&srv_name->value); srv_name->value.type = PHP_VAL_STRING; - srv_name->value.str_val = strdup(unicode2UTF8(sname->GetStringData())); + srv_name->value.str_val = strdup(unicode2UTF8(sname->GetStringData().c_str())); } const CECTag *susers = server->GetTagByName(EC_TAG_SERVER_USERS); @@ -306,7 +306,7 @@ void php_get_amule_categories(PHP_VALUE_ PHP_VAR_NODE *cat = array_get_by_int_key(result, i++); value_value_free(&cat->value); cat->value.type = PHP_VAL_STRING; - cat->value.str_val = strdup(unicode2UTF8(categoryTitle->GetStringData())); + cat->value.str_val = strdup(unicode2UTF8(categoryTitle->GetStringData().c_str())); } } else { PHP_VAR_NODE *cat = array_get_by_int_key(result, 0); @@ -411,7 +411,7 @@ void php_get_amule_options(PHP_VALUE_NOD PHP_VAR_NODE *key = array_get_by_str_key(result, "nick"); value_value_free(&key->value); key->value.type = PHP_VAL_STRING; - key->value.str_val = strdup(unicode2UTF8(cattag->GetTagByNameSafe(EC_TAG_USER_NICK)->GetStringData())); + key->value.str_val = strdup(unicode2UTF8(cattag->GetTagByNameSafe(EC_TAG_USER_NICK)->GetStringData().c_str())); } if ((cattag = reply->GetTagByName(EC_TAG_PREFS_CONNECTIONS)) != 0) { @@ -620,7 +620,7 @@ void php_get_log(PHP_VALUE_NODE *result) wxString serverInfoString(_SpecialChars(response->GetFirstTagSafe()->GetStringData())); delete response; result->type = PHP_VAL_STRING; - result->str_val = strdup((const char *)unicode2UTF8(serverInfoString)); + result->str_val = strdup((const char *)unicode2UTF8(serverInfoString.c_str())); } } @@ -650,7 +650,7 @@ void php_get_serverinfo(PHP_VALUE_NODE * wxString serverInfoString(_SpecialChars(response->GetFirstTagSafe()->GetStringData())); delete response; result->type = PHP_VAL_STRING; - result->str_val = strdup((const char *)unicode2UTF8(serverInfoString)); + result->str_val = strdup((const char *)unicode2UTF8(serverInfoString.c_str())); } } @@ -750,7 +750,7 @@ void amule_load_stats() void ecstats2php(CEC_StatTree_Node_Tag *root, PHP_VALUE_NODE *result) { cast_value_array(result); - std::string key(unicode2UTF8(root->GetDisplayString())); + std::string key(unicode2UTF8(root->GetDisplayString().c_str())); PHP_VAR_NODE *v_key = array_get_by_str_key(result, key); for (CECTag::const_iterator it = root->begin(); it != root->end(); it++) { CEC_StatTree_Node_Tag *tag = (CEC_StatTree_Node_Tag*) & *it; @@ -838,20 +838,20 @@ void amule_download_file_prop_get(void * result->type = PHP_VAL_INT; if ( strcmp(prop_name, "name") == 0 ) { result->type = PHP_VAL_STRING; - result->str_val = strdup((const char *)unicode2UTF8(obj->sFileName)); + result->str_val = strdup((const char *)unicode2UTF8(obj->sFileName.c_str())); } else if ( strcmp(prop_name, "short_name") == 0 ) { result->type = PHP_VAL_STRING; wxString short_name(obj->sFileName.Length() > 60 ? (obj->sFileName.Left(60) + (wxT(" ..."))) : obj->sFileName); - result->str_val = strdup((const char *)unicode2UTF8(short_name)); + result->str_val = strdup((const char *)unicode2UTF8(short_name.c_str())); } else if ( strcmp(prop_name, "hash") == 0 ) { result->type = PHP_VAL_STRING; - result->str_val = strdup((const char *)unicode2UTF8(obj->sFileHash)); + result->str_val = strdup((const char *)unicode2UTF8(obj->sFileHash.c_str())); } else if ( strcmp(prop_name, "progress") == 0 ) { result->type = PHP_VAL_STRING; - result->str_val = strdup((const char *)unicode2UTF8(obj->m_Image->GetHTML())); + result->str_val = strdup((const char *)unicode2UTF8(obj->m_Image->GetHTML().c_str())); } else if ( strcmp(prop_name, "link") == 0 ) { result->type = PHP_VAL_STRING; - result->str_val = strdup((const char *)unicode2UTF8(obj->sED2kLink)); + result->str_val = strdup((const char *)unicode2UTF8(obj->sED2kLink.c_str())); } else if ( strcmp(prop_name, "category") == 0 ) { result->int_val = obj->nCat; } else if ( strcmp(prop_name, "status") == 0 ) { @@ -899,7 +899,7 @@ void amule_upload_file_prop_get(void *pt SharedFile::GetContainerInstance()->ReQuery(); sharedfile = SharedFile::GetContainerInstance()->GetByID(obj->nUploadFile); } - result->str_val = strdup(sharedfile ? (const char *)unicode2UTF8(sharedfile->sFileName) : "???"); + result->str_val = strdup(sharedfile ? (const char *)unicode2UTF8(sharedfile->sFileName.c_str()) : "???"); } else if ( strcmp(prop_name, "short_name") == 0 ) { result->type = PHP_VAL_STRING; SharedFile *sharedfile = SharedFile::GetContainerInstance()->GetByID(obj->nUploadFile); @@ -913,10 +913,10 @@ void amule_upload_file_prop_get(void *pt } else { short_name = wxT("???"); } - result->str_val = strdup((const char *)unicode2UTF8(short_name)); + result->str_val = strdup((const char *)unicode2UTF8(short_name.c_str())); } else if ( strcmp(prop_name, "user_name") == 0 ) { result->type = PHP_VAL_STRING; - result->str_val = strdup((const char *)unicode2UTF8(obj->sUserName)); + result->str_val = strdup((const char *)unicode2UTF8(obj->sUserName.c_str())); } else if ( strcmp(prop_name, "xfer_up") == 0 ) { result->int_val = obj->nTransferredUp; } else if ( strcmp(prop_name, "xfer_down") == 0 ) { @@ -937,13 +937,13 @@ void amule_server_prop_get(void *ptr, ch ServerEntry *obj = (ServerEntry *)ptr; if ( strcmp(prop_name, "name") == 0 ) { result->type = PHP_VAL_STRING; - result->str_val = strdup((const char *)unicode2UTF8(obj->sServerName)); + result->str_val = strdup((const char *)unicode2UTF8(obj->sServerName.c_str())); } else if ( strcmp(prop_name, "desc") == 0 ) { result->type = PHP_VAL_STRING; - result->str_val = strdup((const char *)unicode2UTF8(obj->sServerDescription)); + result->str_val = strdup((const char *)unicode2UTF8(obj->sServerDescription.c_str())); } else if ( strcmp(prop_name, "addr") == 0 ) { result->type = PHP_VAL_STRING; - result->str_val = strdup((const char *)unicode2UTF8(obj->sServerIP)); + result->str_val = strdup((const char *)unicode2UTF8(obj->sServerIP.c_str())); } else if ( strcmp(prop_name, "users") == 0 ) { result->type = PHP_VAL_INT; result->int_val = obj->nServerUsers; @@ -973,20 +973,20 @@ void amule_shared_file_prop_get(void *pt SharedFile *obj = (SharedFile *)ptr; if ( strcmp(prop_name, "name") == 0 ) { result->type = PHP_VAL_STRING; - result->str_val = strdup((const char *)unicode2UTF8(obj->sFileName)); + result->str_val = strdup((const char *)unicode2UTF8(obj->sFileName.c_str())); } else if ( strcmp(prop_name, "short_name") == 0 ) { result->type = PHP_VAL_STRING; wxString short_name(obj->sFileName.Length() > 60 ? (obj->sFileName.Left(60) + (wxT(" ..."))) : obj->sFileName); - result->str_val = strdup((const char *)unicode2UTF8(short_name)); + result->str_val = strdup((const char *)unicode2UTF8(short_name.c_str())); } else if ( strcmp(prop_name, "hash") == 0 ) { result->type = PHP_VAL_STRING; - result->str_val = strdup((const char *)unicode2UTF8(obj->sFileHash)); + result->str_val = strdup((const char *)unicode2UTF8(obj->sFileHash.c_str())); } else if ( strcmp(prop_name, "size") == 0 ) { result->type = PHP_VAL_INT; result->int_val = obj->lFileSize; } else if ( strcmp(prop_name, "link") == 0 ) { result->type = PHP_VAL_STRING; - result->str_val = strdup(unicode2UTF8(obj->sED2kLink)); + result->str_val = strdup(unicode2UTF8(obj->sED2kLink.c_str())); } else if ( strcmp(prop_name, "xfer") == 0 ) { result->type = PHP_VAL_INT; result->int_val = obj->nFileTransferred; @@ -1025,14 +1025,14 @@ void amule_search_file_prop_get(void *pt SearchFile *obj = (SearchFile *)ptr; if ( strcmp(prop_name, "name") == 0 ) { result->type = PHP_VAL_STRING; - result->str_val = strdup((const char *)unicode2UTF8(obj->sFileName)); + result->str_val = strdup((const char *)unicode2UTF8(obj->sFileName.c_str())); } else if ( strcmp(prop_name, "short_name") == 0 ) { result->type = PHP_VAL_STRING; wxString short_name(obj->sFileName.Length() > 60 ? (obj->sFileName.Left(60) + (wxT(" ..."))) : obj->sFileName); - result->str_val = strdup((const char *)unicode2UTF8(short_name)); + result->str_val = strdup((const char *)unicode2UTF8(short_name.c_str())); } else if ( strcmp(prop_name, "hash") == 0 ) { result->type = PHP_VAL_STRING; - result->str_val = strdup((const char *)unicode2UTF8(obj->sHash)); + result->str_val = strdup((const char *)unicode2UTF8(obj->sHash.c_str())); } else if ( strcmp(prop_name, "size") == 0 ) { result->type = PHP_VAL_INT; result->int_val = obj->lFileSize; --- src/Scanner.l- 2015-03-15 04:01:56.181566074 +0000 +++ src/Scanner.l 2015-03-15 04:13:02.969374607 +0000 @@ -25,7 +25,7 @@ extern int yyerror(wxString errstr); #define YY_INPUT ReadLexBuff #define YY_FATAL_ERROR FatalLexError -static void ReadLexBuff(char* pcBuff, int& riResult, size_t uMaxSize); +static void ReadLexBuff(char* pcBuff, int riResult, size_t uMaxSize); static void FatalLexError(yyconst char msg[]); static char* _pszLexBuff; @@ -159,7 +159,7 @@ keywordchar [^ \"()] %% -static void ReadLexBuff(char* pcBuff, int& riResult, size_t uMaxSize) +static void ReadLexBuff(char* pcBuff, int riResult, size_t uMaxSize) { wxASSERT( _pszLexBuff != NULL ); @@ -186,7 +186,7 @@ static void FatalLexError(yyconst char m void LexInit(const wxString& pszInput) { - _pszLexStr = strdup(unicode2UTF8(pszInput)); + _pszLexStr = strdup(unicode2UTF8(pszInput.c_str())); _pszLexBuff = _pszLexStr; }