Skip to content
  • Jon Turney's avatar
    Fix building client library and upload tools for MinGW · 0f2aae4e
    Jon Turney authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
    This is the rest of https://breakpad.appspot.com/548002/, brought up to date
    
    v2:
    Refine MinGW changes in HTTPUpload::GetFileContents so it closes file after use
    
    v3:
    For consistency, write conditionals in terms of _MSC_VER, not __MINGW32__
    
    v4:
    Use fd rather than FILE * in HTTPUpload::GetFileContents
    
    It appears that constructing a stdio_filebuf from a FILE * does a fflush(0),
    which has been seen to occasionally fail EBADF (on at least W7 x64).
    
    Both of these things seem like they might be bugs
    
    Workaround for the moment by constructing stdio_filebuf from a fd instead.
    
    v5:
    Drop HTTPUpload::GetFileContents() changes as upstream now uses WideTOMBCP()
    Drop changes to avoid stdext::checked_array_iterator, as upstream
    0f2aae4e