[Bf-blender-cvs] [1f13fb4e7de] temp-remove-mingw: MinGW: Remove the use of free windows in /source

Aaron Carlisle noreply at git.blender.org
Mon Apr 24 01:43:14 CEST 2017


Commit: 1f13fb4e7de6c8a5306e6c5ef99adce4cb144dfb
Author: Aaron Carlisle
Date:   Sun Apr 23 18:29:46 2017 -0400
Branches: temp-remove-mingw
https://developer.blender.org/rB1f13fb4e7de6c8a5306e6c5ef99adce4cb144dfb

MinGW: Remove the use of free windows in /source

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

M	source/blender/blenkernel/BKE_global.h
M	source/blender/blenkernel/intern/writeframeserver.c
M	source/blender/blenlib/BLI_alloca.h
M	source/blender/blenlib/BLI_compiler_compat.h
M	source/blender/blenlib/BLI_fileops.h
M	source/blender/blenlib/BLI_fileops_types.h
M	source/blender/blenlib/BLI_sys_types.h
M	source/blender/blenlib/BLI_winstuff.h
M	source/blender/blenlib/intern/fileops.c
M	source/blender/blenlib/intern/path_util.c
M	source/blender/collada/MeshImporter.cpp
M	source/blender/collada/SkinInfo.cpp
M	source/blender/imbuf/intern/IMB_anim.h
M	source/blender/imbuf/intern/anim_movie.c
M	source/blender/imbuf/intern/dds/dds_api.cpp
M	source/blender/imbuf/intern/oiio/openimageio_api.cpp
M	source/blender/imbuf/intern/openexr/openexr_api.cpp
M	source/blender/makesrna/intern/rna_object.c
M	source/blender/python/intern/bpy_app_handlers.c
M	source/blender/python/intern/bpy_rna.c
M	source/gameengine/Expressions/intern/HashedPtr.cpp
M	source/gameengine/Expressions/intern/InputParser.cpp
M	source/gameengine/Ketsji/KX_IPO_SGController.cpp
M	source/gameengine/Ketsji/KX_KetsjiEngine.cpp
M	source/gameengine/VideoTexture/ImageBase.cpp

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

diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index 4bb2b950901..830518906ab 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -189,11 +189,6 @@ enum {
 #  error Either __BIG_ENDIAN__ or __LITTLE_ENDIAN__ must be defined.
 #endif
 
-/* there is really no good place for this */
-#if defined(FREE_WINDOWS) && ((__GNUC__ < 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ < 6)))
-#  error "Mingw requires GCC 4.6 minimum"
-#endif
-
 #define L_ENDIAN    1
 #define B_ENDIAN    0
 
diff --git a/source/blender/blenkernel/intern/writeframeserver.c b/source/blender/blenkernel/intern/writeframeserver.c
index 212af76a7e8..4757186f546 100644
--- a/source/blender/blenkernel/intern/writeframeserver.c
+++ b/source/blender/blenkernel/intern/writeframeserver.c
@@ -268,11 +268,7 @@ int BKE_frameserver_loop(void *context_v, RenderData *rd, ReportList *UNUSED(rep
 	struct timeval tv;
 	struct sockaddr_in addr;
 	int len, rval;
-#ifdef FREE_WINDOWS
-	int socklen;
-#else
 	unsigned int socklen;
-#endif
 	char buf[4096];
 
 	FrameserverContext *context = context_v;
diff --git a/source/blender/blenlib/BLI_alloca.h b/source/blender/blenlib/BLI_alloca.h
index b44e6c66d2a..4fa69a24966 100644
--- a/source/blender/blenlib/BLI_alloca.h
+++ b/source/blender/blenlib/BLI_alloca.h
@@ -29,10 +29,6 @@
 
 /* BLI_array_alloca / alloca */
 
-#if defined(__MINGW32__)
-#  include <malloc.h>  /* mingw needs for alloca() */
-#endif
-
 #if defined(__GNUC__) || defined(__clang__)
 #if defined(__cplusplus) && (__cplusplus > 199711L)
 #define BLI_array_alloca(arr, realsize) \
diff --git a/source/blender/blenlib/BLI_compiler_compat.h b/source/blender/blenlib/BLI_compiler_compat.h
index 8edbc25bcbc..01fc9d70207 100644
--- a/source/blender/blenlib/BLI_compiler_compat.h
+++ b/source/blender/blenlib/BLI_compiler_compat.h
@@ -32,11 +32,6 @@
 #  define alloca _alloca
 #endif
 
-/* alloca is defined here for MinGW32 */
-#ifdef __MINGW32__
-#  include <malloc.h>
-#endif
-
 #if defined(__cplusplus) && ((__cplusplus >= 201103L) || defined(_MSC_VER))
 #  define HAS_CPP11_FEATURES
 #endif
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
index 91d139c7085..5c1fa57886a 100644
--- a/source/blender/blenlib/BLI_fileops.h
+++ b/source/blender/blenlib/BLI_fileops.h
@@ -65,10 +65,8 @@ int    BLI_create_symlink(const char *path, const char *to) ATTR_NONNULL();
 
 /* keep in sync with the definition of struct direntry in BLI_fileops_types.h */
 #ifdef WIN32
-#  if defined(_MSC_VER) || defined(__MINGW64__)
+#  if defined(_MSC_VER)
 typedef struct _stat64 BLI_stat_t;
-#  elif defined(__MINGW32__)
-typedef struct _stati64 BLI_stat_t;
 #  else
 typedef struct _stat BLI_stat_t;
 #  endif
diff --git a/source/blender/blenlib/BLI_fileops_types.h b/source/blender/blenlib/BLI_fileops_types.h
index 0cf8c8ddb4a..0ffa3276f1f 100644
--- a/source/blender/blenlib/BLI_fileops_types.h
+++ b/source/blender/blenlib/BLI_fileops_types.h
@@ -35,7 +35,7 @@
 
 #include <sys/stat.h>
 
-#if defined(WIN32) && !defined(FREE_WINDOWS)
+#if defined(WIN32)
 typedef unsigned int mode_t;
 #endif
 
@@ -50,10 +50,8 @@ struct direntry {
 	const char   *relname;
 	const char   *path;
 #ifdef WIN32 /* keep in sync with the definition of BLI_stat_t in BLI_fileops.h */
-#  if defined(_MSC_VER) || defined(__MINGW64__)
+#  if defined(_MSC_VER)
 	struct _stat64 s;
-#  elif defined(__MINGW32__)
-	struct _stati64 s;
 #  else
 	struct _stat s;
 #  endif
diff --git a/source/blender/blenlib/BLI_sys_types.h b/source/blender/blenlib/BLI_sys_types.h
index 9d8222c575d..2ffca5dd578 100644
--- a/source/blender/blenlib/BLI_sys_types.h
+++ b/source/blender/blenlib/BLI_sys_types.h
@@ -65,12 +65,6 @@ typedef uint64_t u_int64_t;
 
 #include <inttypes.h>
 
-/* MinGW and MSVC >= 2010 */
-#elif defined(FREE_WINDOWS) || defined(_MSC_VER)
-#include <stdint.h>
-
-#else
-
 /* FreeBSD, Solaris */
 #include <sys/types.h>
 #include <stdint.h>
diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h
index b421b7dbb90..c4145c81721 100644
--- a/source/blender/blenlib/BLI_winstuff.h
+++ b/source/blender/blenlib/BLI_winstuff.h
@@ -37,11 +37,6 @@
 #  error "This include is for Windows only!"
 #endif
 
-#ifdef FREE_WINDOWS
-#  ifdef WINVER
-#    undef WINVER
-#  endif
-
 /* Some stuff requires WINVER 0x500, but mingw's default is 0x400 */
 #  define WINVER 0x0501
 #endif
@@ -94,7 +89,7 @@ extern "C" {
 #  define snprintf _snprintf
 #endif
 
-#if defined(_MSC_VER) || (defined(FREE_WINDOWS) && !defined(FREE_WINDOWS64))
+#if defined(_MSC_VER)
 #  define	R_OK	4
 #  define	W_OK	2
 // not accepted by access() on windows
@@ -102,30 +97,16 @@ extern "C" {
 #  define	F_OK	0
 #endif
 
-#ifndef FREE_WINDOWS
-typedef unsigned int mode_t;
-#endif
-
-/* use functions that take a 64 bit offset for files larger than 4GB */
-#ifndef FREE_WINDOWS
-#  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)
-#endif
-
+#if 0 /*Is this used (blendify)*/
 /* mingw using _SSIZE_T_ to declare ssize_t type */
 #ifndef _SSIZE_T_
 #  define _SSIZE_T_
 /* python uses HAVE_SSIZE_T */
 #  ifndef HAVE_SSIZE_T
 #    define HAVE_SSIZE_T 1
-#    ifndef FREE_WINDOWS64
-typedef long ssize_t;
-#    endif
 #  endif
 #endif
+#endif /*if 0*/
 
 struct dirent {
 	int d_ino;
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index db4b3bcf20c..3d953aeaad0 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -265,7 +265,7 @@ void *BLI_gzopen(const char *filename, const char *mode)
 
 	/* temporary #if until we update all libraries to 1.2.7
 	 * for correct wide char path handling */
-#if ZLIB_VERNUM >= 0x1270 && !defined(FREE_WINDOWS)
+#if ZLIB_VERNUM >= 0x1270
 	UTF16_ENCODE(filename);
 
 	gzfile = gzopen_w(filename_16, mode);
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 40b6aaa18c1..4b3a74d02ae 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1173,22 +1173,10 @@ bool BLI_path_program_search(
 void BLI_setenv(const char *env, const char *val)
 {
 	/* free windows */
-#if (defined(WIN32) || defined(WIN64)) && defined(FREE_WINDOWS)
-	char *envstr;
 
-	if (val)
-		envstr = BLI_sprintfN("%s=%s", env, val);
-	else
-		envstr = BLI_sprintfN("%s=", env);
-
-	putenv(envstr);
-	MEM_freeN(envstr);
-
-	/* non-free windows */
-#elif (defined(WIN32) || defined(WIN64)) /* not free windows */
+#if (defined(WIN32) || defined(WIN64))
 	uputenv(env, val);
 
-
 #else
 	/* linux/osx/bsd */
 	if (val)
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp
index 8f3bf88af65..a1bfce88131 100644
--- a/source/blender/collada/MeshImporter.cpp
+++ b/source/blender/collada/MeshImporter.cpp
@@ -27,7 +27,7 @@
 
 #include <algorithm>
 
-#if !defined(WIN32) || defined(FREE_WINDOWS)
+#if !defined(WIN32)
 #include <iostream>
 #endif
 
diff --git a/source/blender/collada/SkinInfo.cpp b/source/blender/collada/SkinInfo.cpp
index 71875d6274a..c48c060dc95 100644
--- a/source/blender/collada/SkinInfo.cpp
+++ b/source/blender/collada/SkinInfo.cpp
@@ -27,7 +27,7 @@
 
 #include <algorithm>
 
-#if !defined(WIN32) || defined(FREE_WINDOWS)
+#if !defined(WIN32)
 #include <stdint.h>
 #endif
 
diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h
index d89393b9903..8ec393bcbf0 100644
--- a/source/blender/imbuf/intern/IMB_anim.h
+++ b/source/blender/imbuf/intern/IMB_anim.h
@@ -41,10 +41,6 @@
 #  include <memory.h>
 #  include <commdlg.h>
 
-#  ifndef FREE_WINDOWS
-#    include <vfw.h>
-#  endif
-
 #  undef AVIIF_KEYFRAME // redefined in AVI_avi.h
 #  undef AVIIF_LIST // redefined in AVI_avi.h
 #endif /* _WIN32 */
@@ -130,7 +126,7 @@ struct anim {
 	/* avi */
 	struct _AviMovie *avi;
 
-#if defined(_WIN32) && !defined(FREE_WINDOWS)
+#if defined(_WIN32)
 	/* windows avi */
 	int avistreams;
 	int firstvideo;
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index a40b257b75b..9120c63009d 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -38,10 +38,6 @@
 #include <memory.h>
 #include <commdlg.h>
 
-#ifndef FREE_WINDOWS
-#include <vfw.h>
-#endif
-
 #undef AVIIF_KEYFRAME /* redefined in AVI_avi.h */
 #undef AVIIF_LIST /* redefined in AVI_avi.h */
 
@@ -173,7 +169,7 @@ static void an_stringenc(char *string, const char *head, const char *tail, unsig
 #ifdef WITH_AVI
 static void free_anim_avi(struct anim *anim)
 {
-#if defined(_WIN32) && !defined(FREE_WINDOWS)
+#if defined(_WIN32)
 	int i;
 #endif
 
@@ -184,7 +180,7 @@ static void free_anim_avi(struct anim *anim)
 	MEM_freeN(anim->avi);
 	anim->avi = NULL;
 
-#if defined(_WIN32) && !defined(FREE_WINDOWS)
+#if defined(_WIN32)
 
 	if (anim->pgf) {
 		AVIStreamGetFrameClose(anim->pgf);
@@ -283,7 +279,7 @@ static int startavi(struct anim *anim)
 {
 
 	AviError avierror;
-#if defined(_WIN32) && !defined(FREE_WINDOWS)
+#if defined(_WIN32)
 	HRESULT hr;
 	int i, firstvideo = -1;
 	int streamcount;
@@ -304,7 +300,7 @@ static int startavi(struct anim *anim)
 
 	avierror = AVI_open_movie(anim->name, anim->avi);
 
-#if defined(_WIN32) && !defined(FREE_WINDOWS)
+#if defined(_WIN32)
 	if (avierror == AVI_ERROR_COMPRESSION) {
 		AVIFileInit();
 		hr = AVIFileOpen(&anim->pfile, anim->name, OF_READ, 0L);
@@ -401,7 +397,7 @@ static ImBuf *avi_fetchibuf(struct anim *anim, int position)
 		return NULL;
 	}
 
-#if defined(_WIN32) && !defined(FREE_WINDOWS)
+#if defined(_WIN32)
 	if (anim->avistreams) {
 		LPBITMAPINFOHEADER lpbi;
 
diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp
index 12e03f55450..67a0b0ffd00 100644
--- a/source/blender/imbuf/intern/dds/dds_api.cpp
+++ b/source/blender/imbuf/intern/dds/dds_api.cpp
@@ -37,7 +37,7 @@ extern "C" {
 #include <stdio.h> // printf
 #include <fs

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list