rt.jar platform dependent, generated/sun/awt/X11 files differ

Matthias Klose doko at ubuntu.com
Wed Mar 19 05:58:46 PDT 2008


Current Ubuntu packages have a platform independent package which contains files
which I did assume could be shared between architectures. Having a 25MB
architecture independent package saves ftp space and bandwith.  Unfortunately
the biggest jar (rt.jar) cannot be shared, if rt.jar is built on a 32bit
platform because the code in sun/awt/X11 is different when built on a 64bit
platform, changes look like:

diff -ur generated/sun/awt/X11/AwtGraphicsConfigData.java
../generated-amd64/sun/awt/X11/AwtGraphicsConfigData.java
--- generated/sun/awt/X11/AwtGraphicsConfigData.java    2008-03-18
18:10:00.592002777 +0100
+++ ../generated-amd64/sun/awt/X11/AwtGraphicsConfigData.java   2008-03-18
15:46:02.171694000 +0100
@@ -8,7 +8,7 @@
 public class AwtGraphicsConfigData extends XWrapperBase {
        private Unsafe unsafe = XlibWrapper.unsafe;
        private final boolean should_free_memory;
-       public static int getSize() { return 92; }
+       public static int getSize() { return ((XlibWrapper.dataModel ==
32)?(92):(160)); }
        public int getDataSize() { return getSize(); }

        long pData;


It looks like the amd64 build is supposed to be used for a 32bit runtime as
well.  Is there a reason not to use the same general code on any platform and to
make rt.jar architecture independent? The affected classes are:

sun/awt/X11/AwtGraphicsConfigData.class
sun/awt/X11/AwtScreenData.class
sun/awt/X11/ColorData.class
sun/awt/X11/Depth.class
sun/awt/X11/PropMwmHints.class
sun/awt/X11/Screen.class
sun/awt/X11/Visual.class
sun/awt/X11/XAnyEvent.class
sun/awt/X11/XButtonEvent.class
sun/awt/X11/XCirculateEvent.class
sun/awt/X11/XCirculateRequestEvent.class
sun/awt/X11/XClientMessageEvent.class
sun/awt/X11/XColor.class
sun/awt/X11/XColormapEvent.class
sun/awt/X11/XConfigureEvent.class
sun/awt/X11/XConfigureRequestEvent.class
sun/awt/X11/XCreateWindowEvent.class
sun/awt/X11/XCrossingEvent.class
sun/awt/X11/XDestroyWindowEvent.class
sun/awt/X11/XErrorEvent.class
sun/awt/X11/XEvent.class
sun/awt/X11/XExposeEvent.class
sun/awt/X11/XExtData.class
sun/awt/X11/XFocusChangeEvent.class
sun/awt/X11/XGraphicsExposeEvent.class
sun/awt/X11/XGravityEvent.class
sun/awt/X11/XKeyEvent.class
sun/awt/X11/XKeymapEvent.class
sun/awt/X11/XMapEvent.class
sun/awt/X11/XMapRequestEvent.class
sun/awt/X11/XMappingEvent.class
sun/awt/X11/XModifierKeymap.class
sun/awt/X11/XMotionEvent.class
sun/awt/X11/XNoExposeEvent.class
sun/awt/X11/XPropertyEvent.class
sun/awt/X11/XReparentEvent.class
sun/awt/X11/XResizeRequestEvent.class
sun/awt/X11/XSelectionClearEvent.class
sun/awt/X11/XSelectionEvent.class
sun/awt/X11/XSelectionRequestEvent.class
sun/awt/X11/XSetWindowAttributes.class
sun/awt/X11/XSizeHints.class
sun/awt/X11/XUnmapEvent.class
sun/awt/X11/XVisibilityEvent.class
sun/awt/X11/XVisualInfo.class
sun/awt/X11/XWMHints.class
sun/awt/X11/XWindowAttributes.class
sun/awt/X11/awtImageData.class



More information about the distro-pkg-dev mailing list