openbsd-ports/www/fennec/patches/patch-js_src_jscpucfg_h
2012-02-20 20:21:43 +00:00

30 lines
923 B
Plaintext

$OpenBSD: patch-js_src_jscpucfg_h,v 1.1 2012/02/20 20:21:43 landry Exp $
https://bugzilla.mozilla.org/show_bug.cgi?id=714312
https://hg.mozilla.org/mozilla-central/rev/9cfdb612a026
--- js/src/jscpucfg.h.orig Wed Jan 11 18:14:47 2012
+++ js/src/jscpucfg.h Sat Jan 14 20:54:47 2012
@@ -92,6 +92,23 @@
#error "endian.h does not define __BYTE_ORDER. Cannot determine endianness."
#endif
+/* BSDs */
+#elif defined(JS_HAVE_MACHINE_ENDIAN_H)
+# include <sys/types.h>
+# include <machine/endian.h>
+
+# if defined(_BYTE_ORDER)
+# if _BYTE_ORDER == _LITTLE_ENDIAN
+# define IS_LITTLE_ENDIAN 1
+# undef IS_BIG_ENDIAN
+# elif _BYTE_ORDER == _BIG_ENDIAN
+# undef IS_LITTLE_ENDIAN
+# define IS_BIG_ENDIAN 1
+# endif
+# else /* !defined(_BYTE_ORDER) */
+# error "machine/endian.h does not define _BYTE_ORDER. Cannot determine endianness."
+# endif
+
#elif defined(JS_HAVE_SYS_ISA_DEFS_H)
#include <sys/isa_defs.h>