[Bf-blender-cvs] [53f93ef] master: Fix build issues with mingw's

Antony Riakiotakis noreply at git.blender.org
Wed Jan 15 01:35:21 CET 2014


Commit: 53f93ef66d6821249cedbb38e9a7a714bd361890
Author: Antony Riakiotakis
Date:   Tue Jan 14 23:57:00 2014 +0200
https://developer.blender.org/rB53f93ef66d6821249cedbb38e9a7a714bd361890

Fix build issues with mingw's

===================================================================

M	source/blender/blenlib/BLI_winstuff.h
M	source/blender/blenlib/intern/winstuff_dir.c
M	source/blender/datatoc/datatoc_icon.c

===================================================================

diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h
index 13a946a..1959d51 100644
--- a/source/blender/blenlib/BLI_winstuff.h
+++ b/source/blender/blenlib/BLI_winstuff.h
@@ -127,6 +127,10 @@ typedef long ssize_t;
 #  endif
 #endif
 
+
+#ifdef FREE_WINDOWS
+#include <dirent.h>
+#else
 struct dirent {
 	int d_ino;
 	int d_off;
@@ -146,10 +150,12 @@ typedef struct _DIR {
 	struct dirent direntry;
 } DIR;
 
-void RegisterBlendExtension(void);
 DIR *opendir(const char *path);
 struct dirent *readdir(DIR *dp);
 int closedir(DIR *dp);
+#endif
+
+void RegisterBlendExtension(void);
 void get_default_root(char *root);
 int check_file_chars(char *filename);
 const char *dirname(char *path);
diff --git a/source/blender/blenlib/intern/winstuff_dir.c b/source/blender/blenlib/intern/winstuff_dir.c
index 5cd2baa..4082681 100644
--- a/source/blender/blenlib/intern/winstuff_dir.c
+++ b/source/blender/blenlib/intern/winstuff_dir.c
@@ -25,7 +25,7 @@
  *  \ingroup bli
  */
 
-#ifdef WIN32
+#if defined(WIN32) && !defined(FREE_WINDOWS)
 
 #  ifdef USE_STANDALONE
 #    define MEM_mallocN(size, str) ((void)str, malloc(size))
diff --git a/source/blender/datatoc/datatoc_icon.c b/source/blender/datatoc/datatoc_icon.c
index e4b0038..59c9eeb 100644
--- a/source/blender/datatoc/datatoc_icon.c
+++ b/source/blender/datatoc/datatoc_icon.c
@@ -32,7 +32,7 @@
 #include "../blenlib/BLI_sys_types.h"
 
 /* for DIR */
-#if !defined(WIN32) || defined(__MINGW64__)
+#if !defined(WIN32) || defined(FREEWINDOWS)
 #  include <dirent.h>
 #endif




More information about the Bf-blender-cvs mailing list