diff options
author | sg215889 <[email protected]> | 2009-07-28 17:23:24 -0700 |
---|---|---|
committer | sg215889 <[email protected]> | 2009-07-28 17:23:24 -0700 |
commit | f607cdf272dffbd45e6389c5715a9596e85c2a90 (patch) | |
tree | efb871ce63d67ba4c741c863135cad82fb9a1a7a /src/java/com/sun/gluegen/test | |
parent | 53b16f758e0db510db420fabe6793e7921a9c407 (diff) |
Fix: Add sun.arch.data.model to determine 32bit arch
Diffstat (limited to 'src/java/com/sun/gluegen/test')
-rw-r--r-- | src/java/com/sun/gluegen/test/TestPointerBufferEndian.java | 3 | ||||
-rw-r--r-- | src/java/com/sun/gluegen/test/TestStructAccessorEndian.java | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java b/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java index 1c180bd..cd375af 100644 --- a/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java +++ b/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java @@ -8,9 +8,10 @@ public class TestPointerBufferEndian { public static void main (String[] args) { boolean direct = args.length>0 && args[0].equals("-direct"); boolean ok = true; + String bits = System.getProperty("sun.arch.data.model"); String os = System.getProperty("os.name"); String cpu = System.getProperty("os.arch"); - System.out.println("OS: <"+os+"> CPU: <"+cpu+">"); + System.out.println("OS: <"+os+"> CPU: <"+cpu+"> Bits: <"+bits+">"); System.out.println("CPU is: "+ (CPU.is32Bit()?"32":"64") + " bit"); System.out.println("Buffer is in: "+ (BufferFactory.isLittleEndian()?"little":"big") + " endian"); PointerBuffer ptr = direct ? PointerBuffer.allocateDirect(3) : PointerBuffer.allocate(3); diff --git a/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java b/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java index 4f05256..fa28cb6 100644 --- a/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java +++ b/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java @@ -7,9 +7,10 @@ import java.nio.*; public class TestStructAccessorEndian { public static void main (String args[]) { boolean ok = true; + String bits = System.getProperty("sun.arch.data.model"); String os = System.getProperty("os.name"); String cpu = System.getProperty("os.arch"); - System.out.println("OS: <"+os+"> CPU: <"+cpu+">"); + System.out.println("OS: <"+os+"> CPU: <"+cpu+"> Bits: <"+bits+">"); System.out.println("CPU is: "+ (CPU.is32Bit()?"32":"64") + " bit"); System.out.println("Buffer is in: "+ (BufferFactory.isLittleEndian()?"little":"big") + " endian"); ByteBuffer tst = BufferFactory.newDirectByteBuffer(BufferFactory.SIZEOF_LONG * 3); |