/[pkgs]/devel/DevIL/DevIL-1.7.5-il_endian_h.patch
ViewVC logotype

Contents of /devel/DevIL/DevIL-1.7.5-il_endian_h.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download) (as text)
Mon Mar 9 09:25:04 2009 UTC (8 months, 2 weeks ago) by jwrdegoede
Branch: MAIN
CVS Tags: F-12-split, DevIL-1_7_8-1_fc11, F-11-split, DevIL-1_7_8-3_fc12, DevIL-1_7_8-2_fc12, HEAD
Changes since 1.1: +11 -10 lines
File MIME type: text/x-patch
* Mon Mar  9 2009 Hans de Goede <hdegoede@redhat.com> 1.7.8-1
- Update to latest upstream: 1.7.8
1 diff -up devil-1.7.8/src-IL/include/il_endian.h~ devil-1.7.8/src-IL/include/il_endian.h
2 --- devil-1.7.8/src-IL/include/il_endian.h~ 2009-03-08 08:10:08.000000000 +0100
3 +++ devil-1.7.8/src-IL/include/il_endian.h 2009-03-09 10:11:33.000000000 +0100
4 @@ -15,6 +15,10 @@
5
6 #include "il_internal.h"
7
8 +#ifdef GCC_X86_ASM
9 +#include <byteswap.h>
10 +#endif
11 +
12 #ifdef WORDS_BIGENDIAN // This is defined by ./configure.
13 #ifndef __BIG_ENDIAN__
14 #define __BIG_ENDIAN__ 1
15 @@ -104,9 +108,7 @@ INLINE void iSwapUShort(ILushort *s) {
16 }
17 #else
18 #ifdef GCC_X86_ASM
19 - asm("ror $8,%0"
20 - : "=r" (*s)
21 - : "0" (*s));
22 + *s = __bswap_16(*s);
23 #else
24 *s = ((*s)>>8) | ((*s)<<8);
25 #endif //GCC_X86_ASM
26 @@ -127,8 +129,7 @@ INLINE void iSwapUInt(ILuint *i) {
27 }
28 #else
29 #ifdef GCC_X86_ASM
30 - asm("bswap %0;"
31 - : "+r" (*i));
32 + *i = __bswap_32(*i);
33 #else
34 *i = ((*i)>>24) | (((*i)>>8) & 0xff00) | (((*i)<<8) & 0xff0000) | ((*i)<<24);
35 #endif //GCC_X86_ASM

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2