<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Use BYTE_ORDER to determine byte order"
href="https://bugs.freedesktop.org/show_bug.cgi?id=94570#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Use BYTE_ORDER to determine byte order"
href="https://bugs.freedesktop.org/show_bug.cgi?id=94570">bug 94570</a>
from <span class="vcard"><a class="email" href="mailto:eblima@gmail.com" title="Eduardo Lima (Etrunko) <eblima@gmail.com>"> <span class="fn">Eduardo Lima (Etrunko)</span></a>
</span></b>
<pre>--- spice/macros.h.orig Thu Mar 10 15:14:49 2016
+++ spice/macros.h Wed Mar 16 14:18:03 2016
@@ -381,6 +381,17 @@
#define SPICE_ENDIAN_BIG 1234
#define SPICE_ENDIAN_PDP 2143
+/* Lets see if we can use a standard header first... */
+#if defined(BYTE_ORDER) && defined(LITTLE_ENDIAN) \
+ && defined(BIG_ENDIAN)
+# include <machine/endian.h>
+# if BYTE_ORDER == LITTLE_ENDIAN
+# define SPICE_ENDIAN SPICE_ENDIAN_LITTLE
+# elif BYTE_ORDER == BIG_ENDIAN
+# define SPICE_ENDIAN SPICE_ENDIAN_BIG
+# endif
+#endif
+
So, instead of relying on those defined macros to include that header, why
don't you check for it in configure.ac with AC_CHECK_HEADERS macro?
You would end with something like:
#if HAVE_MACHINE_ENDIAN_H
#include <machine/endian.h>
...
#endif</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>