Ticket #6597: 6597-backend-win32.patch

File 6597-backend-win32.patch, 2.4 KB (added by Jeff Lu <jll544@…>, 15 years ago)
  • libs/libmyth/mythcontext.cpp

     
    15471547{
    15481548#if defined(CONFIG_DARWIN) || (__FreeBSD__) || defined(__OpenBSD__)
    15491549    const char *command = "ps -ax | grep -i mythbackend | grep -v grep > /dev/null";
     1550#elif defined USING_MINGW
     1551    const char *command = "tasklist | find /i \"mythbackend.exe\" ";
    15501552#else
    15511553    const char *command = "ps -ae | grep mythbackend > /dev/null";
    15521554#endif
  • libs/libmyth/util.cpp

     
    11181118    if (GetTempFileNameA(temppath, "mth", 0, tempfilename))
    11191119    {
    11201120        if (dir)
     1121        {
     1122            // GetTempFileNameA creates the file, so delete it before mkdir
     1123            unlink(tempfilename);
    11211124            ret = mkdir(tempfilename);
     1125        }
    11221126        else
    11231127            ret = open(tempfilename, O_CREAT | O_RDWR, S_IREAD | S_IWRITE);
    11241128    }
  • libs/libmythui/mythsystem.cpp

     
    178178            VERBOSE(VB_IMPORTANT,
    179179                    (LOC_ERR + "WaitForSingleObject() failed because %1")
    180180                    .arg(::GetLastError()));
     181        DWORD exitcode = GENERIC_EXIT_OK;
     182        if (!GetExitCodeProcess(pi.hProcess, &exitcode))
     183            VERBOSE(VB_IMPORTANT, (LOC_ERR +
     184                    "GetExitCodeProcess() failed because %1")
     185                    .arg(::GetLastError()));
    181186        CloseHandle(pi.hProcess);
    182187        CloseHandle(pi.hThread);
    183         return GENERIC_EXIT_OK;
     188        // VERBOSE(VB_IMPORTANT, cmd + QString(" returned %1").arg(exitcode));
     189        return exitcode;
    184190    }
    185191#endif
    186192    return GENERIC_EXIT_NOT_OK;
  • libs/libmythtv/ThreadedFileWriter.cpp

     
    161161    }
    162162    else
    163163    {
     164#ifdef USING_MINGW
     165        _setmode(fd, _O_BINARY);
     166#endif
    164167        buf = new char[TFW_DEF_BUF_SIZE + 1024];
    165168        bzero(buf, TFW_DEF_BUF_SIZE + 64);
    166169