* updated korganizer (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / package / graphic / hermes / hotfix-gcc4.patch
blobfbf2e2062dc126a598728f9720a81f7c8f716257
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../hermes/gcc4.patch
5 # Copyright (C) 2004 - 2005 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 I don't know what they are doing there with the underscore thing...
18 originally these functions should be aliased but gcc4 complains about
19 undefined functions (?)
20 --jsaw
22 diff -ur Hermes-1.3.3/src/HeadMMX.h Hermes-1.3.3-t2/src/HeadMMX.h
23 --- Hermes-1.3.3/src/HeadMMX.h 2000-12-06 05:55:28.000000000 +0100
24 +++ Hermes-1.3.3-t2/src/HeadMMX.h 2005-11-24 14:33:42.493827611 +0100
25 @@ -27,6 +27,26 @@
26 extern "C" {
27 #endif
29 +/* Fix the underscore business with ELF compilers */
31 +#if defined(__ELF__) && defined(__GNUC__)
33 +#define ConvertMMX _ConvertMMX
34 +#define ClearMMX_32 _ClearMMX_32
35 +#define ClearMMX_24 _ClearMMX_24
36 +#define ClearMMX_16 _ClearMMX_16
37 +#define ClearMMX_8 _ClearMMX_8
38 +#define ConvertMMXp32_16RGB555 _ConvertMMXp32_16RGB555
39 +#define ConvertMMXpII32_24RGB888 _ConvertMMXpII32_24RGB888
40 +#define ConvertMMXpII32_16RGB565 _ConvertMMXpII32_16RGB565
41 +#define ConvertMMXpII32_16BGR565 _ConvertMMXpII32_16BGR565
42 +#define ConvertMMXpII32_16RGB555 _ConvertMMXpII32_16RGB555
43 +#define ConvertMMXpII32_16BGR555 _ConvertMMXpII32_16BGR555
45 +#endif /* ELF and GNUC */
49 void STACKCALL ConvertMMX(HermesConverterInterface *);
51 void STACKCALL ClearMMX_32(HermesClearInterface *);
52 @@ -49,35 +69,6 @@
56 -/* Fix the underscore business with ELF compilers */
58 -#if defined(__ELF__) && defined(__GNUC__)
59 - #ifdef __cplusplus
60 - extern "C" {
61 - #endif
63 - void ConvertMMX(HermesConverterInterface *) __attribute__ ((alias ("_ConvertMMX")));
64 - void ClearMMX_32(HermesClearInterface *) __attribute__ ((alias ("_ClearMMX_32")));
65 - void ClearMMX_24(HermesClearInterface *) __attribute__ ((alias ("_ClearMMX_24")));
66 - void ClearMMX_16(HermesClearInterface *) __attribute__ ((alias ("_ClearMMX_16")));
67 - void ClearMMX_8(HermesClearInterface *) __attribute__ ((alias ("_ClearMMX_8")));
69 - void ConvertMMXp32_16RGB555() __attribute__ ((alias ("_ConvertMMXp32_16RGB555")));
71 - void ConvertMMXpII32_24RGB888() __attribute__ ((alias ("_ConvertMMXpII32_24RGB888")));
72 - void ConvertMMXpII32_16RGB565() __attribute__ ((alias ("_ConvertMMXpII32_16RGB565")));
73 - void ConvertMMXpII32_16BGR565() __attribute__ ((alias ("_ConvertMMXpII32_16BGR565")));
74 - void ConvertMMXpII32_16RGB555() __attribute__ ((alias ("_ConvertMMXpII32_16RGB555")));
75 - void ConvertMMXpII32_16BGR555() __attribute__ ((alias ("_ConvertMMXpII32_16BGR555")));
77 - #ifdef __cplusplus
78 - }
79 - #endif
81 -#endif /* ELF and GNUC */
86 /* Make it work with Watcom */
87 #ifdef __WATCOMC__
88 diff -ur Hermes-1.3.3/src/HeadX86.h Hermes-1.3.3-t2/src/HeadX86.h
89 --- Hermes-1.3.3/src/HeadX86.h 2000-12-06 05:55:28.000000000 +0100
90 +++ Hermes-1.3.3-t2/src/HeadX86.h 2005-11-24 14:35:20.307108281 +0100
91 @@ -27,6 +27,53 @@
92 #endif
97 +/* Now fix up the ELF underscore problem */
99 +#if defined(__ELF__) && defined(__GNUC__)
100 +#define Hermes_X86_CPU _Hermes_X86_CPU
101 +#define ConvertX86 _ConvertX86
102 +#define ConvertX86Stretch _ConvertX86Stretch
103 +#define ClearX86_32 _ClearX86_32
104 +#define ClearX86_24 _ClearX86_24
105 +#define ClearX86_16 _ClearX86_16
106 +#define ClearX86_8 _ClearX86_8
107 +#define ConvertX86p32_32BGR888 _ConvertX86p32_32BGR888
108 +#define ConvertX86p32_32RGBA888 _ConvertX86p32_32RGBA888
109 +#define ConvertX86p32_32BGRA888 _ConvertX86p32_32BGRA888
110 +#define ConvertX86p32_24RGB888 _ConvertX86p32_24RGB888
111 +#define ConvertX86p32_24BGR888 _ConvertX86p32_24BGR888
112 +#define ConvertX86p32_16RGB565 _ConvertX86p32_16RGB565
113 +#define ConvertX86p32_16BGR565 _ConvertX86p32_16BGR565
114 +#define ConvertX86p32_16RGB555 _ConvertX86p32_16RGB555
115 +#define ConvertX86p32_16BGR555 _ConvertX86p32_16BGR555
116 +#define ConvertX86p32_8RGB332 _ConvertX86p32_8RGB332
117 +#define ConvertX86p32_16RGB565_S _ConvertX86p32_16RGB565_S
118 +#define ConvertX86p16_32RGB888 _ConvertX86p16_32RGB888
119 +#define ConvertX86p16_32BGR888 _ConvertX86p16_32BGR888
120 +#define ConvertX86p16_32RGBA888 _ConvertX86p16_32RGBA888
121 +#define ConvertX86p16_32BGRA888 _ConvertX86p16_32BGRA888
122 +#define ConvertX86p16_24RGB888 _ConvertX86p16_24RGB888
123 +#define ConvertX86p16_24BGR888 _ConvertX86p16_24BGR888
124 +#define ConvertX86p16_16BGR565 _ConvertX86p16_16BGR565
125 +#define ConvertX86p16_16RGB555 _ConvertX86p16_16RGB555
126 +#define ConvertX86p16_16BGR555 _ConvertX86p16_16BGR555
127 +#define ConvertX86p16_8RGB332 _ConvertX86p16_8RGB332
128 +#define CopyX86p_4byte _CopyX86p_4byte
129 +#define CopyX86p_3byte _CopyX86p_3byte
130 +#define CopyX86p_2byte _CopyX86p_2byte
131 +#define CopyX86p_1byte _CopyX86p_1byte
132 +#define ConvertX86pI8_32 _ConvertX86pI8_32
133 +#define ConvertX86pI8_24 _ConvertX86pI8_24
134 +#define ConvertX86pI8_16 _ConvertX86pI8_16
135 +#define ConvertX86p16_32RGB888_LUT_X86 _ConvertX86p16_32RGB888_LUT_X86
136 +#define ConvertX86p16_32BGR888_LUT_X86 _ConvertX86p16_32BGR888_LUT_X86
137 +#define ConvertX86p16_32RGBA888_LUT_X86 _ConvertX86p16_32RGBA888_LUT_X86
138 +#define ConvertX86p16_32BGRA888_LUT_X86 _ConvertX86p16_32BGRA888_LUT_X86
139 +#endif /* ELF & GNU */
142 void STACKCALL ConvertX86(HermesConverterInterface *);
143 void STACKCALL ConvertX86Stretch(HermesConverterInterface *);
144 void STACKCALL ClearX86_32(HermesClearInterface *);
145 @@ -81,70 +128,6 @@
149 -/* Now fix up the ELF underscore problem */
151 -#if defined(__ELF__) && defined(__GNUC__)
152 - #ifdef __cplusplus
153 - extern "C" {
154 - #endif
156 - int Hermes_X86_CPU() __attribute__ ((alias ("_Hermes_X86_CPU")));
158 - void ConvertX86(HermesConverterInterface *) __attribute__ ((alias ("_ConvertX86")));
159 - void ConvertX86Stretch(HermesConverterInterface *) __attribute__ ((alias ("_ConvertX86Stretch")));
161 - void ClearX86_32(HermesClearInterface *) __attribute__ ((alias ("_ClearX86_32")));
162 - void ClearX86_24(HermesClearInterface *) __attribute__ ((alias ("_ClearX86_24")));
163 - void ClearX86_16(HermesClearInterface *) __attribute__ ((alias ("_ClearX86_16")));
164 - void ClearX86_8(HermesClearInterface *) __attribute__ ((alias ("_ClearX86_8")));
167 - void ConvertX86p32_32BGR888() __attribute__ ((alias ("_ConvertX86p32_32BGR888")));
168 - void ConvertX86p32_32RGBA888() __attribute__ ((alias ("_ConvertX86p32_32RGBA888")));
169 - void ConvertX86p32_32BGRA888() __attribute__ ((alias ("_ConvertX86p32_32BGRA888")));
170 - void ConvertX86p32_24RGB888() __attribute__ ((alias ("_ConvertX86p32_24RGB888")));
171 - void ConvertX86p32_24BGR888() __attribute__ ((alias ("_ConvertX86p32_24BGR888")));
172 - void ConvertX86p32_16RGB565() __attribute__ ((alias ("_ConvertX86p32_16RGB565")));
173 - void ConvertX86p32_16BGR565() __attribute__ ((alias ("_ConvertX86p32_16BGR565")));
174 - void ConvertX86p32_16RGB555() __attribute__ ((alias ("_ConvertX86p32_16RGB555")));
175 - void ConvertX86p32_16BGR555() __attribute__ ((alias ("_ConvertX86p32_16BGR555")));
176 - void ConvertX86p32_8RGB332() __attribute__ ((alias ("_ConvertX86p32_8RGB332")));
178 - void ConvertX86p32_16RGB565_S() __attribute__ ((alias ("_ConvertX86p32_16RGB565_S")));
180 - void ConvertX86p16_32RGB888() __attribute__ ((alias ("_ConvertX86p16_32RGB888")));
181 - void ConvertX86p16_32BGR888() __attribute__ ((alias ("_ConvertX86p16_32BGR888")));
182 - void ConvertX86p16_32RGBA888() __attribute__ ((alias ("_ConvertX86p16_32RGBA888")));
183 - void ConvertX86p16_32BGRA888() __attribute__ ((alias ("_ConvertX86p16_32BGRA888")));
184 - void ConvertX86p16_24RGB888() __attribute__ ((alias ("_ConvertX86p16_24RGB888")));
185 - void ConvertX86p16_24BGR888() __attribute__ ((alias ("_ConvertX86p16_24BGR888")));
186 - void ConvertX86p16_16BGR565() __attribute__ ((alias ("_ConvertX86p16_16BGR565")));
187 - void ConvertX86p16_16RGB555() __attribute__ ((alias ("_ConvertX86p16_16RGB555")));
188 - void ConvertX86p16_16BGR555() __attribute__ ((alias ("_ConvertX86p16_16BGR555")));
189 - void ConvertX86p16_8RGB332() __attribute__ ((alias ("_ConvertX86p16_8RGB332")));
191 - void CopyX86p_4byte() __attribute__ ((alias ("_CopyX86p_4byte")));
192 - void CopyX86p_3byte() __attribute__ ((alias ("_CopyX86p_3byte")));
193 - void CopyX86p_2byte() __attribute__ ((alias ("_CopyX86p_2byte")));
194 - void CopyX86p_1byte() __attribute__ ((alias ("_CopyX86p_1byte")));
196 - void ConvertX86pI8_32() __attribute__ ((alias ("_ConvertX86pI8_32")));
197 - void ConvertX86pI8_24() __attribute__ ((alias ("_ConvertX86pI8_24")));
198 - void ConvertX86pI8_16() __attribute__ ((alias ("_ConvertX86pI8_16")));
200 - extern int32 ConvertX86p16_32RGB888_LUT_X86[512] __attribute__ ((alias ("_ConvertX86p16_32RGB888_LUT_X86")));
201 - extern int32 ConvertX86p16_32BGR888_LUT_X86[512] __attribute__ ((alias ("_ConvertX86p16_32BGR888_LUT_X86")));
202 - extern int32 ConvertX86p16_32RGBA888_LUT_X86[512] __attribute__ ((alias ("_ConvertX86p16_32RGBA888_LUT_X86")));
203 - extern int32 ConvertX86p16_32BGRA888_LUT_X86[512] __attribute__ ((alias ("_ConvertX86p16_32BGRA888_LUT_X86")));
205 - #ifdef __cplusplus
207 - #endif
209 -#endif /* ELF & GNU */
213 /* Make it run with WATCOM C */
214 #ifdef __WATCOMC__
215 #pragma warning 601 9