diff options
author | Andrea Weikert <elubie@gmx.net> | 2008-04-29 22:41:34 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2008-04-29 22:41:34 +0400 |
commit | e7c3ff64584a68e39c7273026b6504e2fa4ced44 (patch) | |
tree | f5c50a47f5711d9de94c8cccccf3fb983bd5354c /source | |
parent | 391bd70d42017c341a841a86da82fa1d06a381e0 (diff) |
== mmap for win32 ==
replacement for mmap/munmap on Windows.
Implemented using CreateFileMapping/MapViewOfFile.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/imbuf/intern/readimage.c | 5 | ||||
-rw-r--r-- | source/blender/makesdna/intern/CMakeLists.txt | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c index 881fddc1bb2..566df53a25e 100644 --- a/source/blender/imbuf/intern/readimage.c +++ b/source/blender/imbuf/intern/readimage.c @@ -31,6 +31,9 @@ #ifdef WIN32 #include <io.h> +#include <stddef.h> +#include <sys/types.h> +#include "mmap_win.h" #endif #include "BLI_blenlib.h" @@ -229,7 +232,7 @@ struct ImBuf *IMB_loadifffile(int file, int flags) { size = BLI_filesize(file); -#if defined(AMIGA) || defined(__BeOS) || defined(WIN32) +#if defined(AMIGA) || defined(__BeOS) mem= (int *)malloc(size); if (mem==0) { printf("Out of mem\n"); diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt index d4b222f3644..a85f561da92 100644 --- a/source/blender/makesdna/intern/CMakeLists.txt +++ b/source/blender/makesdna/intern/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(SRC makesdna.c ../../../../intern/guardedalloc/intern/mallocn.c) +SET(SRC makesdna.c ../../../../intern/guardedalloc/intern/mallocn.c ../../../../intern/guardedalloc/intern/mmap_win.c) INCLUDE_DIRECTORIES(../../../../intern/guardedalloc ..) |