diff options
Diffstat (limited to 'source/blender')
23 files changed, 49 insertions, 128 deletions
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..9477f61713c 100644 --- a/source/blender/blenlib/BLI_sys_types.h +++ b/source/blender/blenlib/BLI_sys_types.h @@ -65,8 +65,8 @@ typedef uint64_t u_int64_t; #include <inttypes.h> -/* MinGW and MSVC >= 2010 */ -#elif defined(FREE_WINDOWS) || defined(_MSC_VER) +/* MSVC >= 2010 */ +#elif defined(_MSC_VER) #include <stdint.h> #else diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h index b421b7dbb90..6fbbed01400 100644 --- a/source/blender/blenlib/BLI_winstuff.h +++ b/source/blender/blenlib/BLI_winstuff.h @@ -37,15 +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 - #define WIN32_LEAN_AND_MEAN #ifndef WIN32_SKIP_HKEY_PROTECTION @@ -94,7 +85,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,28 +93,22 @@ 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 +#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) + -/* 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 diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index db4b3bcf20c..1df7f6f81e4 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -42,9 +42,6 @@ #include "zlib.h" #ifdef WIN32 -# ifdef __MINGW32__ -# include <ctype.h> -# endif # include <io.h> # include "BLI_winstuff.h" # include "BLI_callbacks.h" @@ -265,7 +262,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/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 3edc00a8c1a..48280c14d7d 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -113,7 +113,7 @@ double BLI_dir_free_space(const char *dir) #ifdef WIN32 DWORD sectorspc, bytesps, freec, clusters; char tmp[4]; - + tmp[0] = '\\'; tmp[1] = 0; /* Just a failsafe */ if (dir[0] == '/' || dir[0] == '\\') { tmp[0] = '\\'; @@ -139,10 +139,10 @@ double BLI_dir_free_space(const char *dir) char name[FILE_MAXDIR], *slash; int len = strlen(dir); - + if (len >= FILE_MAXDIR) /* path too long */ return -1; - + strcpy(name, dir); if (len) { @@ -194,7 +194,7 @@ size_t BLI_file_size(const char *path) */ int BLI_exists(const char *name) { -#if defined(WIN32) +#if defined(WIN32) BLI_stat_t st; wchar_t *tmp_16 = alloc_utf16_from_8(name, 1); int len, res; @@ -253,10 +253,8 @@ int BLI_stat(const char *path, BLI_stat_t *buffer) int BLI_wstat(const wchar_t *path, BLI_stat_t *buffer) { -#if defined(_MSC_VER) || defined(__MINGW64__) +#if defined(_MSC_VER) return _wstat64(path, buffer); -#elif defined(__MINGW32__) - return _wstati64(path, buffer); #else return _wstat(path, buffer); #endif @@ -372,7 +370,7 @@ LinkNode *BLI_file_read_as_lines(const char *name) size_t size; if (!fp) return NULL; - + fseek(fp, 0, SEEK_END); size = (size_t)ftell(fp); fseek(fp, 0, SEEK_SET); @@ -385,7 +383,7 @@ LinkNode *BLI_file_read_as_lines(const char *name) buf = MEM_mallocN(size, "file_as_lines"); if (buf) { size_t i, last = 0; - + /* * size = because on win32 reading * all the bytes in the file will return @@ -403,10 +401,10 @@ LinkNode *BLI_file_read_as_lines(const char *name) last = i + 1; } } - + MEM_freeN(buf); } - + fclose(fp); return lines.list; @@ -424,23 +422,13 @@ void BLI_file_free_lines(LinkNode *lines) bool BLI_file_older(const char *file1, const char *file2) { #ifdef WIN32 -#ifndef __MINGW32__ - struct _stat st1, st2; -#else - struct _stati64 st1, st2; -#endif + struct _stat st1, st2; UTF16_ENCODE(file1); UTF16_ENCODE(file2); - -#ifndef __MINGW32__ - if (_wstat(file1_16, &st1)) return false; - if (_wstat(file2_16, &st2)) return false; -#else - if (_wstati64(file1_16, &st1)) return false; - if (_wstati64(file2_16, &st2)) return false; -#endif + if (_wstat(file1_16, &st1)) return false; + if (_wstat(file2_16, &st2)) return false; UTF16_UN_ENCODE(file2); UTF16_UN_ENCODE(file1); diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c index 3b06b7df09a..d6834428376 100644 --- a/source/blender/blenlib/intern/winstuff.c +++ b/source/blender/blenlib/intern/winstuff.c @@ -160,8 +160,6 @@ void RegisterBlendExtension(void) GetSystemDirectory(SysDir, FILE_MAXDIR); #ifdef _WIN64 ThumbHandlerDLL = "BlendThumb64.dll"; -#elif defined(__MINGW32__) - ThumbHandlerDLL = "BlendThumb.dll"; #else IsWow64Process(GetCurrentProcess(), &IsWOW64); if (IsWOW64 == true) 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/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c index 71d49e0dc2e..ee0ec3fda39 100644 --- a/source/blender/editors/space_file/fsmenu.c +++ b/source/blender/editors/space_file/fsmenu.c @@ -48,9 +48,6 @@ #ifdef WIN32 # include <windows.h> /* need to include windows.h so _WIN32_IE is defined */ -# ifndef _WIN32_IE -# define _WIN32_IE 0x0400 /* minimal requirements for SHGetSpecialFolderPath on MINGW MSVC has this defined already */ -# endif # include <shlobj.h> /* for SHGetSpecialFolderPath, has to be done before BLI_winstuff * because 'near' is disabled through BLI_windstuff */ # include "BLI_winstuff.h" diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h index d89393b9903..6d7ad7985f9 100644 --- a/source/blender/imbuf/intern/IMB_anim.h +++ b/source/blender/imbuf/intern/IMB_anim.h @@ -40,10 +40,7 @@ # include <mmsystem.h> # include <memory.h> # include <commdlg.h> - -# ifndef FREE_WINDOWS -# include <vfw.h> -# endif +# include <vfw.h> # undef AVIIF_KEYFRAME // redefined in AVI_avi.h # undef AVIIF_LIST // redefined in AVI_avi.h @@ -130,7 +127,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..9806ff006d7 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -37,10 +37,7 @@ #include <mmsystem.h> #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 +170,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 +181,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 +280,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 +301,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 +398,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 <fstream> -#if defined (WIN32) && !defined(FREE_WINDOWS) +#if defined (WIN32) #include "utfconv.h" #endif @@ -62,7 +62,7 @@ int imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/) /* open file for writing */ std::ofstream fildes; -#if defined (WIN32) && !defined(FREE_WINDOWS) +#if defined (WIN32) wchar_t *wname = alloc_utf16_from_8(name, 0); fildes.open(wname); free(wname); diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.cpp b/source/blender/imbuf/intern/oiio/openimageio_api.cpp index 224cf6347d2..b123d508f99 100644 --- a/source/blender/imbuf/intern/oiio/openimageio_api.cpp +++ b/source/blender/imbuf/intern/oiio/openimageio_api.cpp @@ -31,7 +31,7 @@ #include <set> -#if defined(WIN32) && !defined(FREE_WINDOWS) +#if defined(WIN32) #include "utfconv.h" #endif diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 29332a5c899..ec544e65355 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -69,7 +69,7 @@ #include <openexr_api.h> -#if defined (WIN32) && !defined(FREE_WINDOWS) +#if defined (WIN32) #include "utfconv.h" #endif @@ -77,7 +77,7 @@ extern "C" { // The following prevents a linking error in debug mode for MSVC using the libs in CVS -#if defined(WITH_OPENEXR) && defined(_WIN32) && defined(DEBUG) && !defined(__MINGW32__) && _MSC_VER < 1900 +#if defined(WITH_OPENEXR) && defined(_WIN32) && defined(DEBUG) && _MSC_VER < 1900 _CRTIMP void __cdecl _invalid_parameter_noinfo(void) { } @@ -180,7 +180,7 @@ public: : IStream(filename) { /* utf-8 file path support on windows */ -#if defined (WIN32) && !defined(FREE_WINDOWS) +#if defined (WIN32) wchar_t *wfilename = alloc_utf16_from_8(filename, 0); ifs.open(wfilename, std::ios_base::binary); free(wfilename); @@ -243,7 +243,7 @@ public: : OStream(filename) { /* utf-8 file path support on windows */ -#if defined (WIN32) && !defined(FREE_WINDOWS) +#if defined (WIN32) wchar_t *wfilename = alloc_utf16_from_8(filename, 0); ofs.open(wfilename, std::ios_base::binary); free(wfilename); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index ec6a03e713d..7fc6aab7885 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -432,11 +432,7 @@ static void rna_Object_parent_set(PointerRNA *ptr, PointerRNA value) { Object *ob = (Object *)ptr->data; Object *par = (Object *)value.data; - -#ifdef FREE_WINDOWS - /* NOTE: this dummy check here prevents this method causing weird runtime errors on mingw 4.6.2 */ - if (ob) -#endif + { ED_object_parent(ob, par, ob->partype, ob->parsubstr); } diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c index 1cc2d6f1307..fdc2371c259 100644 --- a/source/blender/python/intern/bpy_app_handlers.c +++ b/source/blender/python/intern/bpy_app_handlers.c @@ -126,7 +126,7 @@ static PyObject *bpy_app_handlers_persistent_new(PyTypeObject *UNUSED(type), PyO /* dummy type because decorators can't be PyCFunctions */ static PyTypeObject BPyPersistent_Type = { -#if defined(_MSC_VER) || defined(FREE_WINDOWS) +#if defined(_MSC_VER) PyVarObject_HEAD_INIT(NULL, 0) #else PyVarObject_HEAD_INIT(&PyType_Type, 0) @@ -206,7 +206,7 @@ PyObject *BPY_app_handlers_struct(void) { PyObject *ret; -#if defined(_MSC_VER) || defined(FREE_WINDOWS) +#if defined(_MSC_VER) BPyPersistent_Type.ob_base.ob_base.ob_type = &PyType_Type; #endif diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 6613bb8a5f7..a0b76bd67ee 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -5692,7 +5692,7 @@ PyTypeObject pyrna_struct_meta_idprop_Type = { NULL, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ NULL, /* struct PyGetSetDef *tp_getset; */ -#if defined(_MSC_VER) || defined(FREE_WINDOWS) +#if defined(_MSC_VER) NULL, /* defer assignment */ #else &PyType_Type, /* struct _typeobject *tp_base; */ @@ -6267,7 +6267,7 @@ static PyTypeObject pyrna_prop_collection_iter_Type = { NULL, /* reprfunc tp_str; */ /* will only use these if this is a subtype of a py class */ -#if defined(_MSC_VER) || defined(FREE_WINDOWS) +#if defined(_MSC_VER) NULL, /* defer assignment */ #else PyObject_GenericGetAttr, /* getattrofunc tp_getattro; */ @@ -6300,7 +6300,7 @@ static PyTypeObject pyrna_prop_collection_iter_Type = { #endif /*** Added in release 2.2 ***/ /* Iterators */ -#if defined(_MSC_VER) || defined(FREE_WINDOWS) +#if defined(_MSC_VER) NULL, /* defer assignment */ #else PyObject_SelfIter, /* getiterfunc tp_iter; */ @@ -6776,7 +6776,7 @@ void BPY_rna_init(void) #endif /* for some reason MSVC complains of these */ -#if defined(_MSC_VER) || defined(FREE_WINDOWS) +#if defined(_MSC_VER) pyrna_struct_meta_idprop_Type.tp_base = &PyType_Type; pyrna_prop_collection_iter_Type.tp_iter = PyObject_SelfIter; |