]> git.pld-linux.org Git - packages/rdesktop.git/blame - rdesktop-endian.patch
- use glibc endian detection to fix sparc compilation
[packages/rdesktop.git] / rdesktop-endian.patch
CommitLineData
6c7d0fa3
AM
1diff -urN rdesktop-1.0.0.org/rdesktop.h rdesktop-1.0.0/rdesktop.h
2--- rdesktop-1.0.0.org/rdesktop.h Tue May 8 22:40:12 2001
3+++ rdesktop-1.0.0/rdesktop.h Tue May 8 22:44:44 2001
4@@ -31,6 +31,7 @@
5
6 #include <stdio.h>
7 #include <string.h>
8+#include <endian.h>
9
10 #define VERSION "1.0.0-pl19-6"
11
12@@ -38,16 +39,13 @@
13 /*
14 * check endianess
15 */
16-
17-#if defined(__i386__) || defined(__alpha__) || defined(__vax__) || \
18- defined(_AIX)
19-#define L_ENDIAN
20-#elif defined(__sparc) || defined(__hppa) || defined(__mips) || \
21- defined(__PPC__) || defined(__m68k__)
22-#define B_ENDIAN
23+#if __BYTE_ORDER == __LITTLE_ENDIAN
24+# define L_ENDIAN
25+#elif __BYTE_ORDER == __BIG_ENDIAN
26+# define B_ENDIAN
27 #else
28 #error Unknown endianness. Edit rdesktop.h.
29-#endif
30+#endif
31
32 /*
33 * check if we need to align data
This page took 0.085914 seconds and 4 git commands to generate.