Commit Graph

8 Commits

Author SHA1 Message Date
b1a92f2b3a Fix T44701: Buffer overrun reading directories 2015-06-16 10:04:28 +10:00
532e29cd76 Win32: make DIR struct opaque 2015-06-16 10:03:12 +10:00
4abe548527 cleanup: style 2015-01-02 19:29:00 +11:00
77f357728f D605: Fixes for proper handling of wchar_t paths in MinGW.
* Fixed different not-in-sync #ifdef blocks for struct stat variants under Windows.

Comments have been left to indicate the portions of BLI_fileops.h and
BLI_fileops_types.h that need to stay in sync.

* Added BLI_wstat() to de-duplicate #ifdef blocks for stat() variants on Windows.

* Fix for opendir() and associate functions in MinGW not working properly with
non-ASCII, MBCS-compatible paths.

MinGW (FREE_WINDOWS) has opendir() and _wopendir(), and only the
latter accepts a path name of wchar_t type. Rather than messing up with
extra #ifdef's here and there, Blender's own implementations of opendir()
and related functions are used to properly support paths with non-ASCII,
MBCS-compatible characters.

Tested with MSVC 2013 Express, MinGW32 (gcc 4.6.2) and MinGW-w64 (gcc 4.7.1).


Differential Revision: https://developer.blender.org/D605

Reviewed By: campbellbarton
2014-06-23 10:07:06 +09:00
af93ebcb50 Code Cleanup: style and redundant casts 2014-01-16 19:15:53 +11:00
53f93ef66d Fix build issues with mingw's 2014-01-15 00:33:55 +02:00
875ddfcee0 Added missing include 2014-01-14 22:54:18 +01:00
a9f761708c Fix for icon generation with MSVC
Big thanks to Gaia for getting this working!
2014-01-15 08:40:56 +11:00