As nextgens is worried about anonymous contributions, I thought he might want 
to review this before I apply it.

CPUID patch
From:
yongjhen at okYcFnYIaKTYWj1K7EfA7LONeLu7Bwazdd4djTIe4eU
  Date:
Friday 16 May 2008 03:43:30
  Groups:
freenet
  Followup-To:
freenet
Message was signed with unknown key 0xB3FFA5B9.
The validity of the signature cannot be verified.
  Hi all,

This patch makes Freenet recognize Intel Pentium M, Core, and Core 2 as
Pentium 4 compatible, and load corresponding native BigInteger library.
Tested on my laptop with Core CPU.

<patch>
--- freenet/src/freenet/support/CPUInformation/CPUID.java.orig
2008-04-23 15:24:19.000000000 +0800
+++ freenet/src/freenet/support/CPUInformation/CPUID.java
2008-05-16 10:35:55.000000000 +0800
@@ -280,7 +280,10 @@
                }
                public boolean IsPentium4Compatible()
                {
-                       return getCPUFamily() >= 15;
+                       int family = getCPUFamily();
+                       int model = getCPUModel();
+                       return (family >= 15 ||
+                               (family == 6 && (model == 9 || model
>=13)));
                }
                public String getCPUModelString() throws
UnknownCPUException {
                        if(getCPUFamily() == 4){
</patch>

Cheers!

--
FMS:      yongjhen at okYcFnYIaKTYWj1K7EfA7LONeLu7Bwazdd4djTIe4eU
Freemail: yongjhen at alqualonde.freemail
PGP fingerprint: 88B6 7F21 38E1 01E6 CF3E B1AD 31CC C1F2 B3FF A5B9


  End of signed message
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080517/c95a9f6b/attachment.pgp>

Reply via email to