Project Proposal: BSD port

Dmitri Trembovetski Dmitri.Trembovetski at Sun.COM
Tue Aug 5 23:01:21 UTC 2008



Rob Ross wrote:
> I can't comment on whether it's better to have all *nix statement 
> variants be wrapped in #ifdefs or placed in their own platform-specific 
> folder. It's probably a judgment call on whether platform-specific 
> variations are different enough to warrant their own directory structure.

   I agree, but they don't need to have different roots as they are now.

   Currently we have weird stuff similar to this:
     jdk/src/windows/native/sun/awt/windows/awt_Win32GraphicsDevice.cpp
     jdk/src/windows/classes/sun/awt/windows/Win32GraphicsDevice.java

   It seems that it could as easily be
     src/native/sun/awt/windows/awt_Win32GraphicsDevice.cpp
     src/classes/sun/awt/windows/Win32GraphicsDevice.java
     ...
   (I'd even remove 'shared')

   The native code for the most part mimics the java packages
   names, so if a package is platform-specific, it should probably
   have the platform in its name (sun.awt.windows in this case, or
   sun.awt.nix or whatever). The native code's structure would
   naturally follow the java package naming.

   For cases where the package name is the same on different
   platform but the native code is different we could follow
   Kelly's approach and/or use ifdef-ing.

   I do realize that such changes would be a huge pain though.
   Especially for those of us who still need to support
   earlier releases and port fixes from one tree to another.

   Thanks,
     Dmitri



More information about the discuss mailing list