Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy Wall committed Jul 11, 2011
1 parent 46dac82 commit 00c7924
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Release 3.3.x
Features
--------
* linux/ppc 32-bit support
* linux multi-arch support (kohsuke)

Bug Fixes
--------
Expand Down
14 changes: 7 additions & 7 deletions src/com/sun/jna/NativeLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -627,12 +627,12 @@ static double parseVersion(String ver) {
// Search first for an arch specific path if one exists, but always
// include the generic paths if they exist.
// NOTES (wmeissner):
// Some older linux amd64 distros did not have /usr/lib64, and 32bit
// distros only have /usr/lib. FreeBSD also only has /usr/lib by
// default, with /usr/lib32 for 32bit compat.
// Solaris seems to have both, but defaults to 32bit userland even on
// 64bit machines, so we have to explicitly search the 64bit one when
// running a 64bit JVM.
// Some older linux amd64 distros did not have /usr/lib64, and
// 32bit distros only have /usr/lib. FreeBSD also only has
// /usr/lib by default, with /usr/lib32 for 32bit compat.
// Solaris seems to have both, but defaults to 32bit userland even
// on 64bit machines, so we have to explicitly search the 64bit
// one when running a 64bit JVM.
//
if (Platform.isLinux() || Platform.isSolaris() || Platform.isFreeBSD()) {
// Linux & FreeBSD use /usr/lib32, solaris uses /usr/lib/32
Expand Down Expand Up @@ -661,7 +661,7 @@ static double parseVersion(String ver) {
cpu = (Platform.is64Bit() ? "powerpc64" : "powerpc");
} else if (Platform.isARM()) {
cpu = "arm";
libc = "gnueabi";
libc = "gnueabi";
}

String multiArchPath =
Expand Down
13 changes: 8 additions & 5 deletions src/com/sun/jna/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,10 @@ public static final boolean is64Bit() {
public static final boolean isIntel() {
String arch =
System.getProperty("os.arch").toLowerCase().trim();
if (arch.equals("i386") ||
arch.equals("x86_64") ||
arch.equals("amd64")) {
if (arch.equals("i386")
|| arch.equals("x86")
|| arch.equals("x86_64")
|| arch.equals("amd64")) {
return true;
} else {
return false;
Expand All @@ -112,8 +113,10 @@ public static final boolean isIntel() {
public static final boolean isPPC() {
String arch =
System.getProperty("os.arch").toLowerCase().trim();
if (arch.equals("ppc") ||
arch.equals("ppc64")) {
if (arch.equals("ppc")
|| arch.equals("ppc64")
|| arch.equals("powerpc")
|| arch.equals("powerpc64")) {
return true;
} else {
return false;
Expand Down

0 comments on commit 00c7924

Please sign in to comment.