forked from msys2/MINGW-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0002-fix-mingw-w64-definitions.patch
More file actions
560 lines (494 loc) · 18 KB
/
Copy path0002-fix-mingw-w64-definitions.patch
File metadata and controls
560 lines (494 loc) · 18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
diff -Naur blender-2.77a-orig/extern/glog/src/windows/config.h blender-2.77a/extern/glog/src/windows/config.h
--- blender-2.77a-orig/extern/glog/src/windows/config.h 2016-03-23 11:49:49.000000000 +0300
+++ blender-2.77a/extern/glog/src/windows/config.h 2016-07-12 13:40:19.613595000 +0300
@@ -15,6 +15,10 @@
#if defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER >= 1900))
# define HAVE_SNPRINTF
#endif
+
+#if defined(__MINGW32__)
+# define HAVE_PTHREAD
+#endif
/* Always the empty-string on non-windows systems. On windows, should be
"__declspec(dllexport)". This way, when we compile the dll, we export our
diff -Naur blender-2.77a-orig/extern/glog/src/windows/port.h blender-2.77a/extern/glog/src/windows/port.h
--- blender-2.77a-orig/extern/glog/src/windows/port.h 2016-03-23 11:49:49.000000000 +0300
+++ blender-2.77a/extern/glog/src/windows/port.h 2016-07-12 13:40:19.613595000 +0300
@@ -62,7 +62,7 @@
* used by both C and C++ code, so we put all the C++ together.
*/
-#ifdef _MSC_VER
+#ifdef _WIN32
/* 4244: otherwise we get problems when substracting two size_t's to an int
* 4251: it's complaining about a private struct I've chosen not to dllexport
@@ -74,17 +74,19 @@
#pragma warning(disable:4244 4251 4355 4715 4800 4996)
/* file I/O */
-#define PATH_MAX 1024
#define access _access
#define getcwd _getcwd
#define open _open
#define read _read
#define write _write
-#define lseek _lseek
#define close _close
#define popen _popen
#define pclose _pclose
+#ifndef __MINGW64_VERSION_MAJOR
+#define lseek _lseek
+#define PATH_MAX 1024
#define R_OK 04 /* read-only (for access()) */
+#endif
#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
#ifndef __MINGW32__
enum { STDIN_FILENO = 0, STDOUT_FILENO = 1, STDERR_FILENO = 2 };
@@ -130,7 +132,9 @@
#define DEFAULT_TEMPLATE_ROOTDIR ".."
// ----------------------------------- SYSTEM/PROCESS
+#ifndef __MINGW64_VERSION_MAJOR
typedef int pid_t;
+#endif
#define getpid _getpid
#endif // _MSC_VER
diff -Naur blender-2.77a-orig/intern/cycles/util/util_logging.h blender-2.77a/intern/cycles/util/util_logging.h
--- blender-2.77a-orig/intern/cycles/util/util_logging.h 2016-03-23 11:49:49.000000000 +0300
+++ blender-2.77a/intern/cycles/util/util_logging.h 2016-07-12 13:40:19.646095000 +0300
@@ -18,7 +18,9 @@
#if defined(WITH_CYCLES_LOGGING) && !defined(__KERNEL_GPU__)
# include <gflags/gflags.h>
+# define GLOG_NO_ABBREVIATED_SEVERITIES
# include <glog/logging.h>
+# undef GLOG_NO_ABBREVIATED_SEVERITIES
#endif
#include <iostream>
diff -Naur blender-2.80-orig/intern/cycles/util/util_simd.h blender-2.80/intern/cycles/util/util_simd.h
--- blender-2.80-orig/intern/cycles/util/util_simd.h 2016-03-23 11:49:49.000000000 +0300
+++ blender-2.80/intern/cycles/util/util_simd.h 2016-07-12 13:40:19.681095000 +0300
@@ -29,22 +29,13 @@
* We assume __KERNEL_SSEX__ flags to have been defined at this point */
/* SSE intrinsics headers */
-# ifndef FREE_WINDOWS64
-# ifdef _MSC_VER
+# ifdef _WIN32
# include <intrin.h>
# elif (defined(__x86_64__) || defined(__i386__))
# include <x86intrin.h>
# endif
-# else
-
-/* MinGW64 has conflicting declarations for these SSE headers in <windows.h>.
- * Since we can't avoid including <windows.h>, better only include that */
-# include "util/util_windows.h"
-
-# endif
-
# if defined(__x86_64__) || defined(_M_X64)
# define SIMD_SET_FLUSH_TO_ZERO \
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); \
diff -Naur blender-2.80-orig/intern/cycles/util/util_defines.h blender-2.80/intern/cycles/util/util_defines.h
--- blender-2.80-orig/intern/cycles/util/util_defines.h 2016-03-23 11:49:49.000000000 +0300
+++ blender-2.80/intern/cycles/util/util_defines.h 2016-07-12 13:40:19.712595000 +0300
@@ -59,7 +59,7 @@
# define ccl_device_inline static inline __attribute__((always_inline))
# define ccl_device_forceinline static inline __attribute__((always_inline))
# define ccl_align(...) __attribute__((aligned(__VA_ARGS__)))
-# ifndef FREE_WINDOWS64
+# ifndef __MINGW64_VERSION_MAJOR
# define __forceinline inline __attribute__((always_inline))
# endif
# define ccl_try_align(...) __attribute__((aligned(__VA_ARGS__)))
diff -Naur blender-2.80-orig/intern/dualcon/intern/Projections.h blender-2.80/intern/dualcon/intern/Projections.h
--- blender-2.80-orig/intern/dualcon/intern/Projections.h 2016-03-23 11:49:49.000000000 +0300
+++ blender-2.80/intern/dualcon/intern/Projections.h 2016-07-12 13:40:19.712595000 +0300
@@ -23,7 +23,7 @@
#define CONTAINS_INDEX
#define GRID_DIMENSION 20
-#if defined(_WIN32) && !(_MSC_VER >= 1900)
+#if defined(_MSC_VER) && !(_MSC_VER >= 1900)
# define isnan(n) _isnan(n)
# define LONG __int64
# define int64_t __int64
diff -Naur blender-2.80-orig/intern/ghost/intern/GHOST_WindowWin32.cpp blender-2.80/intern/ghost/intern/GHOST_WindowWin32.cpp
--- blender-2.80-orig/intern/ghost/intern/GHOST_WindowWin32.cpp 2016-03-23 11:49:43.000000000 +0300
+++ blender-2.80/intern/ghost/intern/GHOST_WindowWin32.cpp 2016-07-12 13:40:19.800595000 +0300
@@ -23,6 +23,12 @@
#define _USE_MATH_DEFINES
+#if defined(WITH_GL_EGL)
+# include "GHOST_ContextEGL.h"
+#else
+# include "GHOST_ContextWGL.h"
+#endif
+
#include "GHOST_WindowWin32.h"
#include "GHOST_ContextD3D.h"
#include "GHOST_ContextNone.h"
@@ -36,11 +42,6 @@
#include "utfconv.h"
#include "utf_winfunc.h"
-#if defined(WITH_GL_EGL)
-# include "GHOST_ContextEGL.h"
-#else
-# include "GHOST_ContextWGL.h"
-#endif
#ifdef WIN32_COMPOSITING
# include <Dwmapi.h>
#endif
diff -Naur blender-2.77a-orig/intern/libmv/libmv/numeric/numeric.h blender-2.77a/intern/libmv/libmv/numeric/numeric.h
--- blender-2.77a-orig/intern/libmv/libmv/numeric/numeric.h 2016-03-23 11:49:49.000000000 +0300
+++ blender-2.77a/intern/libmv/libmv/numeric/numeric.h 2016-07-12 13:40:19.817095000 +0300
@@ -33,7 +33,7 @@
#include <Eigen/QR>
#include <Eigen/SVD>
-#if !defined(__MINGW64__)
+#if !defined(__MINGW64_VERSION_MAJOR)
# if defined(_WIN32) || defined(__APPLE__) || \
defined(__FreeBSD__) || defined(__NetBSD__)
static void sincos(double x, double *sinx, double *cosx) {
@@ -41,7 +41,7 @@
*cosx = cos(x);
}
# endif
-#endif // !__MINGW64__
+#endif // !__MINGW64_VERSION_MAJOR
#if (defined(WIN32) || defined(WIN64)) && !defined(__MINGW32__)
inline long lround(double d) {
diff --Naur a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
--- a/source/blender/blenlib/BLI_fileops.h
+++ b/source/blender/blenlib/BLI_fileops.h
@@ -65,8 +65,10 @@ 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)
+# if defined(_MSC_VER) || defined(__MINGW64__)
typedef struct _stat64 BLI_stat_t;
+# elif defined(__MINGW32__)
+typedef struct _stati64 BLI_stat_t;
# else
typedef struct _stat BLI_stat_t;
# endif
diff -Naur blender-2.79-orig/source/blender/blenlib/BLI_fileops_types.h blender-2.79/source/blender/blenlib/BLI_fileops_types.h
--- blender-2.79-orig/source/blender/blenlib/BLI_fileops_types.h 2016-03-23 11:49:43.000000000 +0300
+++ blender-2.79/source/blender/blenlib/BLI_fileops_types.h 2016-07-12 13:40:19.827095000 +0300
@@ -35,7 +35,7 @@
#include <sys/stat.h>
-#if defined(WIN32)
+#if defined(_MSC_VER)
typedef unsigned int mode_t;
#endif
@@ -50,8 +50,10 @@ 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)
+# if defined(_MSC_VER) || defined(__MINGW64__)
struct _stat64 s;
+# elif defined(__MINGW32__)
+ struct _stati64 s;
# else
struct _stat s;
# endif
diff -Naur blender-2.77a-orig/source/blender/blenlib/BLI_winstuff.h blender-2.77a/source/blender/blenlib/BLI_winstuff.h
--- blender-2.77a-orig/source/blender/blenlib/BLI_winstuff.h 2016-03-23 11:49:43.000000000 +0300
+++ blender-2.77a/source/blender/blenlib/BLI_winstuff.h 2016-07-12 13:40:19.827095000 +0300
@@ -90,7 +90,7 @@
#endif
/* defines for using ISO C++ conformant names */
-#if !defined(_MSC_VER) || _MSC_VER < 1900
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
# define snprintf _snprintf
#endif
@@ -82,10 +95,13 @@
# define F_OK 0
#endif
+#if defined(_MSC_VER)
typedef unsigned int mode_t;
+#endif
-#ifndef _SSIZE_T_
-# define _SSIZE_T_
+/* mingw using _SSIZE_T_DEFINED to declare ssize_t type */
+#ifndef _SSIZE_T_DEFINED
+# define _SSIZE_T_DEFINED
/* python uses HAVE_SSIZE_T */
# ifndef HAVE_SSIZE_T
# define HAVE_SSIZE_T 1
--- blender-2.79b/source/blender/blenlib/intern/system.c.orig 2018-05-11 10:10:42.876493200 +0300
+++ blender-2.79b/source/blender/blenlib/intern/system.c 2018-05-11 10:10:49.927705600 +0300
@@ -72,7 +72,7 @@
}
/* Windows stackwalk lives in system_win32.c */
-#if !defined(_MSC_VER)
+#if !defined(_WIN32)
/**
* Write a backtrace into a file for systems which support it.
*/
--- blender-2.79b/source/blender/imbuf/intern/openexr/openexr_api.cpp.orig 2018-05-11 10:10:42.876493200 +0300
+++ blender-2.79b/source/blender/imbuf/intern/openexr/openexr_api.cpp 2018-05-11 10:10:49.927705600 +0300
@@ -77,7 +77,7 @@
{
// The following prevents a linking error in debug mode for MSVC using the libs in CVS
-#if defined(WITH_OPENEXR) && defined(_WIN32) && defined(DEBUG) && _MSC_VER < 1900
+#if defined(WITH_OPENEXR) && defined(_MSC_VER) && defined(DEBUG) && _MSC_VER < 1900
_CRTIMP void __cdecl _invalid_parameter_noinfo(void)
{
}
diff -Naur blender-2.80-orig/source/blender/blenlib/intern/math_solvers.c blender-2.80/source/blender/blenlib/intern/math_solvers.c
--- blender-2.80-orig/source/blender/blenlib/intern/math_solvers.c 2016-09-28 12:26:55.000000000 +0300
+++ blender-2.80/source/blender/blenlib/intern/math_solvers.c 2016-10-14 13:53:56.430617800 +0300
@@ -121,7 +121,7 @@
MEM_freeN(c1);
- return isfinite(x_prev);
+ return isfinite((float)x_prev);
}
/**
diff -Naur blender-2.81a-orig/source/creator/creator.c blender-2.81a/source/creator/creator.c
--- blender-2.81a-orig/source/creator/creator.c 2016-09-28 12:26:55.000000000 +0300
+++ blender-2.81a/source/creator/creator.c 2016-10-14 14:45:36.982849100 +0300
@@ -23,8 +23,9 @@
#include <stdlib.h>
#include <string.h>
+#include <time.h>
-#ifdef WIN32
+#ifdef _WIN32
# include "utfconv.h"
# include <windows.h>
#endif
diff -Naur a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h
--- a/source/blender/imbuf/intern/IMB_anim.h
+++ b/source/blender/imbuf/intern/IMB_anim.h
@@ -31,7 +31,10 @@
# include <commdlg.h>
# include <memory.h>
# include <mmsystem.h>
-# include <vfw.h>
+
+# ifndef FREE_WINDOWS
+# include <vfw.h>
+# endif
# include <windows.h>
# include <windowsx.h>
@@ -112,7 +115,7 @@ struct anim {
/* avi */
struct _AviMovie *avi;
-#if defined(_WIN32)
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
/* windows avi */
int avistreams;
int firstvideo;
diff -Naur a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -28,7 +28,10 @@
#ifdef _WIN32
# include "BLI_winstuff.h"
+
+#ifndef FREE_WINDOWS
# include <vfw.h>
+#endif
# undef AVIIF_KEYFRAME /* redefined in AVI_avi.h */
# undef AVIIF_LIST /* redefined in AVI_avi.h */
@@ -165,7 +168,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)
+# if defined(_WIN32) && !defined(FREE_WINDOWS)
int i;
# endif
@@ -180,7 +183,7 @@ static void free_anim_avi(struct anim *anim)
MEM_freeN(anim->avi);
anim->avi = NULL;
-# if defined(_WIN32)
+# if defined(_WIN32) && !defined(FREE_WINDOWS)
if (anim->pgf) {
AVIStreamGetFrameClose(anim->pgf);
@@ -319,7 +322,7 @@ static int startavi(struct anim *anim)
{
AviError avierror;
-# if defined(_WIN32)
+# if defined(_WIN32) && !defined(FREE_WINDOWS)
HRESULT hr;
int i, firstvideo = -1;
int streamcount;
@@ -340,7 +343,7 @@ static int startavi(struct anim *anim)
avierror = AVI_open_movie(anim->name, anim->avi);
-# if defined(_WIN32)
+# if defined(_WIN32) && !defined(FREE_WINDOWS)
if (avierror == AVI_ERROR_COMPRESSION) {
AVIFileInit();
hr = AVIFileOpen(&anim->pfile, anim->name, OF_READ, 0L);
@@ -444,7 +447,7 @@ static ImBuf *avi_fetchibuf(struct anim *anim, int position)
return NULL;
}
-# if defined(_WIN32)
+# if defined(_WIN32) && !defined(FREE_WINDOWS)
if (anim->avistreams) {
LPBITMAPINFOHEADER lpbi;
diff -Naur a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1263,7 +1263,18 @@ bool BLI_path_program_search(
{
/* free windows */
-#if (defined(WIN32) || defined(WIN64))
+#if defined(__MINGW32__)
+ char *envstr;
+
+ if (val)
+ envstr = BLI_sprintfN("%s=%s", env, val);
+ else
+ envstr = BLI_sprintfN("%s=", env);
+
+ putenv(envstr);
+ MEM_freeN(envstr);
+
+#elif defined(_MSC_VER) /* not free windows */
uputenv(env, val);
#else
diff -Naur a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -266,8 +266,10 @@ 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)
+# if defined(_MSC_VER) || defined(__MINGW64__)
return _wstat64(path, buffer);
+# elif defined(__MINGW32__)
+ return _wstati64(path, buffer);
# else
return _wstat(path, buffer);
# endif
@@ -457,17 +460,30 @@ void BLI_file_free_lines(LinkNode *lines)
bool BLI_file_older(const char *file1, const char *file2)
{
#ifdef WIN32
- struct _stat st1, st2;
+# ifndef __MINGW32__
+ struct _stat st1, st2;
+# else
+ struct _stati64 st1, st2;
+# endif
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
UTF16_UN_ENCODE(file2);
UTF16_UN_ENCODE(file1);
--- blender-2.80/intern/clog/clog.c.orig 2019-08-01 12:18:33.240672100 +0300
+++ blender-2.80/intern/clog/clog.c 2019-08-01 12:18:45.784094200 +0300
@@ -37,7 +37,7 @@
# include <sys/time.h>
#endif
-#if defined(_MSC_VER)
+#if defined(_WIN32)
# include <io.h>
# include <windows.h>
#endif
@@ -365,7 +365,7 @@
static uint64_t clg_timestamp_ticks_get(void)
{
uint64_t tick;
-#if defined(_MSC_VER)
+#if defined(_WIN32)
tick = GetTickCount64();
#else
struct timeval tv;
--- blender-2.80/intern/ghost/intern/GHOST_DisplayManagerWin32.h.orig 2019-08-01 13:25:18.577130500 +0300
+++ blender-2.80/intern/ghost/intern/GHOST_DisplayManagerWin32.h 2019-08-01 13:25:57.358798600 +0300
@@ -25,7 +25,7 @@
#ifndef __GHOST_DISPLAYMANAGERWIN32_H__
#define __GHOST_DISPLAYMANAGERWIN32_H__
-#ifndef WIN32
+#ifndef _WIN32
# error WIN32 only!
#endif // WIN32
--- blender-2.80/intern/ghost/intern/GHOST_SystemWin32.h.orig 2019-08-01 13:27:05.485718300 +0300
+++ blender-2.80/intern/ghost/intern/GHOST_SystemWin32.h 2019-08-01 13:27:09.713325700 +0300
@@ -25,7 +25,7 @@
#ifndef __GHOST_SYSTEMWIN32_H__
#define __GHOST_SYSTEMWIN32_H__
-#ifndef WIN32
+#ifndef _WIN32
# error WIN32 only!
#endif // WIN32
--- blender-2.80/intern/ghost/intern/GHOST_TaskbarWin32.h.orig 2019-08-01 13:26:35.424465500 +0300
+++ blender-2.80/intern/ghost/intern/GHOST_TaskbarWin32.h 2019-08-01 13:26:37.764469600 +0300
@@ -20,7 +20,7 @@
#ifndef __GHOST_TASKBARWIN32_H__
#define __GHOST_TASKBARWIN32_H__
-#ifndef WIN32
+#ifndef _WIN32
# error WIN32 only!
#endif // WIN32
--- blender-2.80/intern/ghost/intern/GHOST_WindowWin32.h.orig 2019-08-01 13:26:03.333609100 +0300
+++ blender-2.80/intern/ghost/intern/GHOST_WindowWin32.h 2019-08-01 13:26:07.077615600 +0300
@@ -25,7 +25,7 @@
#ifndef __GHOST_WINDOWWIN32_H__
#define __GHOST_WINDOWWIN32_H__
-#ifndef WIN32
+#ifndef _WIN32
# error WIN32 only!
#endif // WIN32
--- blender-2.80/intern/ghost/intern/GHOST_ContextWGL.h.orig 2019-08-01 13:26:03.333609100 +0300
+++ blender-2.80/intern/ghost/intern/GHOST_ContextWGL.h 2019-08-01 13:26:07.077615600 +0300
@@ -28,6 +28,7 @@
#include "GHOST_Context.h"
+#undef INT;
#include <GL/wglew.h>
#ifndef GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY
--- blender-2.80/intern/cycles/util/util_murmurhash.cpp.orig 2019-08-01 15:24:38.522454900 +0300
+++ blender-2.80/intern/cycles/util/util_murmurhash.cpp 2019-08-01 14:58:05.222223800 +0300
@@ -26,7 +26,7 @@
#include "util/util_algorithm.h"
#include "util/util_murmurhash.h"
-#if defined(_MSC_VER)
+#if defined(_WIN32)
# define ROTL32(x, y) _rotl(x, y)
# define ROTL64(x, y) _rotl64(x, y)
# define BIG_CONSTANT(x) (x)
--- blender-2.80/intern/cycles/device/device_cuda.cpp.orig 2019-08-01 15:26:37.073620900 +0300
+++ blender-2.80/intern/cycles/device/device_cuda.cpp 2019-08-01 15:26:46.043633500 +0300
@@ -2584,7 +2584,7 @@
static CUresult device_cuda_safe_init()
{
-# ifdef _WIN32
+# ifdef _MSC_VER
__try {
return cuInit(0);
}
--- blender-2.80/intern/cycles/device/device_opencl.cpp.orig 2019-08-01 15:26:37.073620900 +0300
+++ blender-2.80/intern/cycles/device/device_opencl.cpp 2019-08-01 15:26:46.043633500 +0300
@@ -64,7 +64,7 @@
static cl_int device_opencl_get_num_platforms_safe(cl_uint *num_platforms)
{
-# ifdef _WIN32
+# ifdef _MSC_VER
__try {
return clGetPlatformIDs(0, NULL, num_platforms);
}
--- blender-2.81a/extern/quadriflow/src/dedge.cpp.orig 2019-12-06 11:45:08.681059300 +0300
+++ blender-2.81a/extern/quadriflow/src/dedge.cpp 2019-12-06 11:45:54.841540400 +0300
@@ -10,6 +10,11 @@
#ifdef WITH_TBB
#include "tbb/tbb.h"
#endif
+
+#ifdef _WIN32
+#include <intrin.h>
+#endif
+
namespace qflow {
inline int dedge_prev(int e, int deg) { return (e % deg == 0u) ? e + (deg - 1) : e - 1; }