Automatically detect whether we are on 32-bit or 64-bit architecture,
instead of setting a manual config flag (thanks mmmpork for pointing this out!)
Patch by <user name="fu"> and <user name="pauamma">.
diffs (35 lines):
diff -r bfb304746e81 -r d9e05e2ed2ea cgi-bin/ljdefaults.pl
--- a/cgi-bin/ljdefaults.pl Fri Feb 04 15:59:39 2011 +0800
+++ b/cgi-bin/ljdefaults.pl Fri Feb 04 14:53:34 2011 +0800
@@ -191,6 +191,17 @@ no strict "vars";
# Default to allow all reproxying.
%REPROXY_DISABLE = () unless %REPROXY_DISABLE;
+
+ # detect whether we are running on 32-bit architecture
+ my $arch = ( length(pack "L!", 0) == 4 ) ? 1 : 0;
+ if ( defined $ARCH32 ) {
+ die "Can't have ARCH32 set to false on a 32-bit architecture" if
$ARCH32 <
+ $arch;
+ } else {
+ $ARCH32 = $arch;
+ }
+
+
# setup default minimal style information
$MINIMAL_USERAGENT{$_} ||= 1 foreach qw(Links Lynx w BlackBerry WebTV); #
w is for w3m
$MINIMAL_BML_SCHEME ||= 'lynx';
diff -r bfb304746e81 -r d9e05e2ed2ea doc/config-private.pl.txt
--- a/doc/config-private.pl.txt Fri Feb 04 15:59:39 2011 +0800
+++ b/doc/config-private.pl.txt Fri Feb 04 14:53:34 2011 +0800
@@ -51,8 +51,8 @@
},
);
- # 32 vs 64 bit arch. By default everything goes to a 64 bit arch.
Uncomment
- # to enable 32 bit arch support.
+ # 32 vs 64 bit arch. By default everything goes to a 64 bit arch.
+ # Automatically detected. Uncomment to force 32 bit arch support.
#
# WARNING: This must be set prior to setting up your site. If you change
it
# later on a running site, things may go badly for you.
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog