summaryrefslogtreecommitdiffstats
path: root/src/freeimage-1-fixes.patch
blob: 25819707415a3a05efbfacdcde0368bbb6c75db9 (plain)
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
This file is part of MXE. See LICENSE.md for licensing information.

Contains ad hoc patches for cross building.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Sat, 27 Oct 2012 22:57:27 +0200
Subject: [PATCH] include string.h for memset

taken from https://sourceforge.net/tracker/?func=detail&aid=3581223&group_id=11504&atid=311504

diff --git a/Source/OpenEXR/IlmImf/ImfAutoArray.h b/Source/OpenEXR/IlmImf/ImfAutoArray.h
index 1111111..2222222 100644
--- a/Source/OpenEXR/IlmImf/ImfAutoArray.h
+++ b/Source/OpenEXR/IlmImf/ImfAutoArray.h
@@ -45,6 +45,10 @@
 //-----------------------------------------------------------------------------
 
 #include "OpenEXRConfig.h"
+#ifdef __MINGW32__
+// needed for memset
+#include <string.h>
+#endif
 
 namespace Imf {
 

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Sat, 11 May 2013 15:15:39 +1000
Subject: [PATCH] mingw-w64 fixes


diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp
index 1111111..2222222 100644
--- a/Source/FreeImage/PluginTIFF.cpp
+++ b/Source/FreeImage/PluginTIFF.cpp
@@ -35,6 +35,8 @@
 #undef __unix
 #endif
 
+#include <stdint.h>
+
 #include "FreeImage.h"
 #include "Utilities.h"
 #include "../LibTIFF4/tiffiop.h"
@@ -207,7 +209,7 @@ TIFFFdOpen(thandle_t handle, const char *name, const char *mode) {
     // 64bit machines (sizeof(int) != sizeof(long)). 
     // Needs to be fixed within libTIFF.
 	if (tif) {
-		tif->tif_fd = (long)handle;
+		tif->tif_fd = (intptr_t)handle;
 	}
 
 	return tif;

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: fiesh <weiss@wsoptics.de>
Date: Tue, 22 Dec 2015 13:45:56 +0100
Subject: [PATCH] fix freeimage build

Add the FREEIMAGE_LIB define in order to keep the build process from
defining dllspec specifications. Remove -fPIC to fix a warning.

diff --git a/Makefile.fip b/Makefile.fip
index 1111111..2222222 100644
--- a/Makefile.fip
+++ b/Makefile.fip
@@ -17,7 +17,7 @@ MODULES = $(SRCS:.c=.o)
 MODULES := $(MODULES:.cpp=.o)
 CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS
 CFLAGS += $(INCLUDE)
-CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
+CXXFLAGS ?= -O3 -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -DFREEIMAGE_LIB
 CXXFLAGS += $(INCLUDE)
 
 ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Pek <tehnick-8@mail.ru>
Date: Wed, 04 May 2016 18:43:16 +0300
Subject: [PATCH] fix build with GCC >= 6.x

diff --git a/Makefile.mingw b/Makefile.mingw
index 1111111..2222222 100644
--- a/Makefile.mingw
+++ b/Makefile.mingw
@@ -67,7 +67,7 @@ MODULES := $(MODULES:.cpp=.o)
 RESOURCE = $(RCFILE:.rc=.coff)
 CFLAGS ?= -O3 -fexceptions -DNDEBUG $(WIN32_CFLAGS)
 CFLAGS += $(INCLUDE)
-CXXFLAGS ?= -O3 -fexceptions -Wno-ctor-dtor-privacy -DNDEBUG $(WIN32_CXXFLAGS)
+CXXFLAGS ?= -O3 -fexceptions -Wno-ctor-dtor-privacy -Wno-narrowing -DNDEBUG $(WIN32_CXXFLAGS)
 CXXFLAGS += $(INCLUDE)
 RCFLAGS ?= -DNDEBUG
 LDFLAGS ?= -s -shared -static -Wl,-soname,$(SOLIBNAME) $(WIN32_LDFLAGS)