Note: There are a few cases of duplicates in user autocompletion which are being worked on.

detect machine/endian.h to get endianess on BSD systems

RESOLVED FIXED in mozilla12

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: gaston, Assigned: gaston)

Tracking

Trunk
mozilla12
x86
OpenBSD
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Followup to bug #694499, endianess detection fails now on OpenBSD (and probably Net/Free too), since include/endian.h doesn't exist there. A common denominator is to include machine/endian.h, which defines _BYTE_ORDER (directly, or via another inclusion). Note that on OpenBSD, we need to include sys/types.h first.
(Assignee)

Comment 1

6 years ago
Created attachment 584993 [details] [diff] [review]
Detect and use machine/endian.h

Proposed configure.in/jscpucfg.h/config.h.in patch to check and use machine/endian.h, tested on OpenBSD, probably works on Net/Free.
Assignee: general → landry
Attachment #584993 - Flags: review?(ted.mielczarek)
It was reported on IRC that adding this patch is sufficient to get current trunk to work on OpenBSD.  Perhaps a higher priority is therefore appropriate?
Comment on attachment 584993 [details] [diff] [review]
Detect and use machine/endian.h

Review of attachment 584993 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with one style nit.

::: js/src/configure.in
@@ +2948,5 @@
>  if test "$ac_cv_header_endian_h" = yes; then
>      AC_DEFINE(JS_HAVE_ENDIAN_H)
>  fi
>  
> +MOZ_CHECK_HEADER([machine/endian.h],[AC_DEFINE(JS_HAVE_MACHINE_ENDIAN_H)],[],[#include <sys/types.h>])

Can you write this check in the same style as the surrounding checks?
Attachment #584993 - Flags: review?(ted.mielczarek) → review+
(Assignee)

Comment 4

6 years ago
Created attachment 587078 [details] [diff] [review]
Detect and use machine/endian.h

Assuming that's what you meant, here's a new one with :

MOZ_CHECK_HEADERS([machine/endian.h],[],[],[#include <sys/types.h>])
if test "$ac_cv_header_machine_endian_h" = yes; then
    AC_DEFINE(JS_HAVE_MACHINE_ENDIAN_H)
fi
Attachment #584993 - Attachment is obsolete: true
Attachment #587078 - Flags: review?(ted.mielczarek)
Comment on attachment 587078 [details] [diff] [review]
Detect and use machine/endian.h

Review of attachment 587078 [details] [diff] [review]:
-----------------------------------------------------------------

Yeah, thanks!
Attachment #587078 - Flags: review?(ted.mielczarek) → review+
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/9cfdb612a026

In the future, it'd help if you could make sure to include the bug number in the patch.  (Some people will also want the r=... in it as well.  Seeing as the reviewed version can't have that except anticipatorily, I'm happy to take 'em as they come on that point, myself.  :-) )
Status: NEW → ASSIGNED
Keywords: checkin-needed
Target Milestone: --- → mozilla12
https://hg.mozilla.org/mozilla-central/rev/9cfdb612a026
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.