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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-06-16 02:40:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-06-16 03:03:12 +0300
commit532e29cd76ba006db372f86e9c38c4d312d45fca (patch)
tree1931be1c238ba353e616e33d96a9ea92ce3555b9 /source
parent291152e127e6cc4b605208739522a36c4b03e999 (diff)
Win32: make DIR struct opaque
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenlib/BLI_winstuff.h13
-rw-r--r--source/blender/blenlib/intern/winstuff_dir.c13
2 files changed, 15 insertions, 11 deletions
diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h
index f40359ec3dc..8cf6f188e19 100644
--- a/source/blender/blenlib/BLI_winstuff.h
+++ b/source/blender/blenlib/BLI_winstuff.h
@@ -132,17 +132,8 @@ struct dirent {
char *d_name;
};
-typedef struct _DIR {
- HANDLE handle;
- WIN32_FIND_DATAW data;
- char path[MAX_PATH];
- long dd_loc;
- long dd_size;
- char dd_buf[4096];
- void *dd_direct;
-
- struct dirent direntry;
-} DIR;
+/* intentionally opaque to users */
+typedef struct __dirstream DIR;
DIR *opendir(const char *path);
struct dirent *readdir(DIR *dp);
diff --git a/source/blender/blenlib/intern/winstuff_dir.c b/source/blender/blenlib/intern/winstuff_dir.c
index b20da9ce959..30247f2feb0 100644
--- a/source/blender/blenlib/intern/winstuff_dir.c
+++ b/source/blender/blenlib/intern/winstuff_dir.c
@@ -44,6 +44,19 @@
#include "BLI_utildefines.h"
#include "utfconv.h"
+/* keep local to this file */
+struct __dirstream {
+ HANDLE handle;
+ WIN32_FIND_DATAW data;
+ char path[MAX_PATH];
+ long dd_loc;
+ long dd_size;
+ char dd_buf[4096];
+ void *dd_direct;
+
+ struct dirent direntry;
+};
+
/* 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()