Summary: | Fixes for build issues using Visual Studio 2008/2010 toolchain | ||
---|---|---|---|
Product: | poppler | Reporter: | Philip Lorenz <lorenzph+freedesktop> |
Component: | general | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | lorenzph+freedesktop |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Windows (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Use Guint rather than uint in FontInfo.cc
Export annotation structs in Qt4 frontend Fixes type cast issues with Visual Studio compiler |
Description
Philip Lorenz
2010-12-18 06:27:28 UTC
Created attachment 41236 [details] [review] Export annotation structs in Qt4 frontend Created attachment 41237 [details] [review] Fixes type cast issues with Visual Studio compiler I'm a little confused of why you need - if (_wstat(fileName2, &buf) == 0) { + if (_wstat((const wchar_t *) fileName2, &buf) == 0) { if fileName2 is already a wchar_t array and thus a const wchar_t * (In reply to comment #3) > I'm a little confused of why you need > - if (_wstat(fileName2, &buf) == 0) { > + if (_wstat((const wchar_t *) fileName2, &buf) == 0) { > if fileName2 is already a wchar_t array and thus a const wchar_t * Ok I must've looked at the wrong line when the compiler notified me about it. I guess the compilation error was caused by the _wstat call in the else branch a couple of lines below. Patch 1 is there from another bug, i've commited patch 2. I'm a bit concerned patch 3 might break mingw builds though (not sure _stat is available there). (In reply to comment #5) > Patch 1 is there from another bug, i've commited patch 2. > > I'm a bit concerned patch 3 might break mingw builds though (not sure _stat is > available there). I have just checked with MinGW 4.4.0 available from Nokia (at ftp://ftp.qt.nokia.com/misc/MinGW-gcc440_1.zip) and it does know about _stat (in sys/stat.h). The same also applies to MinGW 3.4.2 also available from the Qt FTP. Comment on attachment 41237 [details] [review] Fixes type cast issues with Visual Studio compiler What is the reason for changing the use of _wstat() to _stat() in the else statement? (In reply to comment #7) > (From update of attachment 41237 [details] [review]) > What is the reason for changing the use of _wstat() to _stat() in the else > statement? The else branch seems to be the fallback for non-NT based versions of Windows (e.g. Windows 9x, ...) which do not support wide character strings. I don't know why _wstat was used in this branch as, similarly to _wfopen, it is not available on those systems (see the Requirements section in http://msdn.microsoft.com/en-us/library/14h5k7ff%28v=VS.80%29.aspx). (In reply to comment #8) > (In reply to comment #7) > > (From update of attachment 41237 [details] [review] [details]) > > What is the reason for changing the use of _wstat() to _stat() in the else > > statement? > > The else branch seems to be the fallback for non-NT based versions of Windows > (e.g. Windows 9x, ...) which do not support wide character strings. I don't > know why _wstat was used in this branch as, similarly to _wfopen, it is not > available on those systems (see the Requirements section in > http://msdn.microsoft.com/en-us/library/14h5k7ff%28v=VS.80%29.aspx). Ah, I see now, thanks. I think the non-NT based branch was never tested recently then. Using _stat instead of _wstat seems fine for me then. Ok, i've commited all the patches. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.