From ca2ccb29bd3cd4d9c73ca96ce02402888ac9e9af Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 28 Mar 2010 19:26:16 +0200 Subject: Merge CPU to Platform --- src/java/com/sun/gluegen/test/TestPointerBufferEndian.java | 4 ++-- src/java/com/sun/gluegen/test/TestStructAccessorEndian.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/java/com/sun/gluegen/test') diff --git a/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java b/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java index cd9e0cc..9377de7 100644 --- a/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java +++ b/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java @@ -8,12 +8,12 @@ public class TestPointerBufferEndian { public static void main (String[] args) { boolean direct = args.length>0 && args[0].equals("-direct"); boolean ok = true; - int bitsPtr = CPU.getPointerSizeInBits(); + int bitsPtr = Platform.getPointerSizeInBits(); String bitsProp = 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+"> Bits: <"+bitsPtr+"/"+bitsProp+">"); - System.out.println("CPU is: "+ (CPU.is32Bit()?"32":"64") + " bit"); + System.out.println("CPU is: "+ (Platform.is32Bit()?"32":"64") + " bit"); System.out.println("Buffer is in: "+ (BufferFactory.isLittleEndian()?"little":"big") + " endian"); PointerBuffer ptr = direct ? PointerBuffer.allocateDirect(3) : PointerBuffer.allocate(3); ptr.put(0, 0x0123456789ABCDEFL); diff --git a/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java b/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java index 53ff0ef..9d288b4 100644 --- a/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java +++ b/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java @@ -7,12 +7,12 @@ import java.nio.*; public class TestStructAccessorEndian { public static void main (String args[]) { boolean ok = true; - int bitsPtr = CPU.getPointerSizeInBits(); + int bitsPtr = Platform.getPointerSizeInBits(); String bitsProp = 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+"> Bits: <"+bitsPtr+"/"+bitsProp+">"); - System.out.println("CPU is: "+ (CPU.is32Bit()?"32":"64") + " bit"); + System.out.println("CPU is: "+ (Platform.is32Bit()?"32":"64") + " bit"); System.out.println("Buffer is in: "+ (BufferFactory.isLittleEndian()?"little":"big") + " endian"); ByteBuffer tst = BufferFactory.newDirectByteBuffer(BufferFactory.SIZEOF_LONG * 3); StructAccessor acc = new StructAccessor(tst); -- cgit v1.2.3