Closed Bug 375281 Opened 17 years ago Closed 13 years ago

Autodetect 64 bit support

Categories

(NSPR :: NSPR, enhancement)

4.6.6
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: glandium, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
It would be nice if the configure script would autodetect 64 bit support and enable it by default if it is found. --disable-64bit could then be used to disable the 64bit support.

Attached is a patch that just does this. It also throws an error when 64 bit support is not present but --enable-64bit was given.
Attachment #259579 - Flags: review?(wtchang)
Perhaps "it would be nice" for mozilla browsers, but the proposed change will
break the builds of other products that depend on NSPR.  
how many of them still build 32bit binaries with 64bit toolchains ?
All of them except mozilla browsers, apparently.

USE_64 means: on platforms that can build 32b and 64b binaries, build 64b.
The default is to build 32b on such platforms.  
Assignee: wtc → mh+mozilla
Blocks: 448848
Cf. comment 3 ; I'm also going to remove it from the set of patches applied on the debian package.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
Comment on attachment 259579 [details] [diff] [review]
patch

Thank you for the patch.

>+    AC_MSG_CHECKING(for 64-bit OS)
>+    AC_TRY_COMPILE([],[int assert[(sizeof(long) == 8) ? 1: -1]],
>+        result="yes", result="no")

Just in case you use this test elsewhere, it is more portable
to test the size of a pointer.   Although true for all 64-bit
Unix platforms, 'long' is 64-bit only in the LP64 data model.
See also the HAVE_64BIT_OS test in
http://mxr.mozilla.org/mozilla-central/source/configure.in
Attachment #259579 - Flags: review?(wtc) → review-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: