[Bf-blender-cvs] [3b874ef6fc9] temp-remove-mingw: MinGW: Fix various errors
Aaron Carlisle
noreply at git.blender.org
Tue Apr 25 22:32:02 CEST 2017
Commit: 3b874ef6fc90cc0ffe04a577fabf2f65d5c296e8
Author: Aaron Carlisle
Date: Tue Apr 25 16:31:46 2017 -0400
Branches: temp-remove-mingw
https://developer.blender.org/rB3b874ef6fc90cc0ffe04a577fabf2f65d5c296e8
MinGW: Fix various errors
===================================================================
M build_files/cmake/platform/platform_win32_msvc.cmake
M intern/ghost/intern/GHOST_DisplayManagerWin32.cpp
M intern/ghost/intern/GHOST_SystemWin32.h
M intern/ghost/intern/GHOST_TaskbarWin32.h
M source/blender/blenlib/BLI_winstuff.h
M source/blender/blenlib/intern/storage.c
M source/blender/imbuf/intern/IMB_anim.h
M source/blender/imbuf/intern/anim_movie.c
===================================================================
diff --git a/build_files/cmake/platform/platform_win32_msvc.cmake b/build_files/cmake/platform/platform_win32_msvc.cmake
index b459dc9ba3f..2055b164f6d 100644
--- a/build_files/cmake/platform/platform_win32_msvc.cmake
+++ b/build_files/cmake/platform/platform_win32_msvc.cmake
@@ -472,11 +472,7 @@ if(WITH_SDL)
set(SDL ${LIBDIR}/sdl)
set(SDL_INCLUDE_DIR ${SDL}/include)
set(SDL_LIBPATH ${SDL}/lib)
- if(NOT CMAKE_COMPILER_IS_GNUCC)
- set(SDL_LIBRARY SDL2)
- else()
- set(SDL_LIBRARY SDL)
- endif()
+ set(SDL_LIBRARY SDL2)
endif()
# Audio IO
diff --git a/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp b/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp
index 2dc24e12b34..7b9a897fe57 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp
+++ b/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp
@@ -41,6 +41,7 @@
// We do not support multiple monitors at the moment
#define COMPILE_MULTIMON_STUBS
+#include <multimon.h>
GHOST_DisplayManagerWin32::GHOST_DisplayManagerWin32(void)
diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h
index aa1021c3142..099d14e68ae 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.h
+++ b/intern/ghost/intern/GHOST_SystemWin32.h
@@ -37,6 +37,10 @@
#error WIN32 only!
#endif // WIN32
+/* require Windows XP or newer */
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x501
+
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <ole2.h> // for drag-n-drop
diff --git a/intern/ghost/intern/GHOST_TaskbarWin32.h b/intern/ghost/intern/GHOST_TaskbarWin32.h
index 9489644bc21..0ef71754717 100644
--- a/intern/ghost/intern/GHOST_TaskbarWin32.h
+++ b/intern/ghost/intern/GHOST_TaskbarWin32.h
@@ -8,6 +8,10 @@
#error WIN32 only!
#endif // WIN32
+/* require Windows XP or newer */
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x501
+
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <shlobj.h>
diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h
index 1ad1407da4b..6fbbed01400 100644
--- a/source/blender/blenlib/BLI_winstuff.h
+++ b/source/blender/blenlib/BLI_winstuff.h
@@ -93,6 +93,16 @@ extern "C" {
# define F_OK 0
#endif
+typedef unsigned int mode_t;
+
+/* use functions that take a 64 bit offset for files larger than 4GB */
+#include <stdio.h>
+#define fseek(stream, offset, origin) _fseeki64(stream, offset, origin)
+#define ftell(stream) _ftelli64(stream)
+#define lseek(fd, offset, origin) _lseeki64(fd, offset, origin)
+#define tell(fd) _telli64(fd)
+
+
#ifndef _SSIZE_T_
# define _SSIZE_T_
/* python uses HAVE_SSIZE_T */
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index 4b75e5a8d08..7f66834bf20 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -422,11 +422,14 @@ void BLI_file_free_lines(LinkNode *lines)
bool BLI_file_older(const char *file1, const char *file2)
{
#ifdef WIN32
+ struct _stat st1, st2;
struct _stati64 st1, st2;
UTF16_ENCODE(file1);
UTF16_ENCODE(file2);
+ if (_wstat(file1_16, &st1)) return false;
+ if (_wstat(file2_16, &st2)) return false;
if (_wstati64(file1_16, &st1)) return false;
if (_wstati64(file2_16, &st2)) return false;
diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h
index a565cd068a3..6d7ad7985f9 100644
--- a/source/blender/imbuf/intern/IMB_anim.h
+++ b/source/blender/imbuf/intern/IMB_anim.h
@@ -40,7 +40,7 @@
# include <mmsystem.h>
# include <memory.h>
# include <commdlg.h>
-# include <vfw.h>
+# include <vfw.h>
# undef AVIIF_KEYFRAME // redefined in AVI_avi.h
# undef AVIIF_LIST // redefined in AVI_avi.h
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index 9120c63009d..9806ff006d7 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -37,6 +37,7 @@
#include <mmsystem.h>
#include <memory.h>
#include <commdlg.h>
+#include <vfw.h>
#undef AVIIF_KEYFRAME /* redefined in AVI_avi.h */
#undef AVIIF_LIST /* redefined in AVI_avi.h */
More information about the Bf-blender-cvs
mailing list