Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/intern/winstuff_dir.c')
-rw-r--r--source/blender/blenlib/intern/winstuff_dir.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/winstuff_dir.c b/source/blender/blenlib/intern/winstuff_dir.c
index 90250de1683..3d669a869f9 100644
--- a/source/blender/blenlib/intern/winstuff_dir.c
+++ b/source/blender/blenlib/intern/winstuff_dir.c
@@ -28,7 +28,7 @@
* (opendir, readdir, closedir)
*/
-#if defined(WIN32) && !defined(FREE_WINDOWS)
+#ifdef WIN32
/* standalone for inclusion in binaries other then blender */
# ifdef USE_STANDALONE
@@ -44,6 +44,13 @@
#include "BLI_utildefines.h"
#include "utfconv.h"
+/* Note: 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
+* characters. (kjym3)
+*/
+
DIR *opendir(const char *path)
{
wchar_t *path_16 = alloc_utf16_from_8(path, 0);