components/desktop/thunderbird/patches/thunderbird-31-gnu-ReadAheadFile.patch
changeset 5255 cea0e462549a
equal deleted inserted replaced
5252:947514442d05 5255:cea0e462549a
       
     1 Patch to fix an issue where the Thunderbird dictionary was not 
       
     2 being read and words were incorrectly showing up as misspelled
       
     3 on Solaris when Thunderbird is built with the GNU compilers. 
       
     4 
       
     5 diff --git a/mozilla/xpcom/glue/FileUtils.cpp b/mozilla/xpcom/glue/FileUtils.cpp
       
     6 --- a/mozilla/xpcom/glue/FileUtils.cpp
       
     7 +++ b/mozilla/xpcom/glue/FileUtils.cpp
       
     8 @@ -481,17 +481,17 @@ mozilla::ReadAheadFile(mozilla::pathstr_
       
     9    }
       
    10    if (fd == INVALID_HANDLE_VALUE) {
       
    11      return;
       
    12    }
       
    13    ReadAhead(fd, aOffset, aCount);
       
    14    if (!aOutFd) {
       
    15      CloseHandle(fd);
       
    16    }
       
    17 -#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
       
    18 +#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX) || defined(SOLARIS)
       
    19    if (!aFilePath) {
       
    20      if (aOutFd) {
       
    21        *aOutFd = -1;
       
    22      }
       
    23      return;
       
    24    }
       
    25    int fd = open(aFilePath, O_RDONLY);
       
    26    if (aOutFd) {