changeset 5116:d45bc4307996

7113349: Initial changeset for Macosx port to jdk Reviewed-by: jjh, alanb, dholmes, anthony, ohrstrom, ksrini, jrose, weijun, smarks Contributed-by: Alan Bateman <alan.bateman@oracle.com>, Alexander Potochkin <alexander.potochkin@oracle.com>, Alexander Zuev <alexander.zuev@oracle.com>, Andrew Brygin <andrew.brygin@oracle.com>, Artem Ananiev <artem.ananiev@oracle.com>, Alex Strange <astrange@apple.com>, Bino George <bino@apple.com>, Christine Lu <christine.lu@oracle.com>, David Katleman <david.katleman@oracle.com>, David Durrence <david_durrence@apple.com>, Dmitry Cherepanov <dmitry.cherepanov@oracle.com>, Greg Lewis <glewis@eyesbeyond.com>, Kevin Miller <kevin_m_miller@apple.com>, Kurt Miller <kurt@intricatesoftware.com>, Landon Fuller <landonf@plausiblelabs.com>, Leonid Romanov <leonid.romanov@oracle.com>, Loefty Walkowiak <loefty@apple.com>, Mark Reinhold <mark.reinhold@oracle.com>, Naoto Sato <naoto.sato@oracle.com>, Philip Race <philip.race@oracle.com>, Roger Hoover <rhoover@apple.com>, Scott Kovatch <scott.kovatch@oracle.com>, Sergey ByloKhov <sergey.bylokhov@oracle.com>, Mike Swingler <swingler@apple.com>, Tomas Hurka <tomas.hurka@oracle.com>
author michaelm
date Tue, 06 Mar 2012 20:34:38 +0000
parents 26ed9a64a318
children e8438dc196bb
files .hgignore make/Makefile make/apple/Makefile make/apple/applescript/Makefile make/com/Makefile make/com/apple/Makefile make/com/apple/osx/Makefile make/com/apple/osxui/Makefile make/com/sun/java/pack/Makefile make/com/sun/nio/Makefile make/com/sun/security/auth/module/Makefile make/com/sun/tools/attach/Exportedfiles.gmk make/com/sun/tools/attach/FILES_c.gmk make/com/sun/tools/attach/FILES_java.gmk make/com/sun/tools/attach/Makefile make/com/sun/tools/attach/mapfile-bsd make/common/Defs-linux.gmk make/common/Defs-macosx.gmk make/common/Defs-solaris.gmk make/common/Defs.gmk make/common/Library.gmk make/common/Program.gmk make/common/Release-macosx.gmk make/common/Release.gmk make/common/Rules.gmk make/common/internal/NativeCompileRules.gmk make/common/shared/Compiler-llvm.gmk make/common/shared/Defs-java.gmk make/common/shared/Defs-macosx.gmk make/common/shared/Defs-utils.gmk make/common/shared/Defs-versions.gmk make/common/shared/Defs.gmk make/common/shared/Platform.gmk make/common/shared/Sanity.gmk make/docs/Makefile make/docs/NON_CORE_PKGS.gmk make/java/Makefile make/java/fdlibm/Makefile make/java/instrument/Makefile make/java/java/Makefile make/java/java/genlocales.gmk make/java/java/localegen.sh make/java/java_hprof_demo/Makefile make/java/jli/Makefile make/java/jobjc/Makefile make/java/jvm/Makefile make/java/management/Makefile make/java/net/FILES_c.gmk make/java/net/Makefile make/java/nio/Makefile make/java/nio/mapfile-bsd make/java/npt/Makefile make/java/redist/Makefile make/java/redist/sajdi/Makefile make/java/security/Makefile make/java/zip/FILES_c.gmk make/java/zip/Makefile make/javax/sound/FILES_c.gmk make/javax/sound/Makefile make/javax/sound/SoundDefs.gmk make/jpda/back/Makefile make/jpda/transport/socket/Makefile make/jprt.properties make/launchers/Makefile.launcher make/mkdemo/jvmti/hprof/Makefile make/mksample/Makefile make/netbeans/common/architectures/name-Bsd.properties make/sun/Makefile make/sun/awt/FILES_c_macosx.gmk make/sun/awt/FILES_export_macosx.gmk make/sun/awt/Makefile make/sun/awt/mapfile-vers-bsd make/sun/awt/mawt.gmk make/sun/cmm/lcms/Makefile make/sun/font/Makefile make/sun/headless/Makefile make/sun/image/generic/Makefile make/sun/image/vis/Makefile make/sun/jawt/Makefile make/sun/jdga/Makefile make/sun/lwawt/FILES_c_macosx.gmk make/sun/lwawt/FILES_export_macosx.gmk make/sun/lwawt/Makefile make/sun/osxapp/Makefile make/sun/rmi/rmi/mapfile-vers make/sun/security/jgss/wrapper/Makefile make/sun/security/krb5/Makefile make/sun/security/pkcs11/Makefile make/sun/security/smartcardio/Makefile make/sun/splashscreen/FILES_c.gmk make/sun/splashscreen/Makefile make/sun/tracing/dtrace/Makefile make/sun/xawt/Makefile make/tools/freetypecheck/Makefile make/tools/reorder/Makefile make/tools/sharing/classlist.macosx src/bsd/doc/man/DO_NOT_EDIT--GENERATED_FILES src/bsd/doc/man/appletviewer.1 src/bsd/doc/man/apt.1 src/bsd/doc/man/extcheck.1 src/bsd/doc/man/idlj.1 src/bsd/doc/man/ja/appletviewer.1 src/bsd/doc/man/ja/apt.1 src/bsd/doc/man/ja/extcheck.1 src/bsd/doc/man/ja/idlj.1 src/bsd/doc/man/ja/jar.1 src/bsd/doc/man/ja/jarsigner.1 src/bsd/doc/man/ja/java.1 src/bsd/doc/man/ja/javac.1 src/bsd/doc/man/ja/javadoc.1 src/bsd/doc/man/ja/javah.1 src/bsd/doc/man/ja/javap.1 src/bsd/doc/man/ja/javaws.1 src/bsd/doc/man/ja/jconsole.1 src/bsd/doc/man/ja/jdb.1 src/bsd/doc/man/ja/jhat.1 src/bsd/doc/man/ja/jinfo.1 src/bsd/doc/man/ja/jmap.1 src/bsd/doc/man/ja/jps.1 src/bsd/doc/man/ja/jrunscript.1 src/bsd/doc/man/ja/jsadebugd.1 src/bsd/doc/man/ja/jstack.1 src/bsd/doc/man/ja/jstat.1 src/bsd/doc/man/ja/jstatd.1 src/bsd/doc/man/ja/keytool.1 src/bsd/doc/man/ja/kinit.1 src/bsd/doc/man/ja/klist.1 src/bsd/doc/man/ja/ktab.1 src/bsd/doc/man/ja/native2ascii.1 src/bsd/doc/man/ja/orbd.1 src/bsd/doc/man/ja/pack200.1 src/bsd/doc/man/ja/policytool.1 src/bsd/doc/man/ja/rmic.1 src/bsd/doc/man/ja/rmid.1 src/bsd/doc/man/ja/rmiregistry.1 src/bsd/doc/man/ja/schemagen.1 src/bsd/doc/man/ja/serialver.1 src/bsd/doc/man/ja/servertool.1 src/bsd/doc/man/ja/tnameserv.1 src/bsd/doc/man/ja/unpack200.1 src/bsd/doc/man/ja/wsgen.1 src/bsd/doc/man/ja/wsimport.1 src/bsd/doc/man/ja/xjc.1 src/bsd/doc/man/jar.1 src/bsd/doc/man/jarsigner.1 src/bsd/doc/man/java.1 src/bsd/doc/man/javac.1 src/bsd/doc/man/javadoc.1 src/bsd/doc/man/javah.1 src/bsd/doc/man/javap.1 src/bsd/doc/man/javaws.1 src/bsd/doc/man/jconsole.1 src/bsd/doc/man/jdb.1 src/bsd/doc/man/jhat.1 src/bsd/doc/man/jinfo.1 src/bsd/doc/man/jmap.1 src/bsd/doc/man/jps.1 src/bsd/doc/man/jrunscript.1 src/bsd/doc/man/jsadebugd.1 src/bsd/doc/man/jstack.1 src/bsd/doc/man/jstat.1 src/bsd/doc/man/jstatd.1 src/bsd/doc/man/keytool.1 src/bsd/doc/man/native2ascii.1 src/bsd/doc/man/orbd.1 src/bsd/doc/man/pack200.1 src/bsd/doc/man/policytool.1 src/bsd/doc/man/rmic.1 src/bsd/doc/man/rmid.1 src/bsd/doc/man/rmiregistry.1 src/bsd/doc/man/schemagen.1 src/bsd/doc/man/serialver.1 src/bsd/doc/man/servertool.1 src/bsd/doc/man/tnameserv.1 src/bsd/doc/man/unpack200.1 src/bsd/doc/man/wsgen.1 src/bsd/doc/man/wsimport.1 src/bsd/doc/man/xjc.1 src/macosx/bin/amd64/jvm.cfg src/macosx/bin/java_md_macosx.c src/macosx/bin/java_md_macosx.h src/macosx/bin/jexec.c src/macosx/bundle/JDK-Info.plist src/macosx/bundle/JRE-Info.plist src/macosx/bundle/JavaAppLauncher/JavaAppLauncher.xcodeproj/project.pbxproj src/macosx/bundle/JavaAppLauncher/resources/English.lproj/InfoPlist.strings src/macosx/bundle/JavaAppLauncher/resources/JavaAppLauncher-Info.plist src/macosx/bundle/JavaAppLauncher/src/JVMArgs.h src/macosx/bundle/JavaAppLauncher/src/JVMArgs.m src/macosx/bundle/JavaAppLauncher/src/JavaAppLauncher.h src/macosx/bundle/JavaAppLauncher/src/JavaAppLauncher.m src/macosx/bundle/JavaAppLauncher/src/JavaAppLauncher_Prefix.pch src/macosx/bundle/JavaAppLauncher/src/main.m src/macosx/classes/apple/applescript/AppleScriptEngine.java src/macosx/classes/apple/applescript/AppleScriptEngineFactory.java src/macosx/classes/apple/laf/AquaLookAndFeel.java src/macosx/classes/apple/laf/JRSUIConstants.java src/macosx/classes/apple/laf/JRSUIControl.java src/macosx/classes/apple/laf/JRSUIFocus.java src/macosx/classes/apple/laf/JRSUIState.java src/macosx/classes/apple/laf/JRSUIStateFactory.java src/macosx/classes/apple/laf/JRSUIUtils.java src/macosx/classes/apple/launcher/JavaAppLauncher.java src/macosx/classes/apple/launcher/appLauncherErrors.properties src/macosx/classes/apple/security/AppleProvider.java src/macosx/classes/apple/security/KeychainStore.java src/macosx/classes/com/apple/concurrent/Dispatch.java src/macosx/classes/com/apple/concurrent/LibDispatchConcurrentQueue.java src/macosx/classes/com/apple/concurrent/LibDispatchMainQueue.java src/macosx/classes/com/apple/concurrent/LibDispatchNative.java src/macosx/classes/com/apple/concurrent/LibDispatchQueue.java src/macosx/classes/com/apple/concurrent/LibDispatchRetainedResource.java src/macosx/classes/com/apple/concurrent/LibDispatchSerialQueue.java src/macosx/classes/com/apple/concurrent/package.html src/macosx/classes/com/apple/eawt/AboutHandler.java src/macosx/classes/com/apple/eawt/AppEvent.java src/macosx/classes/com/apple/eawt/AppEventListener.java src/macosx/classes/com/apple/eawt/AppForegroundListener.java src/macosx/classes/com/apple/eawt/AppHiddenListener.java src/macosx/classes/com/apple/eawt/AppReOpenedListener.java src/macosx/classes/com/apple/eawt/Application.java src/macosx/classes/com/apple/eawt/ApplicationAdapter.java src/macosx/classes/com/apple/eawt/ApplicationBeanInfo.java src/macosx/classes/com/apple/eawt/ApplicationEvent.java src/macosx/classes/com/apple/eawt/ApplicationListener.java src/macosx/classes/com/apple/eawt/FullScreenAdapter.java src/macosx/classes/com/apple/eawt/FullScreenHandler.java src/macosx/classes/com/apple/eawt/FullScreenListener.java src/macosx/classes/com/apple/eawt/FullScreenUtilities.java src/macosx/classes/com/apple/eawt/OpenFilesHandler.java src/macosx/classes/com/apple/eawt/OpenURIHandler.java src/macosx/classes/com/apple/eawt/PreferencesHandler.java src/macosx/classes/com/apple/eawt/PrintFilesHandler.java src/macosx/classes/com/apple/eawt/QuitHandler.java src/macosx/classes/com/apple/eawt/QuitResponse.java src/macosx/classes/com/apple/eawt/QuitStrategy.java src/macosx/classes/com/apple/eawt/ScreenSleepListener.java src/macosx/classes/com/apple/eawt/SystemSleepListener.java src/macosx/classes/com/apple/eawt/UserSessionListener.java src/macosx/classes/com/apple/eawt/_AppDockIconHandler.java src/macosx/classes/com/apple/eawt/_AppEventHandler.java src/macosx/classes/com/apple/eawt/_AppEventLegacyHandler.java src/macosx/classes/com/apple/eawt/_AppMenuBarHandler.java src/macosx/classes/com/apple/eawt/_AppMiscHandlers.java src/macosx/classes/com/apple/eawt/event/GestureAdapter.java src/macosx/classes/com/apple/eawt/event/GestureEvent.java src/macosx/classes/com/apple/eawt/event/GestureHandler.java src/macosx/classes/com/apple/eawt/event/GestureListener.java src/macosx/classes/com/apple/eawt/event/GesturePhaseEvent.java src/macosx/classes/com/apple/eawt/event/GesturePhaseListener.java src/macosx/classes/com/apple/eawt/event/GestureUtilities.java src/macosx/classes/com/apple/eawt/event/MagnificationEvent.java src/macosx/classes/com/apple/eawt/event/MagnificationListener.java src/macosx/classes/com/apple/eawt/event/RotationEvent.java src/macosx/classes/com/apple/eawt/event/RotationListener.java src/macosx/classes/com/apple/eawt/event/SwipeEvent.java src/macosx/classes/com/apple/eawt/event/SwipeListener.java src/macosx/classes/com/apple/eawt/event/package.html src/macosx/classes/com/apple/eawt/package.html src/macosx/classes/com/apple/eio/FileManager.java src/macosx/classes/com/apple/eio/package.html src/macosx/classes/com/apple/laf/AquaBorder.java src/macosx/classes/com/apple/laf/AquaButtonBorder.java src/macosx/classes/com/apple/laf/AquaButtonCheckBoxUI.java src/macosx/classes/com/apple/laf/AquaButtonExtendedTypes.java src/macosx/classes/com/apple/laf/AquaButtonLabeledUI.java src/macosx/classes/com/apple/laf/AquaButtonRadioUI.java src/macosx/classes/com/apple/laf/AquaButtonToggleUI.java src/macosx/classes/com/apple/laf/AquaButtonUI.java src/macosx/classes/com/apple/laf/AquaCaret.java src/macosx/classes/com/apple/laf/AquaComboBoxButton.java src/macosx/classes/com/apple/laf/AquaComboBoxPopup.java src/macosx/classes/com/apple/laf/AquaComboBoxRenderer.java src/macosx/classes/com/apple/laf/AquaComboBoxUI.java src/macosx/classes/com/apple/laf/AquaEditorPaneUI.java src/macosx/classes/com/apple/laf/AquaFileChooserUI.java src/macosx/classes/com/apple/laf/AquaFileSystemModel.java src/macosx/classes/com/apple/laf/AquaFileView.java src/macosx/classes/com/apple/laf/AquaFocus.java src/macosx/classes/com/apple/laf/AquaFocusHandler.java src/macosx/classes/com/apple/laf/AquaFonts.java src/macosx/classes/com/apple/laf/AquaGroupBorder.java src/macosx/classes/com/apple/laf/AquaHighlighter.java src/macosx/classes/com/apple/laf/AquaIcon.java src/macosx/classes/com/apple/laf/AquaImageFactory.java src/macosx/classes/com/apple/laf/AquaInternalFrameBorder.java src/macosx/classes/com/apple/laf/AquaInternalFrameBorderMetrics.java src/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java src/macosx/classes/com/apple/laf/AquaInternalFrameManager.java src/macosx/classes/com/apple/laf/AquaInternalFramePaneUI.java src/macosx/classes/com/apple/laf/AquaInternalFrameUI.java src/macosx/classes/com/apple/laf/AquaKeyBindings.java src/macosx/classes/com/apple/laf/AquaLabelUI.java src/macosx/classes/com/apple/laf/AquaListUI.java src/macosx/classes/com/apple/laf/AquaLookAndFeel.java src/macosx/classes/com/apple/laf/AquaMenuBarBorder.java src/macosx/classes/com/apple/laf/AquaMenuBarUI.java src/macosx/classes/com/apple/laf/AquaMenuBorder.java src/macosx/classes/com/apple/laf/AquaMenuItemUI.java src/macosx/classes/com/apple/laf/AquaMenuPainter.java src/macosx/classes/com/apple/laf/AquaMenuUI.java src/macosx/classes/com/apple/laf/AquaMnemonicHandler.java src/macosx/classes/com/apple/laf/AquaNativeResources.java src/macosx/classes/com/apple/laf/AquaOptionPaneUI.java src/macosx/classes/com/apple/laf/AquaPainter.java src/macosx/classes/com/apple/laf/AquaPanelUI.java src/macosx/classes/com/apple/laf/AquaPopupMenuSeparatorUI.java src/macosx/classes/com/apple/laf/AquaPopupMenuUI.java src/macosx/classes/com/apple/laf/AquaProgressBarUI.java src/macosx/classes/com/apple/laf/AquaRootPaneUI.java src/macosx/classes/com/apple/laf/AquaScrollBarUI.java src/macosx/classes/com/apple/laf/AquaScrollPaneUI.java src/macosx/classes/com/apple/laf/AquaScrollRegionBorder.java src/macosx/classes/com/apple/laf/AquaSliderUI.java src/macosx/classes/com/apple/laf/AquaSpinnerUI.java src/macosx/classes/com/apple/laf/AquaSplitPaneDividerUI.java src/macosx/classes/com/apple/laf/AquaSplitPaneUI.java src/macosx/classes/com/apple/laf/AquaTabbedPaneContrastUI.java src/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java src/macosx/classes/com/apple/laf/AquaTabbedPaneTabState.java src/macosx/classes/com/apple/laf/AquaTabbedPaneUI.java src/macosx/classes/com/apple/laf/AquaTableHeaderBorder.java src/macosx/classes/com/apple/laf/AquaTableHeaderUI.java src/macosx/classes/com/apple/laf/AquaTableUI.java src/macosx/classes/com/apple/laf/AquaTextAreaUI.java src/macosx/classes/com/apple/laf/AquaTextFieldBorder.java src/macosx/classes/com/apple/laf/AquaTextFieldFormattedUI.java src/macosx/classes/com/apple/laf/AquaTextFieldSearch.java src/macosx/classes/com/apple/laf/AquaTextFieldUI.java src/macosx/classes/com/apple/laf/AquaTextPaneUI.java src/macosx/classes/com/apple/laf/AquaTextPasswordFieldUI.java src/macosx/classes/com/apple/laf/AquaToolBarSeparatorUI.java src/macosx/classes/com/apple/laf/AquaToolBarUI.java src/macosx/classes/com/apple/laf/AquaToolTipUI.java src/macosx/classes/com/apple/laf/AquaTreeUI.java src/macosx/classes/com/apple/laf/AquaUtilControlSize.java src/macosx/classes/com/apple/laf/AquaUtils.java src/macosx/classes/com/apple/laf/ClientPropertyApplicator.java src/macosx/classes/com/apple/laf/ImageCache.java src/macosx/classes/com/apple/laf/ScreenMenu.java src/macosx/classes/com/apple/laf/ScreenMenuBar.java src/macosx/classes/com/apple/laf/ScreenMenuBarProvider.java src/macosx/classes/com/apple/laf/ScreenMenuItem.java src/macosx/classes/com/apple/laf/ScreenMenuItemCheckbox.java src/macosx/classes/com/apple/laf/ScreenMenuItemUI.java src/macosx/classes/com/apple/laf/ScreenMenuPropertyHandler.java src/macosx/classes/com/apple/laf/ScreenMenuPropertyListener.java src/macosx/classes/com/apple/laf/ScreenPopupFactory.java src/macosx/classes/com/apple/laf/resources/aqua.properties src/macosx/classes/com/apple/resources/MacOSXResourceBundle.java src/macosx/classes/java/net/DefaultInterface.java src/macosx/classes/java/util/prefs/MacOSXPreferences.java src/macosx/classes/java/util/prefs/MacOSXPreferencesFactory.java src/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java src/macosx/classes/sun/awt/CGraphicsConfig.java src/macosx/classes/sun/awt/CGraphicsDevice.java src/macosx/classes/sun/awt/CGraphicsEnvironment.java src/macosx/classes/sun/awt/FullScreenCapable.java src/macosx/classes/sun/awt/SunToolkitSubclass.java src/macosx/classes/sun/awt/fontconfigs/macosx.fontconfig.properties src/macosx/classes/sun/font/CCharToGlyphMapper.java src/macosx/classes/sun/font/CFont.java src/macosx/classes/sun/font/CFontConfiguration.java src/macosx/classes/sun/font/CFontManager.java src/macosx/classes/sun/font/CStrike.java src/macosx/classes/sun/font/CStrikeDisposer.java src/macosx/classes/sun/java2d/BackBufferCapsProvider.java src/macosx/classes/sun/java2d/CRenderer.java src/macosx/classes/sun/java2d/CompositeCRenderer.java src/macosx/classes/sun/java2d/DataBufferNIOInt.java src/macosx/classes/sun/java2d/IntegerNIORaster.java src/macosx/classes/sun/java2d/MacosxSurfaceManagerFactory.java src/macosx/classes/sun/java2d/OSXOffScreenSurfaceData.java src/macosx/classes/sun/java2d/OSXSurfaceData.java src/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java src/macosx/classes/sun/java2d/opengl/CGLLayer.java src/macosx/classes/sun/java2d/opengl/CGLSurfaceData.java src/macosx/classes/sun/java2d/opengl/CGLVolatileSurfaceManager.java src/macosx/classes/sun/lwawt/LWButtonPeer.java src/macosx/classes/sun/lwawt/LWCanvasPeer.java src/macosx/classes/sun/lwawt/LWCheckboxPeer.java src/macosx/classes/sun/lwawt/LWChoicePeer.java src/macosx/classes/sun/lwawt/LWComponentPeer.java src/macosx/classes/sun/lwawt/LWContainerPeer.java src/macosx/classes/sun/lwawt/LWCursorManager.java src/macosx/classes/sun/lwawt/LWKeyboardFocusManagerPeer.java src/macosx/classes/sun/lwawt/LWLabelPeer.java src/macosx/classes/sun/lwawt/LWListPeer.java src/macosx/classes/sun/lwawt/LWMouseInfoPeer.java src/macosx/classes/sun/lwawt/LWPanelPeer.java src/macosx/classes/sun/lwawt/LWRepaintArea.java src/macosx/classes/sun/lwawt/LWScrollBarPeer.java src/macosx/classes/sun/lwawt/LWScrollPanePeer.java src/macosx/classes/sun/lwawt/LWTextAreaPeer.java src/macosx/classes/sun/lwawt/LWTextComponentPeer.java src/macosx/classes/sun/lwawt/LWTextFieldPeer.java src/macosx/classes/sun/lwawt/LWToolkit.java src/macosx/classes/sun/lwawt/LWWindowPeer.java src/macosx/classes/sun/lwawt/PlatformComponent.java src/macosx/classes/sun/lwawt/PlatformWindow.java src/macosx/classes/sun/lwawt/SelectionClearListener.java src/macosx/classes/sun/lwawt/macosx/CAccessibility.java src/macosx/classes/sun/lwawt/macosx/CAccessible.java src/macosx/classes/sun/lwawt/macosx/CAccessibleText.java src/macosx/classes/sun/lwawt/macosx/CCheckboxMenuItem.java src/macosx/classes/sun/lwawt/macosx/CClipboard.java src/macosx/classes/sun/lwawt/macosx/CCursorManager.java src/macosx/classes/sun/lwawt/macosx/CCustomCursor.java src/macosx/classes/sun/lwawt/macosx/CDataTransferer.java src/macosx/classes/sun/lwawt/macosx/CDesktopPeer.java src/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java src/macosx/classes/sun/lwawt/macosx/CDropTarget.java src/macosx/classes/sun/lwawt/macosx/CDropTargetContextPeer.java src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java src/macosx/classes/sun/lwawt/macosx/CFRetainedResource.java src/macosx/classes/sun/lwawt/macosx/CFileDialog.java src/macosx/classes/sun/lwawt/macosx/CImage.java src/macosx/classes/sun/lwawt/macosx/CInputMethod.java src/macosx/classes/sun/lwawt/macosx/CInputMethodDescriptor.java src/macosx/classes/sun/lwawt/macosx/CMenu.java src/macosx/classes/sun/lwawt/macosx/CMenuBar.java src/macosx/classes/sun/lwawt/macosx/CMenuComponent.java src/macosx/classes/sun/lwawt/macosx/CMenuItem.java src/macosx/classes/sun/lwawt/macosx/CMouseDragGestureRecognizer.java src/macosx/classes/sun/lwawt/macosx/CMouseInfoPeer.java src/macosx/classes/sun/lwawt/macosx/CPlatformComponent.java src/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java src/macosx/classes/sun/lwawt/macosx/CPlatformView.java src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java src/macosx/classes/sun/lwawt/macosx/CPopupMenu.java src/macosx/classes/sun/lwawt/macosx/CPrinterDevice.java src/macosx/classes/sun/lwawt/macosx/CPrinterDialog.java src/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java src/macosx/classes/sun/lwawt/macosx/CPrinterGraphics.java src/macosx/classes/sun/lwawt/macosx/CPrinterGraphicsConfig.java src/macosx/classes/sun/lwawt/macosx/CPrinterJob.java src/macosx/classes/sun/lwawt/macosx/CPrinterJobDialog.java src/macosx/classes/sun/lwawt/macosx/CPrinterPageDialog.java src/macosx/classes/sun/lwawt/macosx/CPrinterSurfaceData.java src/macosx/classes/sun/lwawt/macosx/CRobot.java src/macosx/classes/sun/lwawt/macosx/CSystemTray.java src/macosx/classes/sun/lwawt/macosx/CTextPipe.java src/macosx/classes/sun/lwawt/macosx/CThreading.java src/macosx/classes/sun/lwawt/macosx/CToolkitThreadBlockedHandler.java src/macosx/classes/sun/lwawt/macosx/CTrayIcon.java src/macosx/classes/sun/lwawt/macosx/CWrapper.java src/macosx/classes/sun/lwawt/macosx/CocoaConstants.java src/macosx/classes/sun/lwawt/macosx/EventDispatchAccess.java src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java src/macosx/classes/sun/lwawt/macosx/NSPrintInfo.java src/macosx/classes/sun/lwawt/macosx/event/NSEvent.java src/macosx/classes/sun/nio/ch/DefaultSelectorProvider.java src/macosx/classes/sun/nio/ch/KQueueArrayWrapper.java src/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java src/macosx/classes/sun/nio/ch/KQueueSelectorProvider.java src/macosx/lib/Info-cmdline.plist src/macosx/lib/Info-privileged.plist src/macosx/native/apple/applescript/AS_NS_ConversionUtils.h src/macosx/native/apple/applescript/AS_NS_ConversionUtils.m src/macosx/native/apple/applescript/AppleScriptEngine.m src/macosx/native/apple/applescript/AppleScriptExecutionContext.h src/macosx/native/apple/applescript/AppleScriptExecutionContext.m src/macosx/native/apple/applescript/NS_Java_ConversionUtils.h src/macosx/native/apple/applescript/NS_Java_ConversionUtils.m src/macosx/native/apple/launcher/JavaAppLauncher.m src/macosx/native/apple/security/KeystoreImpl.m src/macosx/native/com/apple/concurrent/Dispatch.m src/macosx/native/com/apple/eio/CFileManager.m src/macosx/native/com/apple/laf/AquaFileView.m src/macosx/native/com/apple/laf/AquaLookAndFeel.m src/macosx/native/com/apple/laf/AquaNativeResources.m src/macosx/native/com/apple/laf/JRSUIConstantSync.h src/macosx/native/com/apple/laf/JRSUIConstantSync.m src/macosx/native/com/apple/laf/JRSUIController.m src/macosx/native/com/apple/laf/JRSUIFocus.m src/macosx/native/com/apple/laf/ScreenMenu.h src/macosx/native/com/apple/laf/ScreenMenu.m src/macosx/native/com/apple/laf/ScreenPopupFactory.m src/macosx/native/com/apple/resources/MacOSXResourceBundle.m src/macosx/native/com/sun/media/sound/PLATFORM_API_MacOSX_MidiIn.c src/macosx/native/com/sun/media/sound/PLATFORM_API_MacOSX_MidiOut.c src/macosx/native/com/sun/media/sound/PLATFORM_API_MacOSX_MidiUtils.c src/macosx/native/com/sun/media/sound/PLATFORM_API_MacOSX_MidiUtils.h src/macosx/native/com/sun/media/sound/PLATFORM_API_MacOSX_PCM.cpp src/macosx/native/com/sun/media/sound/PLATFORM_API_MacOSX_Ports.cpp src/macosx/native/com/sun/media/sound/PLATFORM_API_MacOSX_Utils.cpp src/macosx/native/com/sun/media/sound/PLATFORM_API_MacOSX_Utils.h src/macosx/native/java/util/MacOSXPreferencesFile.m src/macosx/native/java/util/SCDynamicStoreConfig.m src/macosx/native/jobjc/JObjC.xcodeproj/default.pbxuser src/macosx/native/jobjc/JObjC.xcodeproj/project.pbxproj src/macosx/native/jobjc/README.txt src/macosx/native/jobjc/TODOS src/macosx/native/jobjc/bridgesupport.gmk src/macosx/native/jobjc/build.xml src/macosx/native/jobjc/extract_classes.pl src/macosx/native/jobjc/run-and-write-if-okay src/macosx/native/jobjc/rungen src/macosx/native/jobjc/runjava src/macosx/native/jobjc/src/core/PrimitiveCoder.hs src/macosx/native/jobjc/src/core/java/com/apple/jobjc/CFType.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/CIF.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Coder.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/FFIType.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Function.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/ID.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Invoke.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/JObjCRuntime.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/MacOSXFramework.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NSClass.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeArgumentBuffer.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeBuffer.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeObjectLifecycleManager.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Opaque.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Pointer.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/PrimitiveCoder.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/SEL.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Struct.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Subclassing.java src/macosx/native/jobjc/src/core/native/CIF.m src/macosx/native/jobjc/src/core/native/Coder.m src/macosx/native/jobjc/src/core/native/FFIType.m src/macosx/native/jobjc/src/core/native/Function.m src/macosx/native/jobjc/src/core/native/ID.m src/macosx/native/jobjc/src/core/native/Invoke.m src/macosx/native/jobjc/src/core/native/JObjCRuntime.m src/macosx/native/jobjc/src/core/native/MacOSXFramework.m src/macosx/native/jobjc/src/core/native/NSClass.m src/macosx/native/jobjc/src/core/native/NativeBuffer.h src/macosx/native/jobjc/src/core/native/NativeBuffer.m src/macosx/native/jobjc/src/core/native/NativeObjectLifecycleManager.m src/macosx/native/jobjc/src/core/native/SEL.m src/macosx/native/jobjc/src/core/native/Subclassing.m src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/BootClassPathMinus.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/ClassConsolidator.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/ClassGenerator.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/FileCopier.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/FrameworkGenerator.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/FunctionGenerator.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/Generator.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/MethodDisambiguator.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/RestrictedKeywords.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/Utils.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/AbstractObjCClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/CFTypeClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/CategoryClassClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/CategoryClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/CopiedFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/FrameworkClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/GeneratedClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/JObjCClassClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/JObjCClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/MixedPrimitiveCoderClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/OpaqueClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/OutputFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/RootJObjCClass.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/StructClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Arg.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/CFType.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Category.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Clazz.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Constant.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Element.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/ElementWType.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Framework.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Function.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/FunctionAlias.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/InformalProtocol.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Method.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/NativeEnum.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Opaque.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/OutputFileGenerator.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Protocol.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/ReturnValue.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/StringConstant.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Struct.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/TypeElement.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/coders/CoderDescriptor.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/coders/ComplexCoderDescriptor.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/coders/PrimitiveCoderDescriptor.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/types/JType.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/types/NType.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/types/Type.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/types/TypeCache.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/types/TypeToJType.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/Fp.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/JavaLang.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/NTypeMerger.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/NTypeParser.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/NTypePrinter.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/ObjectInspector.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/QA.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/StringStream.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/StructOffsetResolver.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/StructOffsetResolverBigBang.java src/macosx/native/jobjc/src/generator/java/com/apple/jobjc/SuperClassExtractor.java src/macosx/native/jobjc/src/generator/java/com/apple/jobjc/UnsafeRuntimeAccess.java src/macosx/native/jobjc/src/runtime-additions/java/com/apple/jobjc/Utils.java src/macosx/native/jobjc/src/runtime-additions/native/NativeNumber.m src/macosx/native/jobjc/src/runtime-additions/native/NativeString.m src/macosx/native/jobjc/src/runtime-additions/native/NativeThread.m src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/BaseBench.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/BenchFunCall.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/BenchIDPop.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/BenchStructCoding.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/BenchUnsafe.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/CategoryTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/FunctionTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/GUIDemo.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/IBDemo.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/IntroTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/NSClassTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/NativeBufferTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/NativeTypeTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/PooledTestCase.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/SELTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/StructTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/SubclassingTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/TestUtils.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/UtilsTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/VarArgsTest.java src/macosx/native/jobjc/src/tests/native/FunCallBench.m src/macosx/native/sun/awt/AWTEvent.h src/macosx/native/sun/awt/AWTEvent.m src/macosx/native/sun/awt/AWTSurfaceLayers.h src/macosx/native/sun/awt/AWTSurfaceLayers.m src/macosx/native/sun/awt/AWTView.h src/macosx/native/sun/awt/AWTView.m src/macosx/native/sun/awt/AWTWindow.h src/macosx/native/sun/awt/AWTWindow.m src/macosx/native/sun/awt/ApplicationDelegate.h src/macosx/native/sun/awt/ApplicationDelegate.m src/macosx/native/sun/awt/CClipboard.h src/macosx/native/sun/awt/CClipboard.m src/macosx/native/sun/awt/CCursorManager.m src/macosx/native/sun/awt/CDataTransferer.h src/macosx/native/sun/awt/CDataTransferer.m src/macosx/native/sun/awt/CDesktopPeer.m src/macosx/native/sun/awt/CDragSource.h src/macosx/native/sun/awt/CDragSource.m src/macosx/native/sun/awt/CDragSourceContextPeer.m src/macosx/native/sun/awt/CDropTarget.h src/macosx/native/sun/awt/CDropTarget.m src/macosx/native/sun/awt/CDropTargetContextPeer.m src/macosx/native/sun/awt/CFRetainedResource.m src/macosx/native/sun/awt/CFileDialog.h src/macosx/native/sun/awt/CFileDialog.m src/macosx/native/sun/awt/CGraphicsConfig.m src/macosx/native/sun/awt/CGraphicsDevice.m src/macosx/native/sun/awt/CGraphicsEnv.m src/macosx/native/sun/awt/CImage.m src/macosx/native/sun/awt/CInputMethod.m src/macosx/native/sun/awt/CMenu.h src/macosx/native/sun/awt/CMenu.m src/macosx/native/sun/awt/CMenuBar.h src/macosx/native/sun/awt/CMenuBar.m src/macosx/native/sun/awt/CMenuComponent.h src/macosx/native/sun/awt/CMenuComponent.m src/macosx/native/sun/awt/CMenuItem.h src/macosx/native/sun/awt/CMenuItem.m src/macosx/native/sun/awt/CPopupMenu.h src/macosx/native/sun/awt/CPopupMenu.m src/macosx/native/sun/awt/CPrinterJob.m src/macosx/native/sun/awt/CRobot.m src/macosx/native/sun/awt/CSystemColors.h src/macosx/native/sun/awt/CSystemColors.m src/macosx/native/sun/awt/CTextPipe.m src/macosx/native/sun/awt/CTrayIcon.h src/macosx/native/sun/awt/CTrayIcon.m src/macosx/native/sun/awt/CWrapper.h src/macosx/native/sun/awt/CWrapper.m src/macosx/native/sun/awt/DnDUtilities.h src/macosx/native/sun/awt/DnDUtilities.m src/macosx/native/sun/awt/GeomUtilities.h src/macosx/native/sun/awt/GeomUtilities.m src/macosx/native/sun/awt/ImageSurfaceData.h src/macosx/native/sun/awt/ImageSurfaceData.m src/macosx/native/sun/awt/InitIDs.h src/macosx/native/sun/awt/InitIDs.m src/macosx/native/sun/awt/JavaAccessibilityAction.h src/macosx/native/sun/awt/JavaAccessibilityAction.m src/macosx/native/sun/awt/JavaAccessibilityUtilities.h src/macosx/native/sun/awt/JavaAccessibilityUtilities.m src/macosx/native/sun/awt/JavaComponentAccessibility.h src/macosx/native/sun/awt/JavaComponentAccessibility.m src/macosx/native/sun/awt/JavaTextAccessibility.h src/macosx/native/sun/awt/JavaTextAccessibility.m src/macosx/native/sun/awt/LWCToolkit.h src/macosx/native/sun/awt/LWCToolkit.m src/macosx/native/sun/awt/OSVersion.h src/macosx/native/sun/awt/OSVersion.m src/macosx/native/sun/awt/PrintModel.h src/macosx/native/sun/awt/PrintModel.m src/macosx/native/sun/awt/PrinterSurfaceData.h src/macosx/native/sun/awt/PrinterSurfaceData.m src/macosx/native/sun/awt/PrinterView.h src/macosx/native/sun/awt/PrinterView.m src/macosx/native/sun/awt/QuartzRenderer.m src/macosx/native/sun/awt/QuartzSurfaceData.h src/macosx/native/sun/awt/QuartzSurfaceData.m src/macosx/native/sun/awt/awt.m src/macosx/native/sun/awt/awt_DrawingSurface.m src/macosx/native/sun/awt/jawt.m src/macosx/native/sun/awt/splashscreen/splashscreen_config.h src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m src/macosx/native/sun/font/AWTFont.h src/macosx/native/sun/font/AWTFont.m src/macosx/native/sun/font/AWTStrike.h src/macosx/native/sun/font/AWTStrike.m src/macosx/native/sun/font/CCharToGlyphMapper.m src/macosx/native/sun/font/CGGlyphImages.h src/macosx/native/sun/font/CGGlyphImages.m src/macosx/native/sun/font/CGGlyphOutlines.h src/macosx/native/sun/font/CGGlyphOutlines.m src/macosx/native/sun/font/CoreTextSupport.h src/macosx/native/sun/font/CoreTextSupport.m src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.h src/macosx/native/sun/java2d/opengl/CGLGraphicsConfig.m src/macosx/native/sun/java2d/opengl/CGLLayer.h src/macosx/native/sun/java2d/opengl/CGLLayer.m src/macosx/native/sun/java2d/opengl/CGLSurfaceData.h src/macosx/native/sun/java2d/opengl/CGLSurfaceData.m src/macosx/native/sun/java2d/opengl/J2D_GL/cglext.h src/macosx/native/sun/java2d/opengl/OGLFuncs_md.h src/macosx/native/sun/nio/ch/KQueueArrayWrapper.c src/macosx/native/sun/osxapp/AWT_debug.h src/macosx/native/sun/osxapp/NSApplicationAWT.h src/macosx/native/sun/osxapp/NSApplicationAWT.m src/macosx/native/sun/osxapp/PropertiesUtilities.h src/macosx/native/sun/osxapp/PropertiesUtilities.m src/macosx/native/sun/osxapp/QueuingApplicationDelegate.h src/macosx/native/sun/osxapp/QueuingApplicationDelegate.m src/macosx/native/sun/osxapp/ThreadUtilities.h src/macosx/native/sun/osxapp/ThreadUtilities.m src/share/back/commonRef.c src/share/bin/emessages.h src/share/bin/java.c src/share/bin/java.h src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java src/share/classes/java/awt/EventDispatchThread.java src/share/classes/java/awt/GraphicsEnvironment.java src/share/classes/java/awt/KeyboardFocusManager.java src/share/classes/java/lang/Thread.java src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java src/share/classes/java/net/DatagramSocket.java src/share/classes/java/net/MulticastSocket.java src/share/classes/java/net/NetworkInterface.java src/share/classes/java/util/prefs/Preferences.java src/share/classes/javax/accessibility/AccessibleContext.java src/share/classes/javax/swing/UIManager.java src/share/classes/javax/swing/plaf/basic/BasicButtonListener.java src/share/classes/javax/swing/plaf/basic/BasicLabelUI.java src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java src/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java src/share/classes/javax/swing/plaf/basic/BasicTextUI.java src/share/classes/javax/swing/plaf/synth/SynthComboBoxUI.java src/share/classes/sun/awt/AWTAccessor.java src/share/classes/sun/awt/SunToolkit.java src/share/classes/sun/awt/image/BufImgSurfaceData.java src/share/classes/sun/font/FileFont.java src/share/classes/sun/font/FontManagerFactory.java src/share/classes/sun/font/FontUtilities.java src/share/classes/sun/font/SunFontManager.java src/share/classes/sun/java2d/SunGraphics2D.java src/share/classes/sun/java2d/opengl/OGLBlitLoops.java src/share/classes/sun/java2d/opengl/OGLRenderQueue.java src/share/classes/sun/java2d/opengl/OGLSurfaceData.java src/share/classes/sun/launcher/LauncherHelper.java src/share/classes/sun/launcher/resources/launcher.properties src/share/classes/sun/net/spi/DefaultProxySelector.java src/share/classes/sun/nio/ch/DatagramChannelImpl.java src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java src/share/classes/sun/print/PSPrinterJob.java src/share/classes/sun/print/RasterPrinterJob.java src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java src/share/classes/sun/security/krb5/Config.java src/share/classes/sun/security/krb5/Credentials.java src/share/classes/sun/security/krb5/SCDynamicStoreConfig.java src/share/classes/sun/security/smartcardio/TerminalImpl.java src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider src/share/javavm/export/jawt.h src/share/javavm/export/jvm.h src/share/lib/security/java.security-macosx src/share/native/com/sun/java/util/jar/pack/defines.h src/share/native/com/sun/java/util/jar/pack/main.cpp src/share/native/com/sun/media/sound/DirectAudioDevice.c src/share/native/com/sun/media/sound/Platform.c src/share/native/com/sun/media/sound/PlatformMidi.h src/share/native/com/sun/media/sound/SoundDefs.h src/share/native/com/sun/media/sound/Utilities.h src/share/native/common/check_code.c src/share/native/java/io/io_util.h src/share/native/java/lang/System.c src/share/native/java/lang/Thread.c src/share/native/java/lang/fdlibm/include/fdlibm.h src/share/native/java/lang/fdlibm/include/jfdlibm.h src/share/native/java/lang/java_props.h src/share/native/java/util/zip/zip_util.c src/share/native/sun/awt/debug/debug_util.h src/share/native/sun/awt/image/BufImgSurfaceData.c src/share/native/sun/awt/image/DataBufferNative.c src/share/native/sun/awt/medialib/mlib_ImageAffine.h src/share/native/sun/awt/medialib/mlib_image.h src/share/native/sun/awt/medialib/mlib_sys.c src/share/native/sun/awt/medialib/mlib_types.h src/share/native/sun/awt/splashscreen/splashscreen_impl.h src/share/native/sun/font/AccelGlyphCache.c src/share/native/sun/font/DrawGlyphList.c src/share/native/sun/font/sunFont.c src/share/native/sun/java2d/SurfaceData.c src/share/native/sun/java2d/opengl/OGLBlitLoops.c src/share/native/sun/java2d/opengl/OGLFuncs.h src/share/native/sun/java2d/opengl/OGLRenderQueue.c src/share/native/sun/java2d/opengl/OGLSurfaceData.c src/share/native/sun/java2d/opengl/OGLSurfaceData.h src/share/native/sun/java2d/opengl/OGLTextRenderer.c src/share/native/sun/nio/ch/genSocketOptionRegistry.c src/share/native/sun/security/ec/impl/ecc_impl.h src/share/native/sun/security/ec/impl/ecdecode.c src/share/native/sun/security/ec/impl/oid.c src/share/native/sun/security/ec/impl/secitem.c src/share/native/sun/security/krb5/nativeccache.c src/share/transport/socket/socketTransport.c src/solaris/back/exec_md.c src/solaris/back/linker_md.c src/solaris/back/util_md.h src/solaris/bin/java_md.h src/solaris/bin/java_md_common.c src/solaris/bin/java_md_solinux.c src/solaris/bin/java_md_solinux.h src/solaris/classes/java/lang/UNIXProcess.java.bsd src/solaris/classes/java/net/DefaultInterface.java src/solaris/classes/sun/awt/X11/XWM.java src/solaris/classes/sun/awt/fontconfigs/bsd.fontconfig.properties src/solaris/classes/sun/nio/ch/BsdAsynchronousChannelProvider.java src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java src/solaris/classes/sun/nio/ch/KQueue.java src/solaris/classes/sun/nio/ch/KQueuePort.java src/solaris/classes/sun/nio/fs/BsdFileStore.java src/solaris/classes/sun/nio/fs/BsdFileSystem.java src/solaris/classes/sun/nio/fs/BsdFileSystemProvider.java src/solaris/classes/sun/nio/fs/BsdNativeDispatcher.java src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java src/solaris/classes/sun/print/UnixPrintServiceLookup.java src/solaris/classes/sun/security/smartcardio/PlatformPCSC.java src/solaris/classes/sun/tools/attach/BsdAttachProvider.java src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java src/solaris/demo/jvmti/hprof/hprof_md.c src/solaris/javavm/export/jvm_md.h src/solaris/native/com/sun/management/MacosxOperatingSystem.c src/solaris/native/com/sun/management/UnixOperatingSystem_md.c src/solaris/native/com/sun/media/sound/PLATFORM_API_BsdOS_ALSA_CommonUtils.c src/solaris/native/com/sun/media/sound/PLATFORM_API_BsdOS_ALSA_CommonUtils.h src/solaris/native/com/sun/media/sound/PLATFORM_API_BsdOS_ALSA_MidiIn.c src/solaris/native/com/sun/media/sound/PLATFORM_API_BsdOS_ALSA_MidiOut.c src/solaris/native/com/sun/media/sound/PLATFORM_API_BsdOS_ALSA_MidiUtils.c src/solaris/native/com/sun/media/sound/PLATFORM_API_BsdOS_ALSA_MidiUtils.h src/solaris/native/com/sun/media/sound/PLATFORM_API_BsdOS_ALSA_PCM.c src/solaris/native/com/sun/media/sound/PLATFORM_API_BsdOS_ALSA_PCMUtils.c src/solaris/native/com/sun/media/sound/PLATFORM_API_BsdOS_ALSA_PCMUtils.h src/solaris/native/com/sun/media/sound/PLATFORM_API_BsdOS_ALSA_Ports.c src/solaris/native/java/io/UnixFileSystem_md.c src/solaris/native/java/io/canonicalize_md.c src/solaris/native/java/io/io_util_md.c src/solaris/native/java/lang/ProcessEnvironment_md.c src/solaris/native/java/lang/UNIXProcess_md.c src/solaris/native/java/lang/java_props_macosx.c src/solaris/native/java/lang/java_props_macosx.h src/solaris/native/java/lang/java_props_md.c src/solaris/native/java/net/Inet4AddressImpl.c src/solaris/native/java/net/Inet6AddressImpl.c src/solaris/native/java/net/NetworkInterface.c src/solaris/native/java/net/PlainDatagramSocketImpl.c src/solaris/native/java/net/PlainSocketImpl.c src/solaris/native/java/net/bsd_close.c src/solaris/native/java/net/net_util_md.c src/solaris/native/java/net/net_util_md.h src/solaris/native/java/util/FileSystemPreferences.c src/solaris/native/java/util/TimeZone_md.c src/solaris/native/sun/awt/CUPSfuncs.c src/solaris/native/sun/awt/VDrawingArea.c src/solaris/native/sun/awt/X11Color.c src/solaris/native/sun/awt/awt_Font.c src/solaris/native/sun/awt/awt_GraphicsEnv.c src/solaris/native/sun/awt/awt_InputMethod.c src/solaris/native/sun/awt/awt_LoadLibrary.c src/solaris/native/sun/awt/awt_Mlib.c src/solaris/native/sun/awt/awt_Robot.c src/solaris/native/sun/awt/extutil.h src/solaris/native/sun/awt/fontpath.c src/solaris/native/sun/awt/gtk2_interface.c src/solaris/native/sun/awt/jawt.c src/solaris/native/sun/awt/list.c src/solaris/native/sun/awt/robot_common.c src/solaris/native/sun/font/X11FontScaler.c src/solaris/native/sun/font/X11TextRenderer.c src/solaris/native/sun/java2d/j2d_md.h src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c src/solaris/native/sun/java2d/loops/vis_FuncArray.c src/solaris/native/sun/java2d/opengl/GLXSurfaceData.c src/solaris/native/sun/java2d/opengl/OGLFuncs_md.h src/solaris/native/sun/java2d/x11/X11SurfaceData.c src/solaris/native/sun/java2d/x11/XRSurfaceData.c src/solaris/native/sun/jdga/dgalock.c src/solaris/native/sun/management/FileSystemImpl.c src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c src/solaris/native/sun/net/spi/DefaultProxySelector.c src/solaris/native/sun/nio/ch/DatagramChannelImpl.c src/solaris/native/sun/nio/ch/DatagramDispatcher.c src/solaris/native/sun/nio/ch/FileChannelImpl.c src/solaris/native/sun/nio/ch/FileDispatcherImpl.c src/solaris/native/sun/nio/ch/FileKey.c src/solaris/native/sun/nio/ch/KQueue.c src/solaris/native/sun/nio/ch/KQueuePort.c src/solaris/native/sun/nio/ch/Net.c src/solaris/native/sun/nio/fs/BsdNativeDispatcher.c src/solaris/native/sun/nio/fs/GnomeFileTypeDetector.c src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c src/solaris/native/sun/nio/fs/genUnixConstants.c src/solaris/native/sun/security/jgss/wrapper/NativeFunc.c src/solaris/native/sun/security/pkcs11/j2secmod_md.c src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c src/solaris/native/sun/security/smartcardio/pcsc_md.c src/solaris/native/sun/tools/attach/BsdVirtualMachine.c src/solaris/native/sun/xawt/XWindow.c src/solaris/native/sun/xawt/awt_Desktop.c src/solaris/npt/npt_md.h src/solaris/transport/socket/socket_md.c src/windows/bin/java_md.c src/windows/classes/java/net/DefaultInterface.java src/windows/native/sun/java2d/opengl/WGLSurfaceData.c test/Makefile test/ProblemList.txt test/com/sun/jdi/ImmutableResourceTest.sh test/com/sun/jdi/JITDebug.sh test/com/sun/jdi/PrivateTransportTest.sh test/com/sun/jdi/ShellScaffold.sh test/com/sun/jdi/Solaris32AndSolaris64Test.sh test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh test/com/sun/tools/attach/CommonSetup.sh test/demo/jvmti/DemoRun.java test/java/io/File/GetXSpace.java test/java/io/File/isDirectory/Applet.java test/java/io/Serializable/evolution/RenamePackage/run.sh test/java/io/Serializable/serialver/classpath/run.sh test/java/io/Serializable/serialver/nested/run.sh test/java/lang/ClassLoader/deadlock/TestCrossDelegate.sh test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh test/java/lang/ProcessBuilder/Basic.java test/java/lang/ProcessBuilder/Zombies.java test/java/lang/StringCoding/CheckEncodings.sh test/java/lang/annotation/loaderLeak/LoaderLeak.sh test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh test/java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh test/java/net/Authenticator/B4933582.sh test/java/net/DatagramSocket/Send12k.java test/java/net/DatagramSocket/SendDatagramToBadAddress.java test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh test/java/net/Socket/OldSocketImpl.sh test/java/net/URL/B5086147.sh test/java/net/URL/OpenStream.java test/java/net/URL/runconstructor.sh test/java/net/URLClassLoader/B5077773.sh test/java/net/URLClassLoader/sealing/checksealed.sh test/java/net/URLConnection/6212146/test.sh test/java/nio/channels/DatagramChannel/Refused.java test/java/nio/channels/FileChannel/Size.java test/java/nio/channels/FileChannel/Transfer.java test/java/nio/charset/coders/CheckSJISMappingProp.sh test/java/nio/charset/spi/basic.sh test/java/nio/file/FileSystem/Basic.java test/java/nio/file/Files/CopyAndMove.java test/java/nio/file/Path/PathOps.java test/java/rmi/registry/readTest/readTest.sh test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh test/java/security/Security/ClassLoaderDeadlock/Deadlock.sh test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh test/java/security/Security/signedfirst/Dyn.sh test/java/security/Security/signedfirst/Static.sh test/java/util/Currency/PropertiesTest.sh test/java/util/Locale/LocaleCategory.sh test/java/util/PluggableLocale/ExecTest.sh test/java/util/ResourceBundle/Bug6299235Test.sh test/java/util/ResourceBundle/Control/Bug6530694.java test/java/util/ServiceLoader/basic.sh test/java/util/logging/LoggingDeadlock4.java test/java/util/zip/ZipFile/ManyZipFiles.java test/javax/crypto/SecretKeyFactory/FailOverTest.sh test/javax/imageio/stream/StreamCloserLeak/run_test.sh test/javax/script/CommonSetup.sh test/javax/security/auth/Subject/doAs/Test.sh test/lib/security/java.policy/Ext_AllPolicy.sh test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh test/sun/misc/URLClassPath/ClassnameCharTest.sh test/sun/net/www/MarkResetTest.sh test/sun/net/www/http/HttpClient/RetryPost.sh test/sun/net/www/protocol/jar/B5105410.sh test/sun/net/www/protocol/jar/jarbug/run.sh test/sun/nio/ch/SelProvider.java test/sun/security/krb5/runNameEquals.sh test/sun/security/pkcs11/KeyStore/SecretKeysBasic.sh test/sun/security/pkcs11/Provider/ConfigQuotedString.sh test/sun/security/pkcs11/Provider/Login.sh test/sun/security/provider/PolicyFile/getinstance/getinstance.sh test/sun/security/ssl/com/sun/net/ssl/internal/ssl/EngineArgs/DebugReportsOneExtraByte.sh test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/NotifyHandshakeTest.sh test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.sh test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.sh test/sun/security/tools/jarsigner/AlgOptions.sh test/sun/security/tools/jarsigner/PercentSign.sh test/sun/security/tools/jarsigner/diffend.sh test/sun/security/tools/jarsigner/oldsig.sh test/sun/security/tools/keytool/AltProviderPath.sh test/sun/security/tools/keytool/CloneKeyAskPassword.sh test/sun/security/tools/keytool/NoExtNPE.sh test/sun/security/tools/keytool/SecretKeyKS.sh test/sun/security/tools/keytool/StandardAlgName.sh test/sun/security/tools/keytool/printssl.sh test/sun/security/tools/keytool/resource.sh test/sun/security/tools/keytool/standard.sh test/sun/security/tools/policytool/Alias.sh test/sun/security/tools/policytool/ChangeUI.sh test/sun/security/tools/policytool/OpenPolicy.sh test/sun/security/tools/policytool/SaveAs.sh test/sun/security/tools/policytool/UpdatePermissions.sh test/sun/security/tools/policytool/UsePolicy.sh test/sun/security/tools/policytool/i18n.sh test/sun/tools/common/CommonSetup.sh test/sun/tools/jconsole/ImmutableResourceTest.sh test/sun/tools/jinfo/Basic.sh test/sun/tools/jrunscript/common.sh test/sun/tools/jrunscript/jrunscript-argsTest.sh test/sun/tools/jrunscript/jrunscript-eTest.sh test/sun/tools/jrunscript/jrunscript-fTest.sh test/sun/tools/jrunscript/jrunscriptTest.sh test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh test/tools/launcher/ExecutionEnvironment.java test/tools/launcher/Test7029048.java test/tools/launcher/TestHelper.java test/tools/pack200/Pack200Test.java
diffstat 1042 files changed, 159469 insertions(+), 1111 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Tue Mar 06 10:25:45 2012 +0800
+++ b/.hgignore	Tue Mar 06 20:34:38 2012 +0000
@@ -4,3 +4,4 @@
 ^make/netbeans/.*/build/
 ^make/netbeans/.*/dist/
 ^.hgtip
+.DS_Store
--- a/make/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -233,6 +233,9 @@
 all build:: sanity-all post-sanity-all
 
 SUBDIRS       = tools java javax sun com
+ifeq ($(PLATFORM), macosx)
+  SUBDIRS += apple
+endif
 SUBDIRS_tools = launchers
 SUBDIRS_misc  = org sunw jpda
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/apple/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,39 @@
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+#
+# Makefile for building com/apple
+#
+
+BUILDDIR = ..
+PRODUCT = sun
+include $(BUILDDIR)/common/Defs.gmk
+
+SUBDIRS = applescript
+
+include $(BUILDDIR)/common/Subdirs.gmk
+
+all build clean clobber::
+	$(SUBDIRS-loop)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/apple/applescript/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,71 @@
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+BUILDDIR = ../..
+PACKAGE = apple.applescript
+LIBRARY = AppleScriptEngine
+PRODUCT = sun
+include $(BUILDDIR)/common/Defs.gmk
+
+
+#
+# Files
+#
+AUTO_FILES_JAVA_DIRS = apple/applescript
+
+FILES_objc = \
+        $(TARGDIR)AppleScriptEngine.m \
+        $(TARGDIR)AppleScriptExecutionContext.m \
+        $(TARGDIR)AS_NS_ConversionUtils.m \
+        $(TARGDIR)NS_Java_ConversionUtils.m
+
+
+FILES_export = \
+	apple/applescript/AppleScriptEngine.java \
+	apple/applescript/AppleScriptEngineFactory.java
+
+#
+# Rules
+#
+include $(BUILDDIR)/common/Mapfile-vers.gmk
+include $(BUILDDIR)/common/Library.gmk
+
+
+#
+# Extra rules
+#
+
+#
+# Add to ambient vpath to get files in a subdirectory
+#
+vpath %.m   $(call NativeSrcDirList,,native/apple/applescript)
+
+CPPFLAGS += \
+	-I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders
+
+OTHER_LDLIBS = \
+    -framework Cocoa \
+    -framework Carbon \
+    -framework JavaNativeFoundation
--- a/make/com/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/com/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -32,6 +32,11 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = sun oracle
+
+ifeq ($(PLATFORM), macosx)
+    SUBDIRS += apple
+endif
+
 include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/com/apple/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,39 @@
+#
+# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+#
+# Makefile for building com/apple
+#
+
+BUILDDIR = ../..
+PRODUCT = sun
+include $(BUILDDIR)/common/Defs.gmk
+
+SUBDIRS = osx osxui
+
+include $(BUILDDIR)/common/Subdirs.gmk
+
+all build clean clobber::
+	$(SUBDIRS-loop)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/com/apple/osx/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,91 @@
+#
+# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+BUILDDIR = ../../..
+PACKAGE = com.apple.osx
+LIBRARY = osx
+PRODUCT = sun
+include $(BUILDDIR)/common/Defs.gmk
+
+
+#
+# Files
+#
+AUTO_FILES_JAVA_DIRS = apple/launcher apple/security com/apple/concurrent com/apple/eio java/util/prefs
+
+FILES_objc += \
+    $(TARGDIR)Dispatch.m \
+    $(TARGDIR)CFileManager.m \
+    $(TARGDIR)KeystoreImpl.m \
+    $(TARGDIR)JavaAppLauncher.m \
+    $(TARGDIR)MacOSXPreferencesFile.m \
+    $(TARGDIR)SCDynamicStoreConfig.m
+
+FILES_export += \
+	com/apple/concurrent/LibDispatchNative.java \
+	com/apple/eio/FileManager.java \
+	apple/security/KeychainStore.java \
+	apple/launcher/JavaAppLauncher.java \
+	java/util/prefs/MacOSXPreferencesFile.java
+
+# TODO: couldn't figure out how to get resources working
+#LOCALE_SET_DEFINITION = jre
+#RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES = apple/launcher/appLauncherErrors.properties
+
+
+#
+# Rules
+#
+include $(BUILDDIR)/common/Mapfile-vers.gmk
+include $(BUILDDIR)/common/Library.gmk
+
+
+#
+# Extra rules
+#
+
+#
+# Add to ambient vpath to get files in a subdirectory
+#
+vpath %.m   $(call NativeSrcDirList,,native/com/apple/concurrent)
+vpath %.m   $(call NativeSrcDirList,,native/com/apple/eio)
+vpath %.m   $(call NativeSrcDirList,,native/apple/launcher)
+vpath %.m   $(call NativeSrcDirList,,native/apple/security)
+vpath %.m   $(call NativeSrcDirList,,native/java/util)
+
+CPPFLAGS += \
+	$(call NativeSrcDirList,-I,native/com/apple/laf) \
+	$(call NativeSrcDirList,-I,native/apple/awt) \
+	$(call NativeSrcDirList,-I,native/sun/awt) \
+	$(call NativeSrcDirList,-I,native/sun/osxapp)
+
+OTHER_LDLIBS = \
+    -losxapp \
+    -framework Cocoa \
+    -framework ApplicationServices \
+    -framework JavaNativeFoundation \
+    -framework JavaRuntimeSupport \
+    -framework Security \
+    -framework SystemConfiguration
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/com/apple/osxui/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,106 @@
+#
+# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+BUILDDIR = ../../..
+PACKAGE = com.apple.osxui
+LIBRARY = osxui
+PRODUCT = sun
+include $(BUILDDIR)/common/Defs.gmk
+
+
+#
+# Files
+#
+AUTO_FILES_JAVA_DIRS = apple/laf com/apple/laf com/apple/eawt
+
+FILES_objc = \
+        $(TARGDIR)AquaFileView.m \
+        $(TARGDIR)AquaLookAndFeel.m \
+        $(TARGDIR)AquaNativeResources.m \
+        $(TARGDIR)JRSUIConstantSync.m \
+        $(TARGDIR)JRSUIController.m \
+        $(TARGDIR)JRSUIFocus.m \
+        $(TARGDIR)ScreenPopupFactory.m \
+        $(TARGDIR)ScreenMenu.m
+
+FILES_export = \
+	apple/laf/AquaLookAndFeel.java \
+	apple/laf/JRSUIConstants.java \
+	apple/laf/JRSUIControl.java \
+	apple/laf/JRSUIFocus.java \
+	apple/laf/JRSUIState.java \
+	apple/laf/JRSUIStateFactory.java \
+	apple/laf/JRSUIUtils.java \
+	com/apple/laf/AquaFileView.java \
+	com/apple/laf/AquaNativeResources.java \
+	com/apple/laf/ScreenPopupFactory.java \
+	com/apple/laf/ScreenMenu.java \
+	com/apple/laf/ScreenMenuBar.java \
+	com/apple/laf/ScreenMenuBarProvider.java \
+	com/apple/laf/ScreenMenuItem.java \
+	com/apple/laf/ScreenMenuItemCheckbox.java \
+	com/apple/laf/ScreenMenuItemUI.java \
+	com/apple/laf/ScreenMenuPropertyHandler.java \
+	com/apple/laf/ScreenMenuPropertyListener.java
+
+#RESOURCE_BUNDLES_COMPILED_PROPERTIES += \
+#	com/apple/laf/resources/aqua.properties \
+#	com/apple/laf/resources/aqua_de.properties \
+#	com/apple/laf/resources/aqua_fr.properties \
+#	com/apple/laf/resources/aqua_ja.properties
+
+
+#
+# Rules
+#
+include $(BUILDDIR)/common/Mapfile-vers.gmk
+include $(BUILDDIR)/common/Library.gmk
+
+
+#
+# Extra rules
+#
+
+#
+# Add to ambient vpath to get files in a subdirectory
+#
+vpath %.m   $(call NativeSrcDirList,,native/com/apple/laf)
+vpath %.m $(call NativeSrcDirList,,native/com/apple/eawt)
+
+CPPFLAGS += \
+	$(call NativeSrcDirList,-I,native/com/apple/laf) \
+	$(call NativeSrcDirList,-I,native/apple/awt) \
+	$(call NativeSrcDirList,-I,native/sun/awt) \
+	$(call NativeSrcDirList,-I,native/sun/osxapp) \
+	-I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders
+
+OTHER_LDLIBS = \
+    -lawt -losxapp \
+    -llwawt -L$(LIBDIR)/lwawt -Xlinker -rpath -Xlinker @loader_path/lwawt \
+    -framework Cocoa \
+    -framework Carbon \
+    -framework ApplicationServices \
+    -framework JavaNativeFoundation \
+    -framework JavaRuntimeSupport
--- a/make/com/sun/java/pack/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/com/sun/java/pack/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -59,6 +59,7 @@
 vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)
 
 ifeq ($(STANDALONE),true)
+ ifneq ($(SYSTEM_ZLIB),true)
   ZIPOBJDIR = $(OUTPUTDIR)/tmp/sun/java.util.zip/zip/$(OBJDIRNAME)
 
   ZIPOBJS =  $(ZIPOBJDIR)/zcrc32.$(OBJECT_SUFFIX) \
@@ -75,6 +76,10 @@
   ZINCLUDE=-I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
   OTHER_CXXFLAGS += $(ZINCLUDE)
   LDDFLAGS += $(ZIPOBJS)
+ else
+  LDDFLAGS += -lz
+  OTHER_CXXFLAGS += -DSYSTEM_ZLIB
+ endif
 else
   OTHER_CXXFLAGS += -DNO_ZLIB -DUNPACK_JNI
   OTHER_LDLIBS += $(JVMLIB)
--- a/make/com/sun/nio/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/com/sun/nio/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -32,8 +32,12 @@
 SUBDIRS_MAKEFLAGS += JAVAC_WARNINGS_FATAL=true
 include $(BUILDDIR)/common/Defs.gmk
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
+ifneq ($(PLATFORM), macosx)
 SUBDIRS = sctp
-include $(BUILDDIR)/common/Subdirs.gmk
+endif
+
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- a/make/com/sun/security/auth/module/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/com/sun/security/auth/module/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -67,7 +67,7 @@
   include FILES_c_solaris.gmk
 endif # solaris
 
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux macosx))
   LIBRARY = jaas_unix
   include FILES_export_unix.gmk
   include FILES_c_unix.gmk
--- a/make/com/sun/tools/attach/Exportedfiles.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/com/sun/tools/attach/Exportedfiles.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -43,5 +43,7 @@
 	sun/tools/attach/LinuxVirtualMachine.java
 endif
 
-
-
+ifeq ($(PLATFORM), macosx)
+FILES_export = \
+	sun/tools/attach/BsdVirtualMachine.java
+endif
--- a/make/com/sun/tools/attach/FILES_c.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/com/sun/tools/attach/FILES_c.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -39,4 +39,7 @@
 	LinuxVirtualMachine.c
 endif
 
-
+ifeq ($(PLATFORM), macosx)
+FILES_c = \
+	BsdVirtualMachine.c
+endif
--- a/make/com/sun/tools/attach/FILES_java.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/com/sun/tools/attach/FILES_java.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -43,6 +43,11 @@
 	sun/tools/attach/LinuxAttachProvider.java
 endif
 
+ifeq ($(PLATFORM), macosx)
+FILES_java += \
+	sun/tools/attach/BsdAttachProvider.java
+endif
+
 #
 # Files that need to be copied
 #
--- a/make/com/sun/tools/attach/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/com/sun/tools/attach/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -39,6 +39,9 @@
 ifeq ($(PLATFORM), linux)
 FILES_m = mapfile-linux
 endif
+ifeq ($(PLATFORM), macosx)
+FILES_m = mapfile-bsd 
+endif
 include $(BUILDDIR)/common/Mapfile-vers.gmk
 
 #
@@ -55,7 +58,11 @@
 EXTRA_LIBS += psapi.lib
 endif
 
-vpath %.c $(PLATFORM_SRC)/native/sun/tools/attach
+ifeq ($PLATFORM), macosx)
+  vpath %.c $(call NativeSrcDirList,,native/sun/tools/attach)
+else
+  vpath %.c $(PLATFORM_SRC)/native/sun/tools/attach
+endif
 
 all: classes copy-files
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/com/sun/tools/attach/mapfile-bsd	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,41 @@
+#
+# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# Define public interface.
+
+SUNWprivate_1.1 {
+	global:
+	    Java_sun_tools_attach_BsdVirtualMachine_checkPermissions;
+	    Java_sun_tools_attach_BsdVirtualMachine_close;
+	    Java_sun_tools_attach_BsdVirtualMachine_connect;
+	    Java_sun_tools_attach_BsdVirtualMachine_open;
+	    Java_sun_tools_attach_BsdVirtualMachine_sendQuitTo;
+	    Java_sun_tools_attach_BsdVirtualMachine_socket;
+	    Java_sun_tools_attach_BsdVirtualMachine_read;
+	    Java_sun_tools_attach_BsdVirtualMachine_write;
+	    Java_sun_tools_attach_BsdVirtualMachine_createAttachFile;
+	local:
+		*;
+};
--- a/make/common/Defs-linux.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/common/Defs-linux.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -374,6 +374,7 @@
 override LIBNSL                  =
 override LIBSCF                  =
 override LIBTHREAD               =
+override LIBDL                   = -ldl
 override MOOT_PRIORITIES         = true
 override NO_INTERRUPTIBLE_IO     = true
 ifeq ($(ARCH), amd64)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/common/Defs-macosx.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,402 @@
+#
+# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+#
+# Makefile to specify compiler flags for programs and libraries
+# targeted to MACOSX.  Should not contain any rules.
+#
+# WARNING: This file is shared with other workspaces. 
+#          So when it includes other files, it must use JDK_TOPDIR.
+#
+
+# Warning: the following variables are overriden by Defs.gmk. Set
+# values will be silently ignored:
+#   CFLAGS        (set $(OTHER_CFLAGS) instead)
+#   CPPFLAGS      (set $(OTHER_CPPFLAGS) instead)
+#   CXXFLAGS      (set $(OTHER_CXXFLAGS) instead)
+#   LDFLAGS       (set $(OTHER_LDFAGS) instead)
+#   LDLIBS        (set $(EXTRA_LIBS) instead)
+#   LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
+
+# Get shared JDK settings
+include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
+
+# Part of INCREMENTAL_BUILD mechanism.
+#   Compiler emits things like:  path/file.o: file.h
+#   We want something like: relative_path/file.o relative_path/file.d: file.h
+CC_DEPEND	 = -MM
+CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g'
+
+ifndef PLATFORM_SRC
+  PLATFORM_SRC = $(BUILDDIR)/../src/solaris
+endif # PLATFORM_SRC
+
+PLATFORM_SRC_MACOS = $(BUILDDIR)/../src/macosx
+
+# BSD build pulls its platform sources from the solaris tree.
+JAVA_SRCDIR_LIST = src/$(PLATFORM) src/solaris src/share
+NATIVE_SRCDIR_LIST = src/$(PLATFORM) src/solaris src/share
+
+# Platform specific closed sources
+ifndef OPENJDK
+  ifndef CLOSED_PLATFORM_SRC
+    CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris
+  endif
+endif
+
+# platform specific include files
+PLATFORM_INCLUDE_NAME = $(OS_NAME)
+PLATFORM_INCLUDE      = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
+
+# suffix used for make dependencies files.
+DEPEND_SUFFIX = d
+# The suffix applied to the library name for FDLIBM
+FDDLIBM_SUFFIX = a
+# The suffix applied to scripts (.bat for windows, nothing for unix)
+SCRIPT_SUFFIX =
+# CC compiler object code output directive flag value
+CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
+CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
+
+#
+# Default optimization
+#
+
+ifndef OPTIMIZATION_LEVEL
+  ifeq ($(PRODUCT), java)
+    OPTIMIZATION_LEVEL = HIGHER
+  else
+    OPTIMIZATION_LEVEL = LOWER
+  endif
+endif
+ifndef FASTDEBUG_OPTIMIZATION_LEVEL
+  FASTDEBUG_OPTIMIZATION_LEVEL = LOWER
+endif
+
+# For macosx use -Os by default, unless -O3 can be proved to be worth the cost, as per policy
+# <http://wikis.sun.com/display/OpenJDK/Mac+OS+X+Port+Compilers>
+CC_OPT/NONE     = 
+CC_OPT/LOWER    = -Os
+CC_OPT/HIGHER   = -Os
+CC_OPT/HIGHEST  = -Os
+
+CC_OPT          = $(CC_OPT/$(OPTIMIZATION_LEVEL))
+
+# For all platforms, do not omit the frame pointer register usage. 
+#    We need this frame pointer to make it easy to walk the stacks.
+#    This should be the default on X86, but ia64 and amd64 may not have this
+#    as the default.
+CFLAGS_REQUIRED_amd64   += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+LDFLAGS_COMMON_amd64    += -m64
+CFLAGS_REQUIRED_i586    += -m32 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+LDFLAGS_COMMON_i586     += -m32
+CFLAGS_REQUIRED_ia64    += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
+LDFLAGS_COMMON_sparcv9  += -m64 -mcpu=v9
+CFLAGS_REQUIRED_sparc   += -m32 -mcpu=v9
+LDFLAGS_COMMON_sparc    += -m32 -mcpu=v9
+CFLAGS_REQUIRED_arm     += -fsigned-char -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_ppc     += -fsigned-char -D_BIG_ENDIAN
+ifeq ($(ZERO_BUILD), true)
+  CFLAGS_REQUIRED       =  $(ZERO_ARCHFLAG)
+  ifeq ($(ZERO_ENDIANNESS), little)
+    CFLAGS_REQUIRED     += -D_LITTLE_ENDIAN
+  endif
+  LDFLAGS_COMMON        += $(ZERO_ARCHFLAG)
+else ifeq ($(ARCH), universal)
+  CFLAGS_REQUIRED       += -arch i386 -arch x86_64 -D_LITTLE_ENDIAN
+  LDFLAGS_COMMON        += -arch i386 -arch x86_64
+else
+  CFLAGS_REQUIRED       =  $(CFLAGS_REQUIRED_$(ARCH))
+  LDFLAGS_COMMON        += $(LDFLAGS_COMMON_$(ARCH))
+endif
+# 16-byte stack re-alignment on 32-bit Darwin
+CFLAGS_REQUIRED_i586 += -mstackrealign
+
+OTHER_CFLAGS = \
+         -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+	     -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks
+
+#
+# Selection of warning messages
+#
+GCC_INHIBIT	= -Wno-unused -Wno-parentheses
+GCC_STYLE	= 
+GCC_WARNINGS	= -W -Wall $(GCC_STYLE) $(GCC_INHIBIT)
+
+#
+# Treat compiler warnings as errors, if warnings not allowed
+#
+ifeq ($(COMPILER_WARNINGS_FATAL),true)
+  GCC_WARNINGS += -Werror
+endif
+
+#
+# Misc compiler options
+#
+ifneq ($(ARCH),ppc)
+  CFLAGS_COMMON   = -fno-strict-aliasing
+endif 
+PIC_CODE_LARGE = -fPIC
+PIC_CODE_SMALL = -fpic
+GLOBAL_KPIC = $(PIC_CODE_LARGE)
+CFLAGS_COMMON   += $(GLOBAL_KPIC) $(GCC_WARNINGS)
+ifeq ($(ARCH), amd64)
+ CFLAGS_COMMON += -pipe
+endif
+
+# BSD 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1
+DEBUG_FLAG = -g
+ifeq ($(FASTDEBUG), true)
+  ifeq ($(ARCH_DATA_MODEL), 64)
+    DEBUG_FLAG = -g1
+  endif
+endif
+
+# DEBUG_BINARIES overrides everything, use full -g debug information
+ifeq ($(DEBUG_BINARIES), true)
+  DEBUG_FLAG = -g
+  CFLAGS_REQUIRED += $(DEBUG_FLAG)
+endif
+
+CFLAGS_OPT      = $(CC_OPT)
+CFLAGS_DBG      = $(DEBUG_FLAG)
+CFLAGS_COMMON += $(CFLAGS_REQUIRED)
+
+CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
+CXXFLAGS_OPT	= $(CC_OPT)
+CXXFLAGS_DBG	= $(DEBUG_FLAG)
+CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
+
+# FASTDEBUG: Optimize the code in the -g versions, gives us a faster debug java
+ifeq ($(FASTDEBUG), true)
+  CFLAGS_DBG    += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
+  CXXFLAGS_DBG	+= $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
+endif
+
+CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"'
+
+# Alpha arch does not like "alpha" defined (potential general arch cleanup issue here)
+ifneq ($(ARCH),alpha)
+  CPP_ARCH_FLAGS += -D$(ARCH)
+else
+  CPP_ARCH_FLAGS += -D_$(ARCH)_
+endif
+CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -D_ALLBSD_SOURCE $(VERSION_DEFINES) \
+		  -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT
+
+CPPFLAGS_COMMON += -DMACOSX
+
+ifeq ($(ARCH_DATA_MODEL), 64)
+CPPFLAGS_COMMON += -D_LP64=1
+endif
+
+CPPFLAGS_OPT    = -DNDEBUG
+CPPFLAGS_DBG    = -DDEBUG
+ifneq ($(PRODUCT), java)
+  CPPFLAGS_DBG    += -DLOGGING 
+endif
+
+# Libraries need to locate other libraries at runtime, and you can tell
+#   a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
+#   buried inside the .{so,dylib}. The {$ORIGIN,@loader_path/} says to look
+#   relative to where the library itself is and it can be followed
+#   with relative paths from that. By default we always look in
+#   {$ORIGIN,@loader_path/}, optionally we add relative paths if the Makefile
+#   sets LD_RUNPATH_EXTRAS to those relative paths.
+#   Except on MacOS X we add a flag -z origin, not sure if this is necessary,
+#   but doesn't seem to hurt.
+#   The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
+#   See 'man {dyld,rtld}' for more information.
+#   Try: 'readelf -d lib*.so' to see these settings in a library.
+#
+LDFLAGS_COMMON += -Xlinker -rpath -Xlinker @loader_path/.
+LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -rpath -Xlinker @loader_path/%)
+LDFLAGS_COMMON += -Xlinker -install_name -Xlinker @rpath/$(@F)
+
+#
+# -L paths for finding and -ljava
+#
+LDFLAGS_COMMON += -L$(LIBDIR)
+
+#
+# -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always
+# statically link libgcc but will print a warning with the flag. We don't 
+# want the warning, so check gcc version first.
+#
+ifeq ($(CC_MAJORVER),3)
+  OTHER_LDFLAGS  += -static-libgcc
+endif
+
+# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
+#   (See Rules.gmk) The gcc 5 compiler might have an option for this?
+AUTOMATIC_PCH_OPTION = 
+
+#
+# Post Processing of libraries/executables
+#
+ifeq ($(VARIANT), OPT)
+  ifneq ($(NO_STRIP), true)
+    ifneq ($(DEBUG_BINARIES), true)
+      # Debug 'strip -S' leaves local function Elf symbols (better stack
+      # traces)
+      POST_STRIP_PROCESS = $(STRIP) -S
+    endif
+  endif
+endif
+
+#
+# Use: ld $(LD_MAPFILE_FLAG) mapfile *.o
+#
+LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker
+
+#
+# Support for Quantify.
+#
+ifdef QUANTIFY
+QUANTIFY_CMD = quantify
+QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
+LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
+endif
+
+# Darwin does not support linker map files.
+LDNOMAP=true
+
+#
+# Path and option to link against the VM, if you have to.  Note that
+# there are libraries that link against only -ljava, but they do get
+# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas
+# the library itself should not.
+#
+VM_NAME         = server
+JVMLIB          = -L$(LIBDIR)/$(VM_NAME) -ljvm
+JAVALIB         = -ljava $(JVMLIB)
+
+#
+# We want to privatize JVM symbols on Solaris. This is so the user can
+# write a function called FindClass and this should not override the 
+# FindClass that is inside the JVM. At this point in time we are not
+# concerned with other JNI libraries because we hope that there will
+# not be as many clashes there.
+#
+PRIVATIZE_JVM_SYMBOLS = false
+
+USE_PTHREADS = true
+override ALT_CODESET_KEY         = _NL_CTYPE_CODESET_NAME
+override AWT_RUNPATH             =
+override HAVE_ALTZONE            = false
+override HAVE_FILIOH             = false
+override HAVE_GETHRTIME          = false
+override HAVE_GETHRVTIME         = false
+override HAVE_SIGIGNORE          = true
+override LEX_LIBRARY             = -lfl
+ifeq ($(STATIC_CXX),true)
+override LIBCXX                  = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
+else
+override LIBCXX                  = -lstdc++
+endif
+override LIBPOSIX4               =
+override LIBSOCKET               =
+override LIBNSL                  =
+override LIBTHREAD               =
+override LIBDL                   =
+override MOOT_PRIORITIES         = true
+override NO_INTERRUPTIBLE_IO     = true
+override OPENWIN_HOME            = $(X11_PATH)
+override OPENWIN_LIB             = $(OPENWIN_HOME)/lib
+override OTHER_M4FLAGS           = -D__GLIBC__ -DGNU_ASSEMBLER
+override SUN_CMM_SUBDIR          =
+override THREADS_FLAG            = native
+override USE_GNU_M4              = true
+override USING_GNU_TAR           = true
+override WRITE_LIBVERSION        = false
+
+ifdef ALT_X11_PATH
+  X11_PATH = $(ALT_X11_PATH)
+else
+  X11_PATH = /usr/X11R6
+endif
+
+ifdef ALT_PACKAGE_PATH
+  PACKAGE_PATH = $(ALT_PACKAGE_PATH)
+else
+  PACKAGE_PATH = /opt/local
+endif
+
+# ALSA
+ifdef ALT_ALSA_LIB_PATH
+  ALSA_LIB_PATH = $(ALT_ALSA_LIB_PATH)
+else
+  ALSA_LIB_PATH = $(PACKAGE_PATH)/lib
+endif
+
+ifdef ALT_ALSA_HEADERS_PATH
+  ALSA_HEADERS_PATH = $(ALT_ALSA_HEADERS_PATH)
+else
+  ALSA_HEADERS_PATH = $(PACKAGE_PATH)/include
+endif
+
+# USE_EXECNAME forces the launcher to look up argv[0] on $PATH, and put the
+# resulting resolved absolute name of the executable in the environment
+# variable EXECNAME.  That executable name is then used that to locate the
+# installation area.
+override USE_EXECNAME            = true
+
+# If your platform has DPS, it will have Type1 fonts too, in which case
+# it is best to enable DPS support until such time as 2D's rasteriser
+# can fully handle Type1 fonts in all cases. Default is "yes".
+# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
+# DPS (Displayable PostScript) is available on Solaris machines
+HAVE_DPS = no
+
+SYSTEM_ZLIB = true
+
+#
+# Japanese manpages
+#
+JA_SOURCE_ENCODING = eucJP
+JA_TARGET_ENCODINGS = UTF-8
+
+# Settings for the JDI - Serviceability Agent binding.
+
+HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib
+SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
+
+# The JDI - Serviceability Agent binding is not currently supported
+# on ia64.
+ifeq ($(ARCH), ia64)
+  INCLUDE_SA = false
+else
+  INCLUDE_SA = true
+endif
+
+ifdef CROSS_COMPILE_ARCH
+  # X11 headers are not under /usr/include
+  OTHER_CFLAGS += -I$(OPENWIN_HOME)/include
+  OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include
+  OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include
+endif
+
+LIB_LOCATION ?= $(LIBDIR)
--- a/make/common/Defs-solaris.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/common/Defs-solaris.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -713,6 +713,9 @@
 # service configuration facility library
 LIBSCF = -lscf
 
+# Dynamic Loading library
+LIBDL = -ldl
+
 # GLOBAL_KPIC: If set means all libraries are PIC, position independent code
 #    EXCEPT for select compiles
 #    If a .o file is compiled non-PIC then it should be forced
--- a/make/common/Defs.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/common/Defs.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -179,11 +179,18 @@
 
   ifdef ALT_FREETYPE_LIB_PATH
     FREETYPE_LIB_PATH = $(ALT_FREETYPE_LIB_PATH)
+    ifeq ($(PLATFORM), macosx)
+      USING_SYSTEM_FT_LIB=true
+    endif
   else
     ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true)
       FREETYPE_LIB_PATH = $(DEVTOOLS_FT_DIR)/lib
     else
-      FREETYPE_LIB_PATH = /usr/lib
+      ifeq ($(PLATFORM), macosx)
+        FREETYPE_LIB_PATH = /usr/X11R6/lib
+      else
+        FREETYPE_LIB_PATH = /usr/lib
+      endif
       USING_SYSTEM_FT_LIB=true
     endif
   endif 
@@ -194,7 +201,11 @@
     ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true)
       FREETYPE_HEADERS_PATH = $(DEVTOOLS_FT_DIR)/include
     else
-      FREETYPE_HEADERS_PATH = /usr/include
+      ifeq ($(PLATFORM), macosx)
+        FREETYPE_HEADERS_PATH = /usr/X11R6/include
+      else
+        FREETYPE_HEADERS_PATH = /usr/include
+      endif
     endif
   endif
 endif
@@ -259,6 +270,10 @@
     LDLIBS_COMMON = -ldl
   endif
 
+  ifeq ($(PLATFORM), macosx)
+    LDLIBS_COMMON = -pthread
+  endif
+
 endif # PROGRAM
 
 LDLIBS_COMMON += $(EXTRA_LIBS)
@@ -399,7 +414,12 @@
 # We define an intermediate variable for Java files because
 # we use its value later to help define $SOURCEPATH
 
-VPATH0.java = $(GENSRCDIR)$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/classes$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/classes
+ifeq ($(PLATFORM), macosx)
+  VPATH0.java = $(subst $(ONESPACE),:,$(GENSRCDIR) $(call JavaSrcDirList,,classes))
+else
+  VPATH0.java = $(GENSRCDIR)$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/classes$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/classes
+endif
+
 ifdef OPENJDK
   VPATH.java = $(VPATH0.java)
 else
--- a/make/common/Library.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/common/Library.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -58,6 +58,14 @@
 FILES_o  += $(patsubst %.s,   %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_s))))
 FILES_o  += $(patsubst %.cpp, %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_cpp))))
 
+ifeq ($(PLATFORM), macosx)
+FILES_o  += $(patsubst %.m,   %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_objc))))
+FILES_o  += $(patsubst %.mm,  %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_objcpp))))
+
+INCREMENTAL_BUILD=false
+
+endif # PLATFORM
+
 ifeq ($(INCREMENTAL_BUILD),true)
 FILES_d   = $(patsubst %.c,   %.$(DEPEND_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_c))))
 FILES_d  += $(patsubst %.cpp, %.$(DEPEND_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_cpp))))
@@ -217,12 +225,17 @@
 # the shared library.  On other platforms set this to false at the
 # make command line.
 #
+
+ifneq ($(PLATFORM), macosx)
+  ARFLAGS = -r
+endif
+
 $(ACTUAL_LIBRARY):: $(COMPILE_FILES_o) $(FILES_m) $(FILES_reorder)
 	@$(prep-target)
 	@$(ECHO) "STATS: LIBRARY=$(LIBRARY), PRODUCT=$(PRODUCT), OPTIMIZATION_LEVEL=$(OPTIMIZATION_LEVEL)"
 	@$(ECHO) "Rebuilding $@ because of $?"
 ifeq ($(LIBRARY), fdlibm)
-	$(AR) -r $@ $(FILES_o)
+	$(AR) $(ARFLAGS) $@ $(FILES_o)
 else # LIBRARY
 	$(LINKER) $(SHARED_LIBRARY_FLAG) -o $@ $(FILES_o) $(LDLIBS)
 	@$(call binary_file_verification,$@)
--- a/make/common/Program.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/common/Program.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -38,12 +38,18 @@
   override COMPILE_APPROACH = normal
 endif
 
-ifndef LAUNCHER_PLATFORM_SRC
-LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)
+# set the platform specific directory for macosx, also this platform shares
+# substantial family ties with its siblings (solaris and linux), thus we add
+# solaris src path to its compilation dependencies.
+ifeq ($(PLATFORM), macosx)
+  LAUNCHER_PLATFORM_SRC = $(BUILDDIR)/../src/macosx
+  LAUNCHER_SOLARIS_PLATFORM_SRC  = $(BUILDDIR)/../src/solaris
+else
+  LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)
 endif
 
 ifndef LAUNCHER_SHARE_SRC
-LAUNCHER_SHARE_SRC = $(SHARE_SRC)
+  LAUNCHER_SHARE_SRC = $(SHARE_SRC)
 endif
 
 ACTUAL_PROGRAM_NAME = $(PROGRAM)$(EXE_SUFFIX)
@@ -66,7 +72,7 @@
 include $(JDK_TOPDIR)/make/common/Rules.gmk
 
 ifdef NEVER_ACT_AS_SERVER_CLASS_MACHINE
-OTHER_CPPFLAGS += -DNEVER_ACT_AS_SERVER_CLASS_MACHINE
+  OTHER_CPPFLAGS += -DNEVER_ACT_AS_SERVER_CLASS_MACHINE
 endif
 
 #
@@ -78,40 +84,51 @@
 # On Windows, this is done by using the same directory as the executable
 # itself, as with all the Windows libraries.
 #
-ifneq (,$(findstring $(PLATFORM), linux solaris))	# UNIX systems
-    LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
-    OTHER_LDLIBS += -ljli
-    ifeq ($(PLATFORM), solaris)
-	ifeq ($(ARCH_DATA_MODEL), 32)
-		LDFLAGS += -R \$$ORIGIN/../lib/$(LIBARCH)/jli
-		LDFLAGS += -R \$$ORIGIN/../jre/lib/$(LIBARCH)/jli
-	else
-		LDFLAGS += -R \$$ORIGIN/../../lib/$(LIBARCH)/jli
-		LDFLAGS += -R \$$ORIGIN/../../jre/lib/$(LIBARCH)/jli
-	endif
+ifeq ($(PLATFORM), macosx)
+  ifneq ($(ARCH), universal)
+    LDFLAGS += -Wl,-all_load
+  endif
+  LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a
+
+  ifeq ($(SYSTEM_ZLIB),true)
+    OTHER_LDLIBS += -lz
+  endif
+endif
+
+ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems
+  LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
+  OTHER_LDLIBS += -ljli
+  ifeq ($(PLATFORM), solaris)
+    ifeq ($(ARCH_DATA_MODEL), 32)
+      LDFLAGS += -R \$$ORIGIN/../lib/$(LIBARCH)/jli
+      LDFLAGS += -R \$$ORIGIN/../jre/lib/$(LIBARCH)/jli
+    else
+      LDFLAGS += -R \$$ORIGIN/../../lib/$(LIBARCH)/jli
+      LDFLAGS += -R \$$ORIGIN/../../jre/lib/$(LIBARCH)/jli
     endif
-    ifeq ($(PLATFORM), linux)
-	LDFLAGS += $(LDFLAG_Z_ORIGIN)
-	LDFLAGS += -Wl,--allow-shlib-undefined
-	LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli
-	LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../jre/lib/$(LIBARCH)/jli
-    endif
+  endif
+  ifeq ($(PLATFORM), linux)
+    LDFLAGS += $(LDFLAG_Z_ORIGIN)
+    LDFLAGS += -Wl,--allow-shlib-undefined
+    LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli
+    LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../jre/lib/$(LIBARCH)/jli
+  endif
 endif
+
 ifeq ($(PLATFORM), windows)
-	JLI_LCF = $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/jli.lcf
-	ifdef STATIC_JLI
-	    LDFLAGS += -libpath:$(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static
-	else
-	    LDFLAGS += -libpath:$(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)
-	endif
-	OTHER_LDLIBS += jli.lib
+  JLI_LCF = $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/jli.lcf
+  ifdef STATIC_JLI
+    LDFLAGS += -libpath:$(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static
+  else
+    LDFLAGS += -libpath:$(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)
+  endif
+  OTHER_LDLIBS += jli.lib
 endif
 
 #
 # Launcher specific files.
 #
-FILES_o = \
-	$(OBJDIR)/main.$(OBJECT_SUFFIX)
+FILES_o = $(OBJDIR)/main.$(OBJECT_SUFFIX)
 
 $(ACTUAL_PROGRAM):: classes $(INIT) 
 
@@ -119,19 +136,18 @@
 # Windows only
 #
 ifeq ($(PLATFORM), windows)
+  # JDK name required here
+  RC_FLAGS += /D "JDK_FNAME=$(PROGRAM)$(EXE_SUFFIX)" \
+              /D "JDK_INTERNAL_NAME=$(PROGRAM)" \
+              /D "JDK_FTYPE=0x1L"
 
-# JDK name required here
-RC_FLAGS += /D "JDK_FNAME=$(PROGRAM)$(EXE_SUFFIX)" \
-	    /D "JDK_INTERNAL_NAME=$(PROGRAM)" \
-	    /D "JDK_FTYPE=0x1L"
+  $(OBJDIR)/$(PROGRAM).res: $(VERSIONINFO_RESOURCE)
+	@$(prep-target)
+  ifndef LOCAL_RESOURCE_FILE
+	$(RC) $(RC_FLAGS) $(CC_OBJECT_OUTPUT_FLAG)$(@) $(VERSIONINFO_RESOURCE)
+  endif
 
-$(OBJDIR)/$(PROGRAM).res: $(VERSIONINFO_RESOURCE)
-	@$(prep-target)
-ifndef LOCAL_RESOURCE_FILE
-	$(RC) $(RC_FLAGS) $(CC_OBJECT_OUTPUT_FLAG)$(@) $(VERSIONINFO_RESOURCE)
-endif
-
-$(OBJDIR)/$(PROGRAM).lcf: $(OBJDIR)/$(PROGRAM).res $(FILES_o)
+  $(OBJDIR)/$(PROGRAM).lcf: $(OBJDIR)/$(PROGRAM).res $(FILES_o)
 	@$(prep-target)
 	@$(ECHO) $(FILES_o) > $@ 
   ifndef LOCAL_RESOURCE_FILE
@@ -140,61 +156,78 @@
 	@$(ECHO) setargv.obj >> $@
 	@$(ECHO) Created $@ 
 
-$(ACTUAL_PROGRAM):: $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX)
+  $(ACTUAL_PROGRAM):: $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX)
 	@$(install-file)
 
-ifeq ($(ARCH_DATA_MODEL), 32)
-  STACK_SIZE=327680
-else
-# We need more Stack for Windows 64bit
-  STACK_SIZE=1048576
-endif
+  ifeq ($(ARCH_DATA_MODEL), 32)
+    STACK_SIZE=327680
+  else
+    # We need more Stack for Windows 64bit
+    STACK_SIZE=1048576
+  endif
 
-IMVERSION=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER)
-$(OBJDIR)/$(PROGRAM).exe.manifest: $(JDK_TOPDIR)/src/windows/resource/java.manifest
+  IMVERSION=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER)
+  $(OBJDIR)/$(PROGRAM).exe.manifest: $(JDK_TOPDIR)/src/windows/resource/java.manifest
 	@$(prep-target)
 	$(SED) 's%IMVERSION%$(IMVERSION)%g;s%PROGRAM%$(PROGRAM)%g' $< > $@
 
-# We used a hand-crafted manifest file for all executables.
-# It is tweaked to embed the build number and executable name.
-# Use ";#2" for .dll and ";#1" for .exe in the MT command below:
-$(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX):: $(OBJDIR)/$(PROGRAM).lcf $(FILES_o) $(JLI_LCF) $(OBJDIR)/$(PROGRAM).exe.manifest
+  # We used a hand-crafted manifest file for all executables.
+  # It is tweaked to embed the build number and executable name.
+  # Use ";#2" for .dll and ";#1" for .exe in the MT command below:
+  $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX):: $(OBJDIR)/$(PROGRAM).lcf $(FILES_o) $(JLI_LCF) $(OBJDIR)/$(PROGRAM).exe.manifest
 	@$(prep-target)
 	@set -- $?; \
 	    $(ECHO) Rebuilding $@ because of $$1 $$2 $$3 $$4 $$5 $$6 $${7:+...};
 	$(LINK) -out:$@ /STACK:$(STACK_SIZE) \
 	    -map:$(OBJDIR)/$(PROGRAM).map $(LFLAGS) $(LDFLAGS) \
 	    @$(OBJDIR)/$(PROGRAM).lcf $(LDLIBS)
-ifdef MT
+  ifdef MT
 	$(MT) /manifest $(OBJDIR)/$(PROGRAM).exe.manifest /outputresource:$@;#1
-endif
+  endif
 	@$(call binary_file_verification,$@)
+else
+  #
+  # Note that we have to link -lthread even when USE_PTHREADS is true.
+  # This is becuase checkForCorrectLibthread() croaks otherwise.
+  #
+  LIBTHREAD = -lthread
+  ifeq ($(USE_PTHREADS),true)
+    THREADLIBS = -lpthread $(LIBTHREAD)
+  else
+    THREADLIBS = $(LIBTHREAD)
+  endif
 
-else # PLATFORM
+  ifeq ($(PLATFORM), macosx)
+    THREADLIBS = -pthread
+    # Needed for linking the various launchers
+    LDFLAGS += -framework Cocoa -framework Security \
+               -framework ApplicationServices
+    OTHER_CPPFLAGS += -DPACKAGE_PATH='"$(PACKAGE_PATH)"'
 
-#
-# Note that we have to link -lthread even when USE_PTHREADS is true.
-# This is becuase checkForCorrectLibthread() croaks otherwise.
-#
-LIBTHREAD = -lthread
-ifeq ($(USE_PTHREADS),true)
-  THREADLIBS = -lpthread $(LIBTHREAD)
-else # USE_PTHREADS
-  THREADLIBS = $(LIBTHREAD)
-endif # USE_PTHREADS
+    # Default Info.plist file for the command line tools. This gets overridden by
+    # some of the jvmstat tools so that they have task_for_pid() privileges
+    ifndef INFO_PLIST_FILE
+      INFO_PLIST_FILE = Info-cmdline.plist
+    endif
+    LDFLAGS += -sectcreate __TEXT __info_plist $(LAUNCHER_PLATFORM_SRC)/lib/$(INFO_PLIST_FILE)
+  else 
+    INFO_PLIST_FILE=
+  endif
 
-#
-# This rule only applies on unix.  It supports quantify and its ilk.
-#
-$(ACTUAL_PROGRAM):: $(FILES_o)
+  #
+  # This rule only applies on unix.  It supports quantify and its ilk.
+  #
+  $(ACTUAL_PROGRAM):: $(FILES_o)
 	@$(prep-target)
 	@set -- $?; \
-	    $(ECHO) Rebuilding $@ because of $$1 $$2 $$3 $$4 $$5 $$6 $${7:+...};
+	$(ECHO) Rebuilding $@ because of $$1 $$2 $$3 $$4 $$5 $$6 $${7:+...};
 	@$(MKDIR) -p $(TEMPDIR)
 	$(LINK_PRE_CMD) $(CC) $(CC_OBJECT_OUTPUT_FLAG)$@ $(LDFLAGS) \
-	    $(FILES_o) $(THREADLIBS) $(LDLIBS)
+	$(FILES_o) $(THREADLIBS) $(LDLIBS)
+  ifeq ($(findstring privileged, $(INFO_PLIST_FILE)), privileged)
+	-codesign -s openjdk_codesign $@
+  endif
 	@$(call binary_file_verification,$@)
-
 endif # PLATFORM
 
 clean:: 
@@ -218,42 +251,49 @@
 # Now include make dependencies (created during compilation, see Rules.gmk)
 #
 ifeq ($(INCREMENTAL_BUILD),true)
-# Workaround: gnumake sometimes says files is empty when it shouldn't
-#    was:  files := $(foreach file, $(wildcard */$(ARCH)/*.$(DEPEND_SUFFIX)), $(file))
-files := $(shell $(LS) $(OBJDIR)/*.$(DEPEND_SUFFIX) 2>/dev/null)
-ifneq ($(strip $(files)),)
-include $(files)
-endif # files
-endif # INCREMENTAL_BUILD
+  # Workaround: gnumake sometimes says files is empty when it shouldn't
+  #    was:  files := $(foreach file, $(wildcard */$(ARCH)/*.$(DEPEND_SUFFIX)), $(file))
+  files := $(shell $(LS) $(OBJDIR)/*.$(DEPEND_SUFFIX) 2>/dev/null)
+  ifneq ($(strip $(files)),)
+    include $(files)
+  endif
+endif
 
 ifdef JAVA_ARGS
-OTHER_CPPFLAGS += -DJAVA_ARGS='$(JAVA_ARGS)'
-OTHER_CPPFLAGS += -DLAUNCHER_NAME='"$(LAUNCHER_NAME)"'
+  OTHER_CPPFLAGS += -DJAVA_ARGS='$(JAVA_ARGS)'
+  OTHER_CPPFLAGS += -DLAUNCHER_NAME='"$(LAUNCHER_NAME)"'
 endif
 
 ifeq ($(PLATFORM), windows)
-ifdef RELEASE
-OTHER_CPPFLAGS += -DVERSION='"$(RELEASE)"'
-endif
+  ifdef RELEASE
+    OTHER_CPPFLAGS += -DVERSION='"$(RELEASE)"'
+  endif
 endif
 
 
 ifneq ($(PLATFORM), windows)
-HAVE_GETHRTIME=true
+  HAVE_GETHRTIME=true
 endif
 
 ifeq ($(HAVE_GETHRTIME),true)
-OTHER_CPPFLAGS += -DHAVE_GETHRTIME
+  OTHER_CPPFLAGS += -DHAVE_GETHRTIME
 endif
 
 OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)/bin -I$(LAUNCHER_PLATFORM_SRC)/bin
-OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
+ifeq ($(PLATFORM), macosx)
+  OTHER_INCLUDES += -I$(LAUNCHER_SOLARIS_PLATFORM_SRC)/bin
+  ifneq ($(SYSTEM_ZLIB), true)
+    OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
+  endif
+else
+  OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
+endif
 
-OTHER_CPPFLAGS += -DPROGNAME='"$(PROGRAM)"'
+OTHER_CPPFLAGS  += -DPROGNAME='"$(PROGRAM)"'
 VERSION_DEFINES += -DFULL_VERSION='"$(FULL_VERSION)"'
 
 VERSION_DEFINES += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
-		   -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"'
+                   -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"'
 
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/common/Release-macosx.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,75 @@
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+MANBASEDIRS=$(JDK_TOPDIR)/src/bsd/doc $(IMPORTDOCDIR)
+MAN1SUBDIR = man
+JA_DIRNAME=ja_JP.UTF-8
+
+# Defines the release targets for Mac OS X build products
+
+JDK_BUNDLE_DIR = $(ABS_OUTPUTDIR)/j2sdk-bundle/$(THIS_JDK_VERSION).jdk/Contents
+JRE_BUNDLE_DIR = $(ABS_OUTPUTDIR)/j2re-bundle/$(THIS_JDK_VERSION).jre/Contents
+
+MACOSX_SRC	 = $(JDK_TOPDIR)/src/macosx
+
+BUNDLE_ID ?= net.java.openjdk
+BUNLDE_ID_JRE ?= $(BUNDLE_ID).jre
+BUNLDE_ID_JDK ?= $(BUNDLE_ID).jdk
+
+BUNDLE_NAME ?= OpenJDK $(JDK_MINOR_VERSION)
+BUNDLE_NAME_JRE ?= $(BUNDLE_NAME)
+BUNDLE_NAME_JDK ?= $(BUNDLE_NAME)
+
+BUNDLE_INFO ?= OpenJDK ($(JDK_VERSION))
+BUNDLE_INFO_JRE ?= $(BUNDLE_INFO)
+BUNDLE_INFO_JDK ?= $(BUNDLE_INFO)
+
+BUNDLE_PLATFORM_VERSION ?= $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)
+BUNDLE_VERSION ?= $(JDK_VERSION)
+BUNDLE_VENDOR ?= UNDEFINED
+
+jre-bundle-setup:
+	$(RM) -r $(JRE_BUNDLE_DIR)
+
+jdk-bundle-setup:
+	$(RM) -r $(JDK_BUNDLE_DIR)
+
+jre-bundle-files:
+	$(MKDIR) -p $(JRE_BUNDLE_DIR)/MacOS
+	ln -s ../Home/lib/jli/libjli.dylib $(JRE_BUNDLE_DIR)/MacOS/
+	$(CP) -r $(JRE_IMAGE_DIR) $(JRE_BUNDLE_DIR)/Home
+	$(SED) -e "s/@@ID@@/$(BUNDLE_ID_JRE)/g" -e "s/@@NAME@@/$(BUNDLE_NAME_JRE)/g" -e "s/@@INFO@@/$(BUNDLE_INFO_JRE)/g" -e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" -e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" -e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" < $(MACOSX_SRC)/bundle/JRE-Info.plist > $(JRE_BUNDLE_DIR)/Info.plist
+	/usr/bin/SetFile -a B $(JRE_BUNDLE_DIR)/../
+
+jdk-bundle-files:
+	$(MKDIR) -p $(JDK_BUNDLE_DIR)/MacOS
+	ln -s ../Home/jre/lib/jli/libjli.dylib $(JDK_BUNDLE_DIR)/MacOS/
+	$(CP) -r $(JDK_IMAGE_DIR) $(JDK_BUNDLE_DIR)/Home
+	$(SED) -e "s/@@ID@@/$(BUNDLE_ID_JDK)/g" -e "s/@@NAME@@/$(BUNDLE_NAME_JDK)/g" -e "s/@@INFO@@/$(BUNDLE_INFO_JDK)/g" -e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" -e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" -e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" < $(MACOSX_SRC)/bundle/JDK-Info.plist > $(JDK_BUNDLE_DIR)/Info.plist
+	/usr/bin/SetFile -a B $(JDK_BUNDLE_DIR)/../
+
+EXTRA_IMAGE_TARGETS += jre-bundle-setup jdk-bundle-setup jre-bundle-files jdk-bundle-files
+
+.PHONY: $(EXTRA_JRE_TARGETS) $(EXTRA_IMAGE_TARGETS)
--- a/make/common/Release.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/common/Release.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -74,6 +74,10 @@
 
 JTG_DOCS            = $(JDK_TOPDIR)/src/solaris/doc
 
+ifeq ($(PLATFORM), macosx)
+  include $(JDK_TOPDIR)/make/common/Release-$(PLATFORM).gmk
+endif
+
 # The base names of all the license and document files for the jdk and jre
 #   (These files get placed in the jdk and jre install images)
 ifdef OPENJDK
@@ -230,11 +234,22 @@
 	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
 
 # Order is important here, trim jre after jdk image is created
+ifeq ($(PLATFORM), macosx)
+
+images:: sanity-images post-sanity-images  \
+	 $(INITIAL_IMAGE_JRE) $(EXTRA_JRE_TARGETS) $(INITIAL_IMAGE_JDK) \
+	 trim-image-jre trim-image-jdk \
+     identify-image-jre identify-image-jdk \
+	 process-image-jre process-image-jdk sec-files sec-files-win jgss-files \
+	 $(EXTRA_IMAGE_TARGETS)
+else
+
 images:: sanity-images post-sanity-images  \
 	 $(INITIAL_IMAGE_JRE) $(INITIAL_IMAGE_JDK) \
 	 trim-image-jre trim-image-jdk \
          identify-image-jre identify-image-jdk \
-	 process-image-jre process-image-jdk sec-files sec-files-win jgss-files
+	 process-image-jre process-image-jdk sec-files sec-files-win jgss-files 
+endif
 
 # Don't use these
 image-jre:: initial-image-jre trim-image-jre identify-image-jre process-image-jre
@@ -810,6 +825,10 @@
 	    $(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \
 		-o meta-index *.jar
 	@$(CD) $(JRE_IMAGE_DIR)/lib/ext && $(java-vm-cleanup)
+ifeq ($(PLATFORM), macosx)
+	@#install jobjc, apple mac only
+	$(CP) $(OUTPUTDIR)/JObjC.build/JObjC.jar $(JRE_IMAGE_DIR)/lib/JObjC.jar
+endif
 ifeq ($(PLATFORM), windows)
 	@# Remove certain *.lib files
 	$(CD) $(JRE_IMAGE_DIR)/lib && \
@@ -952,6 +971,10 @@
 	$(RM) $(JDK_IMAGE_DIR)/db/index.html $(JDK_IMAGE_DIR)/db/register.html
 endif
 
+# The launcher source files we need for src.zip
+FILES_launcher = $(wildcard $(SHARE_SRC)/bin/*) \
+                 $(wildcard $(PLATFORM_SRC)/bin/java_md*)
+
 # Standard jdk image
 initial-image-jdk:: initial-image-jdk-setup \
 		    initial-image-jdk-db \
@@ -1038,7 +1061,8 @@
 	@# generated by the more efficient solaris/windows method of copying files.
 	@# So for Linux, make use of the -T option (like Solaris' -I option) of
 	@# obtaining the list of files from a file. MKS tar has no such option.
-  ifeq ($(PLATFORM), linux)
+
+  ifneq (,$(findstring $(PLATFORM), linux macosx))
 	for d in $(SOURCE_DIRS); do \
 	  $(RM) $(ABS_TEMPDIR)/src-files.list; \
 	  ($(CD) $$d &&  \
@@ -1076,20 +1100,7 @@
 	$(RM) $(ABS_TEMPDIR)/src-files.list
 	$(CHMOD) -R +w $(JDK_IMAGE_DIR)/src
 	$(MKDIR) -p $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/java.c $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/java.h $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/manifest_info.h $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/parse_manifest.c $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/version_comp.c $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/version_comp.h $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/wildcard.h $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/wildcard.c $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/jli_util.h $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/jli_util.c $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/splashscreen_stubs.c $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/splashscreen.h $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(PLATFORM_SRC)/bin/java_md.c $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(PLATFORM_SRC)/bin/java_md.h $(JDK_IMAGE_DIR)/src/launcher
+	$(CP) $(FILES_launcher) $(JDK_IMAGE_DIR)/src/launcher
 	$(CD) $(JDK_IMAGE_DIR)/src && $(ZIPEXE) -qr ../src.zip *
 	$(RM) -r $(JDK_IMAGE_DIR)/src
 	@#
--- a/make/common/Rules.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/common/Rules.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -51,12 +51,22 @@
 #
 # All source tree areas for java/properties files (a few may be closed)
 #
-ifdef OPENJDK
-  ALL_CLASSES_SRC = $(SHARE_SRC)/classes $(PLATFORM_SRC)/classes
+ifeq ($(PLATFORM), macosx)
+  ifdef OPENJDK
+    ALL_CLASSES_SRC = $(call JavaSrcDirList,,classes)
+  else
+    ALL_CLASSES_SRC = \
+	  $(CLOSED_SHARE_SRC)/classes $(CLOSED_PLATFORM_SRC)/classes \
+	  $(call JavaSrcDirList,,classes)
+  endif
 else
-  ALL_CLASSES_SRC = \
-	$(CLOSED_SHARE_SRC)/classes $(CLOSED_PLATFORM_SRC)/classes \
-	$(SHARE_SRC)/classes $(PLATFORM_SRC)/classes
+  ifdef OPENJDK
+    ALL_CLASSES_SRC = $(SHARE_SRC)/classes $(PLATFORM_SRC)/classes
+  else
+    ALL_CLASSES_SRC = \
+	  $(CLOSED_SHARE_SRC)/classes $(CLOSED_PLATFORM_SRC)/classes \
+	  $(SHARE_SRC)/classes $(PLATFORM_SRC)/classes
+  endif
 endif
 
 #
@@ -200,8 +210,14 @@
 
 $(CLASSDESTDIR)/%.class: $(GENSRCDIR)/%.java
 	@$(add-java-file)
+
+ifeq ($(PLATFORM), macosx)
+$(CLASSDESTDIR)/%.class: $(JDK_TOPDIR)/src/macosx/classes/%.java
+	@$(add-java-file)
+endif
 $(CLASSDESTDIR)/%.class: $(PLATFORM_SRC)/classes/%.java
 	@$(add-java-file)
+
 $(CLASSDESTDIR)/%.class: $(SHARE_SRC)/classes/%.java
 	@$(add-java-file)
 
--- a/make/common/internal/NativeCompileRules.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/common/internal/NativeCompileRules.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -176,6 +176,24 @@
     endif
 	@$(check-conventions)
 
+# Obj-C files (Mac OS X only).
+ifeq ($(PLATFORM), macosx)
+$(OBJDIR)/%.$(OBJECT_SUFFIX): %.m
+	@$(prep-target)
+	$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$@ $(CFLAGS_GPROF) $<
+	@$(check-conventions)
+
+$(OBJDIR)/%.$(OBJECT_SUFFIX): %.mm
+	@$(prep-target)
+	$(COMPILE.cc) $(CC_OBJECT_OUTPUT_FLAG)$@ $(CFLAGS_GPROF) $<
+	@$(check-conventions)
+
+$(OBJDIR)/%.$(OBJECT_SUFFIX): %.c
+	@$(prep-target)
+	$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$@ $(CFLAGS_GPROF) $<
+	@$(check-conventions)
+endif # PLATFORM
+
 #
 # Quick hack for making the compiler generate just the assembly file.
 #	$ gnumake obj/sparc/myfile.s
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/common/shared/Compiler-llvm.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,59 @@
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+#
+# LLVM Compiler settings
+#
+
+ifeq ($(PLATFORM), macosx)
+
+  # Settings specific to Mac OS X
+  ifeq ($(origin CC), default)
+   CC             = $(COMPILER_PATH)llvm-gcc
+  endif
+  CPP             = $(COMPILER_PATH)llvm-gcc -E
+  ifeq ($(origin CXX), default)
+   CXX            = $(COMPILER_PATH)llvm-g++
+  endif
+
+  REQUIRED_CC_VER = 4.2.1
+
+  # Option used to create a shared library
+  SHARED_LIBRARY_FLAG = -Wl,-install_name,@rpath/$(@F) -dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0
+  SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 )
+
+  AR = $(CC)
+  ARFLAGS = -nostdlib -r -arch i386 -arch x86_64 -o
+
+endif
+
+# Get llvm version
+_CC_VER :=$(shell $(CC) -dumpversion 2>&1 )
+CC_VER  :=$(call GetVersion,"$(_CC_VER)")
+
+# Name of compiler
+COMPILER_NAME = LLVM-GCC$(call MajorVersion,$(CC_VER))
+COMPILER_VERSION = $(COMPILER_NAME)
+
--- a/make/common/shared/Defs-java.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/common/shared/Defs-java.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -66,7 +66,11 @@
    -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput
 
 # JVM options
-JAVA_JVM_FLAGS = $(JAVA_HOTSPOT_DISABLE_PRINT_VMOPTIONS)
+ifeq ($(PLATFORM), macosx)
+  JAVA_JVM_FLAGS = $(JAVA_HOTSPOT_DISABLE_PRINT_VMOPTIONS) -Djava.awt.headless=true
+else
+  JAVA_JVM_FLAGS = $(JAVA_HOTSPOT_DISABLE_PRINT_VMOPTIONS)
+endif
 
 ifeq ($(ADD_CLIENT_VM_OPTION), true)
   JAVA_JVM_FLAGS += -client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/common/shared/Defs-macosx.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,252 @@
+#
+# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+#
+# Definitions for Bsd.
+#
+
+# Default for COMPILER_WARNINGS_FATAL on Bsd (C & C++ compiler warnings)
+ifndef COMPILER_WARNINGS_FATAL
+  COMPILER_WARNINGS_FATAL=false
+endif
+
+# Bsd should use parallel compilation for best build times
+ifndef COMPILE_APPROACH
+  COMPILE_APPROACH = parallel
+endif
+
+# Indication that we are doing an incremental build.
+#    This may trigger the creation of make depend files.
+ifndef INCREMENTAL_BUILD
+  INCREMENTAL_BUILD = false
+endif
+
+# FullPath just makes sure it never ends with a / and no duplicates
+define FullPath
+$(shell cd $1 2> $(DEV_NULL) && pwd)
+endef
+
+# OptFullPath: Absolute path name of a dir that might not initially exist.
+define OptFullPath
+$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
+endef
+
+# Location on system where jdk installs might be
+USRJDKINSTANCES_PATH = $(PACKAGE_PATH)
+
+# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
+#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined"
+  UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
+else
+  UNIXCOMMAND_PATH  = /bin/
+endif
+
+# USRBIN_PATH: path to where the most common Unix commands are.
+#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq "$(origin ALT_USRBIN_PATH)" "undefined"
+  USRBIN_PATH :=$(call PrefixPath,$(ALT_USRBIN_PATH))
+else
+  USRBIN_PATH  = /usr/bin/
+endif
+
+# UNIXCCS_PATH: path to where the Solaris ported UNIX commands can be found
+#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq "$(origin ALT_UNIXCCS_PATH)" "undefined"
+  UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH))
+else
+  UNIXCCS_PATH = /usr/ccs/bin/
+endif
+
+# SLASH_JAVA: location of all network accessable files
+ifdef ALT_SLASH_JAVA
+  SLASH_JAVA  :=$(ALT_SLASH_JAVA)
+else
+  SLASH_JAVA  := $(call DirExists,/java,/java,/NOT-SET)
+endif
+
+# JDK_DEVTOOLS_DIR: common path for all the java devtools
+ifdef ALT_JDK_DEVTOOLS_DIR
+  JDK_DEVTOOLS_DIR  =$(ALT_JDK_DEVTOOLS_DIR)
+else
+  JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
+endif
+
+# COMPILER_PATH: path to where the compiler and tools are installed.
+#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq "$(origin ALT_COMPILER_PATH)" "undefined"
+  COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH))
+else
+ ifeq ($(OS_VENDOR), Apple)
+  ifndef DEVELOPER_DIR
+   DEVELOPER_DIR = $(shell /usr/bin/xcode-select -print-path)/usr/bin/
+  endif
+  
+  COMPILER_PATH  := $(call DirExists,$(DEVELOPER_DIR),/usr/bin/,/NOT-SET)
+ else
+  COMPILER_PATH  =/usr/bin/
+ endif
+endif
+
+# OPENWIN_HOME: path to where the X11 environment is installed.
+#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq ($(ALT_OPENWIN_HOME),)
+  OPENWIN_HOME :=$(call PrefixPath,$(ALT_OPENWIN_HOME))
+else
+  OPENWIN_HOME  =$(X11_PATH)
+endif
+
+# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
+#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
+  DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH))
+else
+  DEVTOOLS_PATH =$(PACKAGE_PATH)/bin/
+endif
+
+# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
+# _BOOTDIR2: Second choice
+ifndef ALT_BOOTDIR
+  _BOOTDIR1  =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
+  _BOOTDIR2  =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
+endif
+
+# Always build headless on Bsd
+BUILD_HEADLESS = true
+LIBM=-lm
+
+ifeq ($(OS_VENDOR), Apple)
+  _CUPS_HEADERS_PATH=/usr/include
+else
+  _CUPS_HEADERS_PATH=$(PACKAGE_PATH)/include
+endif
+
+# Import JDK images allow for partial builds, components not built are
+#    imported (or copied from) these import areas when needed.
+
+# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for 
+#   multiple platforms, e.g. windows-i586, solaris-sparc, bsd-586, etc.
+ifdef ALT_BUILD_JDK_IMPORT_PATH
+  BUILD_JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
+else
+  BUILD_JDK_IMPORT_PATH   = $(PROMOTED_BUILD_BINARIES)
+endif
+BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
+
+# JDK_IMPORT_PATH: location of JDK install tree (this version) to import
+ifdef ALT_JDK_IMPORT_PATH
+  JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
+else
+  JDK_IMPORT_PATH   = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
+endif
+JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
+
+# HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
+ifdef ALT_HOTSPOT_IMPORT_PATH
+  HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
+else
+  HOTSPOT_IMPORT_PATH =$(JDK_IMPORT_PATH)
+endif
+HOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH)
+
+# HOTSPOT_CLIENT_PATH: location of client jvm library file.
+ifeq ($(ARCH_DATA_MODEL), 32)
+  ifdef ALT_HOTSPOT_CLIENT_PATH
+    HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
+  else
+    HOTSPOT_CLIENT_PATH   =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
+  endif
+  HOTSPOT_CLIENT_PATH:=$(call AltCheckValue,HOTSPOT_CLIENT_PATH)
+endif
+
+# HOTSPOT_SERVER_PATH: location of server jvm library file.
+ifdef ALT_HOTSPOT_SERVER_PATH
+  HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
+else
+  HOTSPOT_SERVER_PATH   =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
+endif
+HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH)
+
+# Special define for checking the binaries
+
+# Debug builds should downgrade warnings to just info
+MAPFILE_WARNING-DBG=INFO
+MAPFILE_WARNING-OPT=WARNING
+MAPFILE_WARNING-=WARNING
+MAPFILE_WARNING=$(MAPFILE_WARNING-$(VARIANT))
+
+# Macro to check it's input file for banned dependencies and verify the
+#   binary built properly. Relies on process exit code.
+ifndef CROSS_COMPILE_ARCH
+ifeq ($(OS_VENDOR), Apple)
+define binary_file_verification # binary_file
+( \
+  $(ECHO) "Checking for mapfile use in: $1" && \
+  if [ "`$(NM) -g $1 | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
+    $(ECHO) "WARNING: File was not built with a mapfile: $1"; \
+  fi && \
+  $(ECHO) "Library loads for: $1" && \
+  $(OTOOL) -L $1 && \
+  $(ECHO) "RUNPATH for: $1" && \
+  ( $(OTOOL) -l $1 | $(EGREP) 'path ' ) \
+) || true
+endef
+else
+ifeq ($(OS_VENDOR), OpenBSD)
+define binary_file_verification # binary_file
+( \
+  $(ECHO) "Checking for mapfile use in: $1" && \
+  if [ "`$(OBJDUMP) -T $1 | $(EGREP) '[0-9a-f]* g *DF \.text.*SUNWprivate'`" = "" ] ; then \
+    $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
+  fi && \
+  $(ECHO) "Library loads for: $1" && \
+  $(LDD) $1 && \
+  $(ECHO) "RUNPATH for: $1" && \
+  ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
+) || true
+endef
+else
+define binary_file_verification # binary_file
+( \
+  $(ECHO) "Checking for mapfile use in: $1" && \
+  if [ "`$(NM) -D -g --defined-only $1 | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
+    $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
+  fi && \
+  $(ECHO) "Library loads for: $1" && \
+  $(LDD) $1 && \
+  $(ECHO) "RUNPATH for: $1" && \
+  ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
+)
+endef
+endif # OS_VENDOR == OpenBSD
+endif # OS_VENDOR == Apple
+else
+define binary_file_verification 
+( \
+  $(ECHO) "Skipping binary file verification for cross-compile build" \
+)
+endef
+endif
+
--- a/make/common/shared/Defs-utils.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/common/shared/Defs-utils.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -67,6 +67,13 @@
   UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
 endif
 
+ifeq ($(PLATFORM),macosx)
+  UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH)
+  UTILS_USR_BIN_PATH=$(USRBIN_PATH)
+  UTILS_CCS_BIN_PATH=$(USRBIN_PATH)
+  UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
+endif
+
 # Utilities
 ifdef CROSS_COMPILE_ARCH
   AR             = $(COMPILER_PATH)ar
@@ -126,6 +133,7 @@
 MSGFMT         = $(UTILS_USR_BIN_PATH)msgfmt
 MV             = $(UTILS_COMMAND_PATH)mv
 NAWK           = $(UTILS_USR_BIN_PATH)nawk
+OTOOL          = $(UTILS_USR_BIN_PATH)otool
 PKGMK          = $(UTILS_COMMAND_PATH)pkgmk
 PRINTF         = $(UTILS_USR_BIN_PATH)printf
 PWD            = $(UTILS_COMMAND_PATH)pwd
@@ -220,3 +228,26 @@
   ECHO           = /usr/bin/echo
 endif
 
+ifeq ($(PLATFORM), macosx) 
+  BASENAME     = $(UTILS_USR_BIN_PATH)basename
+  EGREP        = $(UTILS_USR_BIN_PATH)egrep
+  EXPR         = $(UTILS_COMMAND_PATH)expr
+  FMT          = $(UTILS_USR_BIN_PATH)fmt
+  GREP         = $(UTILS_USR_BIN_PATH)grep
+  GUNZIP       = $(UTILS_USR_BIN_PATH)gunzip
+  ID           = $(UTILS_USR_BIN_PATH)id
+  MSGFMT       = $(UTILS_DEVTOOL_PATH)msgfmt
+  SED          = $(UTILS_USR_BIN_PATH)sed
+  SORT         = $(UTILS_USR_BIN_PATH)sort
+  TEST         = $(UTILS_COMMAND_PATH)test
+  TOUCH        = $(UTILS_USR_BIN_PATH)touch
+  TRUE         = $(UTILS_USR_BIN_PATH)true
+  UNAME        = $(UTILS_USR_BIN_PATH)uname
+  NAWK         = $(UTILS_USR_BIN_PATH)awk
+  UNZIPSFX     = $(UTILS_USR_BIN_PATH)unzipsfx
+  ZIPEXE       = $(UTILS_USR_BIN_PATH)zip
+  CPIO         = $(UTILS_USR_BIN_PATH)cpio
+  TAR          = $(UTILS_USR_BIN_PATH)tar
+  # Builtin shell command, no -e option needed
+  ECHO         = echo
+endif
--- a/make/common/shared/Defs-versions.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/common/shared/Defs-versions.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -44,6 +44,11 @@
   override CC_VERSION = gcc
 endif
 
+# Mac OS X uses LLVM by default
+ifeq ($(PLATFORM), macosx)
+  override CC_VERSION = llvm
+endif
+
 ##########################################################################
 #
 # List of JDK official minimum, expected, or required versions:
@@ -164,6 +169,17 @@
   endif
 endif
 
+# Mac specific
+ifeq ($(PLATFORM), macosx)
+  REQUIRED_OS_NAME            = Darwin
+  REQUIRED_OS_VERSION         = 11.2
+  REQUIRED_OS_VARIANT_NAME    = MacOSX
+  REQUIRED_OS_VARIANT_VERSION = 10.7.2
+  REQUIRED_COMPILER_NAME      = GCC4
+  REQUIRED_COMPILER_VERSION   = GCC4
+  REQUIRED_CC_VER             = 4.2.1
+endif
+
 # Windows specific
 ifeq ($(PLATFORM), windows)
   REQUIRED_OS_NAME            = Windows
--- a/make/common/shared/Defs.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/common/shared/Defs.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -177,6 +177,19 @@
   fi)
 endef
 
+# Expand SRCDIR_LIST, which is used to automatically include various
+# platform and shared sources/headers.  This is mainly useful for the
+# Mac OS X build, which pulls its platform sources from the solaris and/or
+# macosx trees, depending on the component.
+ifeq ($(PLATFORM), macosx)
+  define JavaSrcDirList
+  $(JAVA_SRCDIR_LIST:%=$1$(JDK_TOPDIR)/%/$2)
+  endef
+  define NativeSrcDirList
+  $(NATIVE_SRCDIR_LIST:%=$1$(JDK_TOPDIR)/%/$2)
+  endef
+endif
+
 # Make sure certain variables are non-empty at this point
 _check_values:=\
 $(call CheckValue,ARCH,),\
--- a/make/common/shared/Platform.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/common/shared/Platform.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -224,6 +224,85 @@
   MB_OF_MEMORY := $(shell free -m | fgrep Mem: | awk '{print $$2;}' )
 endif
 
+ifeq ($(SYSTEM_UNAME), Darwin)
+  PLATFORM = macosx
+  OS_NAME = darwin
+  OS_VENDOR = Apple
+  GB_OF_MEMORY := $(shell system_profiler SPHardwareDataType | fgrep Memory: | awk '{print $$2}')
+  MB_OF_MEMORY := $(shell expr ${GB_OF_MEMORY} '*' 1024)
+endif
+
+# Platform settings specific to BSD/Mac OS X
+ifeq ($(PLATFORM), macosx)
+  OS_VERSION := $(shell uname -r)
+
+  # Arch and OS name/version
+  # Darwin x86 builds are i386/amd64 universal by default.
+  # Allow arch to be set from the environment to avoid this.
+  ifeq ($(origin ARCH), undefined)
+   ifeq ($(PLATFORM), macosx)
+#     ifdef OPENJDK -- when universal 32/64 binaries available in Hotspot
+#        mach := universal
+#     else
+        mach := x86_64
+#     endif
+   else
+    mach := $(shell uname -m)
+   endif
+  else
+   mach := $(ARCH)
+  endif
+
+  archExpr = case "$(mach)" in \
+                i[3-9]86) \
+                    echo i586 \
+                    ;; \
+                sparc64) \
+                    echo sparcv9 \
+                    ;; \
+                sparc*) \
+                    echo sparc \
+                    ;; \
+                x86_64) \
+                    echo amd64 \
+                    ;; \
+                universal) \
+                    echo universal \
+                    ;; \
+                "Power Macintosh") \
+                    echo ppc \
+                    ;; \
+                *) \
+                    echo $(mach) \
+                    ;; \
+      esac
+  ARCH        := $(shell $(archExpr) )
+  ARCH_FAMILY := $(ARCH)
+
+  # i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64
+  # ARCH_DATA_MODEL does not exactly mean anything in universal
+  # but it has to be one or the other, so pick 32
+  ifneq (,$(findstring $(ARCH), i586 sparc ppc universal))
+    ARCH_DATA_MODEL=32
+  else
+    ARCH_DATA_MODEL=64
+  endif
+
+  # Need to maintain the jre/lib/i386 location for 32-bit Intel
+  ifeq ($(ARCH), i586)
+    LIBARCH = i386
+  else
+    LIBARCH = $(ARCH)
+  endif
+
+  # Value of Java os.arch property
+  ARCHPROP  = $(LIBARCH)
+
+  # Suffix for file bundles used in previous release
+  BUNDLE_FILE_SUFFIX=.tar.gz
+  # How much RAM does this machine have:
+endif
+
 # Windows with and without CYGWIN will be slightly different
 ifeq ($(SYSTEM_UNAME), Windows_NT)
   PLATFORM = windows
@@ -425,6 +504,22 @@
   ARCH_VM_SUBDIR=jre/lib/$(LIBARCH)
 endif
 
+# Darwin-specific Overrides
+ifeq ($(SYSTEM_UNAME),Darwin)
+  # The suffix applied to runtime libraries
+  LIBRARY_SUFFIX = dylib
+  # The suffix applied to link libraries
+  ifeq ($(ARCH), universal)
+    LIB_SUFFIX = o
+  else
+    LIB_SUFFIX = a
+  endif
+
+  ifeq ($(PLATFORM), macosx)
+  	ARCH_VM_SUBDIR=jre/lib
+  endif
+endif
+
 # Machines with 512Mb or less of real memory are considered low memory
 #    build machines and adjustments will be made to prevent excessing
 #    system swapping during the build.
--- a/make/common/shared/Sanity.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/common/shared/Sanity.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -113,6 +113,13 @@
   ALSA_VERSION := $(call GetVersion,$(_ALSA_VERSION))
 endif
 
+ifeq ($(PLATFORM), macosx)
+  # What kind of system we are using
+  OS_VERSION := $(shell uname -r)
+  OS_VARIANT_NAME := MacOSX
+  OS_VARIANT_VERSION := $(shell sw_vers -productVersion)
+endif
+
 ifeq ($(PLATFORM), windows)
   # Windows 2000 is 5.0, Windows XP is 5.1, Windows 2003 is 5.2
   #    Assume 5.0 (Windows 2000) if systeminfo does not help
@@ -839,8 +846,10 @@
 
 ######################################################
 # Check for existence of DEVTOOLS_PATH
+# All needed tools come with base system on Apple
 ######################################################
 sane-devtools_path:
+ifneq ($(OS_VENDOR), Apple)
 	@if [ "$(DEVTOOLS_PATH)" != "" -a ! -r "$(DEVTOOLS_PATH)" ]; then \
 	  $(ECHO) "ERROR: You do not have a valid DEVTOOLS_PATH setting. \n" \
 	    "      Please check your access to \n" \
@@ -848,6 +857,7 @@
 	    "      and/or check your value of ALT_DEVTOOLS_PATH. \n" \
 	    "" >> $(ERROR_FILE) ; \
 	fi
+endif
 
 ######################################################
 # Check for existence of MS_RUNTIME_LIBRARIES
--- a/make/docs/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/docs/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -70,6 +70,8 @@
 #    WARNING: This could cause thrashing on low memory machines.
 ifeq ($(ARCH_DATA_MODEL),64)
   MAX_VM_MEMORY = 1024
+else ifeq ($(ARCH),universal)
+  MAX_VM_MEMORY = 1024
 else
   MAX_VM_MEMORY = 612
 endif
--- a/make/docs/NON_CORE_PKGS.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/docs/NON_CORE_PKGS.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -83,6 +83,13 @@
 
 SCTPAPI_PKGS     = com.sun.nio.sctp
 
+ifeq ($(PLATFORM), macosx)
+APPLE_EXT_PKGS   = com.apple.concurrent   \
+                   com.apple.eawt         \
+                   com.apple.eawt.event   \
+                   com.apple.eio
+endif
+
 # non-core packages in rt.jar
 NON_CORE_PKGS    = $(DOMAPI_PKGS) \
                    $(MGMT_PKGS) \
@@ -92,5 +99,6 @@
                    $(OLD_JSSE_PKGS) \
                    $(HTTPSERVER_PKGS) \
                    $(SMARTCARDIO_PKGS) \
-                   $(SCTPAPI_PKGS)
+                   $(SCTPAPI_PKGS) \
+                   $(APPLE_EXT_PKGS)
 
--- a/make/java/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -57,6 +57,10 @@
   SUBDIRS += jexec
 endif # PLATFORM
 
+ifeq ($(PLATFORM), macosx)
+  SUBDIRS += jobjc
+endif # PLATFORM
+
 include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
--- a/make/java/fdlibm/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/fdlibm/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -60,6 +60,12 @@
   FASTDEBUG_OPTIMIZATION_LEVEL = NONE
 endif
 
+ifeq ($(PLATFORM),macosx)
+  # Turn all optimizations off
+  OPTIMIZATION_LEVEL = NONE
+  FASTDEBUG_OPTIMIZATION_LEVEL = NONE
+endif
+
 #
 # Include path.
 #
--- a/make/java/instrument/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/instrument/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -105,6 +105,16 @@
   # equivalent of strcasecmp is stricmp on Windows
   CPPFLAGS_COMMON += -Dstrcasecmp=stricmp
 else
+ifneq (,$(findstring $(PLATFORM), macosx))
+  ifneq ($(ARCH), universal)
+    LDFLAGS += -Wl,-all_load
+  endif
+  LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a
+  OTHER_LDLIBS += -liconv
+  ifeq ($(SYSTEM_ZLIB), true)
+    OTHER_LDLIBS += -lz
+  endif
+else
   LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
   OTHER_LDLIBS += -ljli
   OTHER_LDLIBS += -ldl 
@@ -117,6 +127,11 @@
     LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/jli
   endif
 endif
+endif
+
+ifeq ($(PLATFORM), macosx)
+  LDFLAGS += -framework Cocoa -framework Security -framework ApplicationServices
+endif
 
 #
 # Library to compile.
--- a/make/java/java/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/java/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -97,6 +97,15 @@
 
 endif # PLATFORM
 
+ifeq ($(PLATFORM), macosx)
+FILES_c    +=   java_props_macosx.c
+FILES_java += 	java/util/prefs/MacOSXPreferences.java \
+		java/util/prefs/MacOSXPreferencesFile.java \
+		java/util/prefs/MacOSXPreferencesFactory.java
+
+CFLAGS_$(VARIANT)/java_props_md.o = -Os -x objective-c
+endif
+
 #
 # Make sure first rule does 'all'
 #
@@ -168,8 +177,10 @@
 # Is the altzone extern documented in ctime(3C) available?
 #
 ifneq ($(PLATFORM), windows)
+ifneq ($(PLATFORM), macosx)
 HAVE_ALTZONE=true
 endif
+endif
 
 ifeq ($(HAVE_ALTZONE),true)
 OTHER_CPPFLAGS += -DHAVE_ALTZONE
@@ -208,8 +219,14 @@
 		       -libpath:$(OBJDIR)/../../../verify/$(OBJDIRNAME) verify.lib \
 		       shell32.lib delayimp.lib /DELAYLOAD:shell32.dll
 else
-OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) $(LIBNSL) $(LIBSCF) -ldl \
+OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) $(LIBNSL) $(LIBSCF) $(LIBDL) \
 		-L$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) -lfdlibm.$(ARCH)
+ifeq ($(PLATFORM), macosx)
+OTHER_LDLIBS += \
+        -framework CoreFoundation \
+        -framework Security \
+        -framework SystemConfiguration
+endif
 endif
 
 #
@@ -246,8 +263,15 @@
 # UNIXProcess.java is different for solaris and linux. We need to copy
 # the correct UNIXProcess.java over to $(GENSRCDIR)/java/lang/.
 
-$(GENSRCDIR)/java/lang/UNIXProcess.java: \
+ifeq ($(PLATFORM), macosx)
+PLATFORM_UNIX_PROCESS = \
+    $(PLATFORM_SRC)/classes/java/lang/UNIXProcess.java.bsd
+else
+PLATFORM_UNIX_PROCESS = \
     $(PLATFORM_SRC)/classes/java/lang/UNIXProcess.java.$(PLATFORM)
+endif
+
+$(GENSRCDIR)/java/lang/UNIXProcess.java: $(PLATFORM_UNIX_PROCESS)
 	$(install-file)
 
 clean:: 
--- a/make/java/java/genlocales.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/java/genlocales.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -73,6 +73,26 @@
 LOCALEGEN_SH=localegen.sh
 RESOURCE_NAMES="FormatData CollationData TimeZoneNames LocaleNames CurrencyNames CalendarData"
 
+
+# On MacOSX sed does not enter a newline as it does on other platforms with the same pattern
+# Using awk instead
+
+ifeq ($(PLATFORM), macosx)
+
+$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
+	@$(RM) $@.tmp.euro $@.tmp.noneuro;
+	@$(prep-target) 
+	@$(ECHO) $(Euro_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}'  > $@.tmp.euro;
+	@$(ECHO) $(Euro_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.euro;
+	@$(ECHO) $(NonEuro_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}' > $@.tmp.noneuro;
+	@$(ECHO) $(NonEuro_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.noneuro;
+	NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
+	     $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \
+		$@.tmp.noneuro $< $@
+	@$(RM) $@.tmp.euro $@.tmp.noneuro;
+
+else
+
 $(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
 	@$(RM) $@.tmp.euro $@.tmp.noneuro;
 	@$(prep-target) 
@@ -84,6 +104,7 @@
 	     $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \
 		$@.tmp.noneuro $< $@
 	@$(RM) $@.tmp.euro $@.tmp.noneuro;
+endif
 	
 genlocales : $(LocaleDataMetaInfo_Dest)  
 
--- a/make/java/java/localegen.sh	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/java/localegen.sh	Tue Mar 06 20:34:38 2012 +0000
@@ -55,9 +55,9 @@
 for FILE in $RESOURCE_NAMES 
 do
     getlocalelist $FILE $EURO_FILES_LIST
-    sed_script=$sed_script"-e \"s/#"$FILE"_EuroLocales#/$localelist/g\" "
+    sed_script=$sed_script"-e \"s@#"$FILE"_EuroLocales#@$localelist@g\" "
     getlocalelist $FILE $NONEURO_FILES_LIST
-    sed_script=$sed_script"-e \"s/#"$FILE"_NonEuroLocales#/$localelist/g\" "
+    sed_script=$sed_script"-e \"s@#"$FILE"_NonEuroLocales#@$localelist@g\" "
 done
 
 sed_script=$sed_script"$INPUT_FILE > $OUTPUT_FILE"
--- a/make/java/java_hprof_demo/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/java_hprof_demo/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -83,7 +83,7 @@
 ifeq ($(PLATFORM), windows)
   OTHER_LDLIBS += wsock32.lib winmm.lib
 else
-  OTHER_LDLIBS += $(LIBSOCKET) $(LIBNSL) -ldl
+  OTHER_LDLIBS += $(LIBSOCKET) $(LIBNSL) $(LIBDL)
 endif
 
 #
--- a/make/java/jli/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/jli/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -44,92 +44,121 @@
 
 include $(BUILDDIR)/common/Defs.gmk
 
-ZIP_SRC = $(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
+ifneq ($(SYSTEM_ZLIB),true)
+  ZIP_SRC = $(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
+endif #SYSTEM_ZLIB
 LAUNCHER_SHARE_SRC = $(SHARE_SRC)/bin
-LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)/bin
+
+# set the platform specific directory for macosx, also this platform shares
+# substantial family ties with its siblings (solaris and linux), thus we add
+# solaris src path to its compilation dependencies.
+ifeq ($(PLATFORM), macosx)
+ LAUNCHER_PLATFORM_SRC = $(BUILDDIR)/../src/macosx/bin
+ LAUNCHER_SOLARIS_PLATFORM_SRC  = $(BUILDDIR)/../src/solaris/bin
+else # !MACOSX
+ LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)/bin
+endif #PLATFORM
 
 ifeq ($(ZERO_BUILD), true)
-ERGO_FAMILY=zero
-else
-ifeq ($(ARCH_FAMILY), amd64)
-ERGO_FAMILY=i586
-else
-ERGO_FAMILY=$(ARCH_FAMILY)
-endif
-endif
-
+  ERGO_FAMILY=zero
+else # !ZERO_BUILD
+  ifneq (,$(findstring $(ARCH_FAMILY), amd64 x86_64))
+    ERGO_FAMILY=i586
+  else # !X86 FAMILY
+    ERGO_FAMILY=$(ARCH_FAMILY)
+  endif #ARCH_FAMILY
+endif # ZERO_BUILD
 
 #
 # Files to compile.
 #
-FILES_c = \
-	java.c \
-	splashscreen_stubs.c \
-	java_md.c \
-	parse_manifest.c \
-	version_comp.c \
-	wildcard.c \
-	jli_util.c \
-	inflate.c \
-	inftrees.c \
-	inffast.c \
-	zadler32.c \
-	zcrc32.c \
-	zutil.c
+FILES_c = java.c \
+          splashscreen_stubs.c \
+          parse_manifest.c \
+          version_comp.c \
+          wildcard.c \
+          jli_util.c
 
-ifneq ($(PLATFORM), windows)
-  FILES_c += ergo.c 
-  ERGO_ARCH_FILE = ergo_$(ERGO_FAMILY).c
-  # if the architecture specific ergo file exists then
-  # use it, else use the generic definitions from ergo.c
-  ifneq ($(wildcard $(LAUNCHER_PLATFORM_SRC)/$(ERGO_ARCH_FILE)),)
-    FILES_c += $(ERGO_ARCH_FILE)
-  else
-    OTHER_CPPFLAGS += -DUSE_GENERIC_ERGO
-  endif
-endif
+ifneq ($(SYSTEM_ZLIB),true)
+  FILES_c += inflate.c \
+             inftrees.c \
+             inffast.c \
+             zadler32.c \
+             zcrc32.c \
+             zutil.c
+endif # SYSTEM_ZLIB
+
+# add platform specific files
+ifeq ($(PLATFORM), windows)
+  FILES_c += java_md.c
+else # NIXES
+  FILES_c += java_md_common.c
+  ifeq ($(PLATFORM), macosx)
+    FILES_c += java_md_macosx.c
+  else # SOLARIS/LINUX
+    FILES_c += java_md_solinux.c
+    FILES_c += ergo.c 
+    ERGO_ARCH_FILE = ergo_$(ERGO_FAMILY).c
+    # if the architecture specific ergo file exists then
+    # use it, else use the generic definitions from ergo.c
+    ifneq ($(wildcard $(LAUNCHER_PLATFORM_SRC)/$(ERGO_ARCH_FILE)),)
+      FILES_c += $(ERGO_ARCH_FILE)
+    else # !ERGO_ARCH_FILE
+      OTHER_CPPFLAGS += -DUSE_GENERIC_ERGO
+    endif # ERGO_ARCH_FILE
+  endif #MACOSX
+endif #WINDOWS
 
 # Names of arch directories
 LIBARCH_DEFINES = -DLIBARCHNAME='"$(LIBARCH)"'
 ifeq ($(PLATFORM), solaris)
   LIBARCH_DEFINES += -DLIBARCH32NAME='"$(LIBARCH32)"'
   LIBARCH_DEFINES += -DLIBARCH64NAME='"$(LIBARCH64)"'
-endif
+endif # PLATFORM
 
-OTHER_CPPFLAGS += $(LIBARCH_DEFINES)
-
+ifeq ($(PLATFORM), macosx)
+  OTHER_CPPFLAGS += $(LIBARCH_DEFINES) -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
+else # ! MACOSX
+  OTHER_CPPFLAGS += $(LIBARCH_DEFINES)
+endif #PLATFORM
 
 ifneq ($(PLATFORM), windows)	# UNIX systems
-        LD_RUNPATH_EXTRAS += ..
-	LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/jli
-	# Note: its important to keep this order meaning -lc is the
-	# last library otherwise it could cause compatibility issues
-	# by pulling in SUNW_private symbols from libc
-	LDLIBS = -ldl -lc
-ifeq ($(USE_PTHREADS),true)
-	LDLIBS += -lpthread
-endif # USE_PTHREADS 
+  ifeq ($(PLATFORM), macosx)
+    LIB_LOCATION = $(LIBDIR)/jli
+  else # SOLARIS/LINUX
+    LD_RUNPATH_EXTRAS += ..
+    LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/jli
+    # Note: it is important to keep this order, meaning -lc as the
+    # last library, otherwise it could cause compatibility issues
+    # by pulling in SUNW_private symbols from libc
+    LDLIBS = -ldl -lc
+    ifeq ($(USE_PTHREADS),true)
+      LDLIBS += -lpthread
+    endif # USE_PTHREADS 
+  endif # PLATFORM
 endif # PLATFORM
 
 ifeq ($(PLATFORM), windows)
-	EXTRA_LIBS = advapi32.lib \
-		     comctl32.lib \
-		     user32.lib
-
-	JAVALIB =
-	OTHER_LCF =  -export:JLI_Launch \
-		     -export:JLI_ManifestIterate \
-		     -export:JLI_SetTraceLauncher \
-		     -export:JLI_ReportErrorMessage \
-		     -export:JLI_ReportErrorMessageSys \
-		     -export:JLI_ReportMessage \
-		     -export:JLI_ReportExceptionDescription
-
-endif
+  EXTRA_LIBS = advapi32.lib \
+               comctl32.lib \
+               user32.lib
+  JAVALIB =
+  OTHER_LCF = -export:JLI_Launch \
+              -export:JLI_ManifestIterate \
+              -export:JLI_SetTraceLauncher \
+              -export:JLI_ReportErrorMessage \
+              -export:JLI_ReportErrorMessageSys \
+              -export:JLI_ReportMessage \
+              -export:JLI_ReportExceptionDescription
+endif # PLATFORM
 
 OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)
 OTHER_INCLUDES += -I$(LAUNCHER_PLATFORM_SRC)
-OTHER_INCLUDES += -I$(ZIP_SRC)
+ifneq ($(SYSTEM_ZLIB),true)
+  OTHER_INCLUDES += -I$(ZIP_SRC)
+else # !SYSTEM_ZLIB
+  LDLIBS += -lz
+endif # SYSTEM_ZLIB
 
 #
 # Library to compile.
@@ -150,18 +179,52 @@
 # library.
 #
 ifeq ($(PLATFORM), windows)
+  STATIC_LIBRARY = $(OBJDIR)/static/$(LIBPREFIX)$(LIBRARY).lib
 
-STATIC_LIBRARY = $(OBJDIR)/static/$(LIBPREFIX)$(LIBRARY).lib
-
-$(STATIC_LIBRARY): $(FILES_o)
+  $(STATIC_LIBRARY): $(FILES_o)
 	@$(prep-target)
 	$(LIBEXE) -nologo -out:$@ $(FILES_o)
 
+  library:: $(STATIC_LIBRARY)
+endif # PLATFORM
+
+ifeq ($(PLATFORM), macosx)
+  # Some Obj-C code is embedded in java_md_macosx.c, we stipulate so, using
+  # "-x" option. Not doing so will cause the compiler to choose the language
+  # based on the filename suffix, also "-Os" optimizes the file for size.
+  CFLAGS_$(VARIANT)/java_md_macosx.o = -Os -x objective-c
+  # Needed for linking the various launchers
+  LDFLAGS += -framework Cocoa -framework Security \
+             -framework ApplicationServices
+  # Add solaris sources containing common logic to the header path
+  OTHER_INCLUDES += -I$(LAUNCHER_SOLARIS_PLATFORM_SRC)
+endif # PLATFORM
+
+STATIC_LIBRARY_DIR = $(OBJDIR)/static
+STATIC_LIBRARY_NAME = lib$(LIBRARY).a
+STATIC_LIBRARY = $(STATIC_LIBRARY_DIR)/$(STATIC_LIBRARY_NAME)
+
+$(STATIC_LIBRARY_DIR): | $(OBJDIR)
+	@$(MKDIR) $(STATIC_LIBRARY_DIR)
+
+$(STATIC_LIBRARY): $(STATIC_LIBRARY_DIR)
+	@$(prep-target)
+	$(AR) $(ARFLAGS) $@ $(FILES_o)
+
 library:: $(STATIC_LIBRARY)
 
-endif	# PLATFORM
-
-#
-# Add to ambient vpath so we pick up the library files
-#
-vpath %.c $(LAUNCHER_SHARE_SRC) $(ZIP_SRC) $(LAUNCHER_PLATFORM_SRC)
+vpath %.c $(LAUNCHER_SHARE_SRC) $(LAUNCHER_PLATFORM_SRC)
+ifneq ($(SYSTEM_ZLIB),true)
+  vpath %.c $(ZIP_SRC)
+else # !SYSTEM_ZLIB
+  #
+  # Add to ambient vpath so we pick up the library files, for macos we add 
+  # solaris sources which contains the common logic for all nixes
+  #
+  ifeq ($(PLATFORM), macosx)
+    vpath %.c $(LAUNCHER_SHARE_SRC) $(ZIP_SRC) $(LAUNCHER_PLATFORM_SRC) \
+          $(LAUNCHER_SOLARIS_PLATFORM_SRC)
+  else # !MACOSX
+    vpath %.c $(LAUNCHER_SHARE_SRC) $(ZIP_SRC) $(LAUNCHER_PLATFORM_SRC)
+  endif # MACOSX
+endif # SYSTEM_LIB
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/java/jobjc/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,76 @@
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+#
+# Makefile for building jobjc
+
+BUILDDIR = ../..
+include $(BUILDDIR)/common/Defs.gmk
+SRCDIR = $(JDK_TOPDIR)/src/macosx/native/jobjc
+
+ifeq ($(PLATFORM),macosx)
+
+# FRAMEWORKS for which we want to build bridge support
+FRAMEWORKS = Foundation CoreFoundation AppKit
+
+# metadata stuff
+GEN_DIR = $(OUTPUTDIR)/bridge_metadata
+STABLE_GEN_DIR = $(OUTPUTDIR)/stable_bridge_metadata
+STABLE_METADATA_FILES = $(addsuffix Full.bridgesupport,$(addprefix $(STABLE_GEN_DIR)/,$(FRAMEWORKS)))
+
+# source files
+CORE_SRC = $(shell $(FIND) $(SRCDIR) -type f -name "*.hs" -or -name "*.java" -or -name "*.m" -or -name "*.h" -print)
+GENERATOR_SRC = $(shell $(FIND) $(SRCDIR) -type f -name "*.java" -print)
+ADDITIONS_SRC = $(shell $(FIND) $(SRCDIR) -type f -name "*.java" -or -name "*.m" -or -name "*.h" -print)
+BUILD_SRC = $(SRCDIR)/JObjC.xcodeproj/project.pbxproj $(SRCDIR)/bridgesupport.gmk $(SRCDIR)/build.xml $(SRCDIR)/extract_classes.pl $(SRCDIR)/run-and-write-if-okay $(SRCDIR)/rungen $(SRCDIR)/runjava
+
+# jobjc products for jdk
+BUILT_DYLIB = $(OUTPUTDIR)/JObjC.dst/Debug/libJObjC.dylib
+BUILT_JAR = $(OUTPUTDIR)/JObjC.build/JObjC.jar
+
+$(GEN_DIR):
+	mkdir -p $(GEN_DIR)
+
+stabilize: $(GEN_DIR)
+	@echo Updating bridge support in $(GEN_DIR)
+	($(CD) $(GEN_DIR); $(MAKE) STABLE_GEN_DIR="$(STABLE_GEN_DIR)" FRAMEWORKS="$(FRAMEWORKS)" -f $(SRCDIR)/bridgesupport.gmk all)
+
+$(STABLE_METADATA_FILES): stabilize
+
+ABS_OUTPUTDIR=$(realpath $(OUTPUTDIR))
+ABS_STABLE_GEN_DIR=$(realpath $(STABLE_GEN_DIR))
+
+$(BUILT_DYLIB) $(BUILT_JAR): $(STABLE_METADATA_FILES) $(CORE_SRC) $(GENERATOR_SRC) $(ADDITIONS_SRC) $(BUILD_SRC)
+	@echo JObjC dylib or jar out of data wrt FRAMEWORKS '(' $(FRAMEWORKS) ')' or JObjC source '(' core, generator, additions, build ')'
+	@echo Running ant with java_home set to ${ALT_BOOTDIR}
+	(cd $(SRCDIR); OBJROOT="$(ABS_OUTPUTDIR)/JObjC.build" DSTROOT="$(ABS_OUTPUTDIR)/JObjC.dst" JAVA_HOME=${ALT_BOOTDIR} STABLE_GEN_DIR="$(ABS_STABLE_GEN_DIR)" /usr/bin/ant -verbose all)
+
+all: $(BUILD_DYLIB) $(BUILT_JAR)
+	$(CP) $(BUILT_DYLIB) $(LIB_LOCATION)/libJObjC.dylib
+
+clean clobber::
+	(cd $(SRCDIR); export OBJROOT=$(OUTPUTDIR)/JObjC.build; export DSTROOT=$(OUTPUTDIR)/JObjC.dst; /usr/bin/ant clean)
+
+endif
--- a/make/java/jvm/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/jvm/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -43,7 +43,6 @@
 $(PLATFORM_INCLUDE)/%.h: $(PLATFORM_SRC)/javavm/export/%.h
 	$(install-file)
 
-JVMCFG_DIR = $(LIBDIR)/$(LIBARCH)
 JVMCFG = $(JVMCFG_DIR)/jvm.cfg
 
 #
@@ -55,6 +54,14 @@
 JVMCFG_ARCH = $(ARCH)
 endif
 
+ifeq ($(PLATFORM),macosx)
+  JVMCFG_SRC=$(PLATFORM_SRC_MACOS)/bin/$(JVMCFG_ARCH)/jvm.cfg
+  JVMCFG_DIR = $(LIBDIR)
+else
+  JVMCFG_SRC=$(PLATFORM_SRC)/bin/$(JVMCFG_ARCH)/jvm.cfg
+  JVMCFG_DIR = $(LIBDIR)/$(LIBARCH)
+endif
+
 ifdef BUILD_CLIENT_ONLY
 $(JVMCFG)::
 	$(MKDIR) -p $(JVMCFG_DIR)
@@ -67,7 +74,7 @@
 	$(ECHO) "-native ERROR">>$(JVMCFG)
 	$(ECHO) "-green ERROR">>$(JVMCFG)
 else
-$(JVMCFG): $(PLATFORM_SRC)/bin/$(JVMCFG_ARCH)/jvm.cfg
+$(JVMCFG): $(JVMCFG_SRC)
 	$(install-file)
 endif
 
--- a/make/java/management/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/management/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -77,6 +77,12 @@
 
 endif # PLATFORM linux
 
+ifeq ($(PLATFORM),macosx)
+
+FILES_c     += MacosxOperatingSystem.c
+
+endif # PLATFORM macosx
+
 endif # PLATFORM
 
 #
--- a/make/java/net/FILES_c.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/net/FILES_c.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -43,6 +43,10 @@
     FILES_c += linux_close.c
 endif
 
+ifeq ($(PLATFORM), macosx)
+    FILES_c += bsd_close.c
+endif
+
 ifeq ($(PLATFORM), windows)
     FILES_c += TwoStacksPlainSocketImpl.c
     FILES_c += DualStackPlainSocketImpl.c
--- a/make/java/net/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/net/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -94,16 +94,23 @@
 
 include $(BUILDDIR)/common/Library.gmk
 
+ifeq ($(PLATFORM), macosx)
+ifdef DONT_ENABLE_IPV6
+  OTHER_CFLAGS += -DDONT_ENABLE_IPV6
+endif
+  OTHER_LDLIBS = $(JVMLIB) -pthread
+else
 ifeq ($(PLATFORM), windows)
   OTHER_LDLIBS = ws2_32.lib $(JVMLIB) \
                  secur32.lib iphlpapi.lib delayimp.lib \
                  /DELAYLOAD:secur32.dll /DELAYLOAD:iphlpapi.dll
 else
-  OTHER_LDLIBS = $(LIBSOCKET) $(LIBNSL) -ldl $(JVMLIB)
+  OTHER_LDLIBS = $(LIBSOCKET) $(LIBNSL) $(LIBDL) $(JVMLIB)
 endif
 ifeq ($(PLATFORM), linux)
   OTHER_LDLIBS += -lpthread
 endif
+endif # PLATFORM
 
 CLASSES.export += java.lang.Integer java.io.FileDescriptor java.net.InetAddressImplFactory java.net.Inet4AddressImpl java.net.Inet6AddressImpl
 
--- a/make/java/nio/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/nio/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -260,6 +260,91 @@
 	sun/nio/fs/UnixConstants.java
 endif # PLATFORM = linux
 
+ifeq ($(PLATFORM), macosx)
+FILES_java += \
+        sun/nio/ch/AbstractPollSelectorImpl.java \
+	sun/nio/ch/BsdAsynchronousChannelProvider.java \
+	sun/nio/ch/InheritedChannel.java \
+	sun/nio/ch/KQueue.java \
+	sun/nio/ch/KQueuePort.java \
+        sun/nio/ch/PollSelectorProvider.java \
+        sun/nio/ch/PollSelectorImpl.java \
+	sun/nio/ch/Port.java \
+	sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \
+	sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java \
+	sun/nio/ch/UnixAsynchronousSocketChannelImpl.java \
+	\
+	sun/nio/fs/GnomeFileTypeDetector.java \
+	sun/nio/fs/BsdFileStore.java \
+	sun/nio/fs/BsdFileSystem.java \
+	sun/nio/fs/BsdFileSystemProvider.java \
+	sun/nio/fs/BsdNativeDispatcher.java \
+	sun/nio/fs/PollingWatchService.java \
+	sun/nio/fs/UnixChannelFactory.java \
+	sun/nio/fs/UnixCopyFile.java \
+	sun/nio/fs/UnixDirectoryStream.java \
+	sun/nio/fs/UnixException.java \
+	sun/nio/fs/UnixFileAttributeViews.java \
+	sun/nio/fs/UnixFileAttributes.java \
+	sun/nio/fs/UnixFileKey.java \
+	sun/nio/fs/UnixFileModeAttribute.java \
+	sun/nio/fs/UnixFileStore.java \
+	sun/nio/fs/UnixFileStoreAttributes.java \
+	sun/nio/fs/UnixFileSystem.java \
+	sun/nio/fs/UnixFileSystemProvider.java \
+	sun/nio/fs/UnixMountEntry.java \
+	sun/nio/fs/UnixNativeDispatcher.java \
+	sun/nio/fs/UnixPath.java \
+	sun/nio/fs/UnixSecureDirectoryStream.java \
+	sun/nio/fs/UnixUriUtils.java \
+	sun/nio/fs/UnixUserPrincipals.java
+
+FILES_c += \
+	InheritedChannel.c \
+	NativeThread.c \
+        PollArrayWrapper.c \
+	UnixAsynchronousServerSocketChannelImpl.c \
+	UnixAsynchronousSocketChannelImpl.c \
+	\
+	GnomeFileTypeDetector.c \
+	BsdNativeDispatcher.c \
+	UnixCopyFile.c \
+	UnixNativeDispatcher.c \
+	\
+	KQueue.c \
+	KQueuePort.c
+
+FILES_export += \
+	sun/nio/ch/InheritedChannel.java \
+	sun/nio/ch/KQueue.java \
+	sun/nio/ch/KQueuePort.java \
+	sun/nio/ch/NativeThread.java \
+	sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java \
+	sun/nio/ch/UnixAsynchronousSocketChannelImpl.java \
+	\
+	sun/nio/fs/GnomeFileTypeDetector.java \
+	sun/nio/fs/BsdNativeDispatcher.java \
+	sun/nio/fs/UnixCopyFile.java \
+	sun/nio/fs/UnixNativeDispatcher.java
+	
+FILES_gen += \
+	sun/nio/fs/UnixConstants.java
+endif # PLATFORM = bsd, macosx
+
+ifeq ($(PLATFORM), macosx)
+FILES_java += \
+    sun/nio/ch/KQueueSelectorProvider.java \
+    sun/nio/ch/KQueueSelectorImpl.java \
+    sun/nio/ch/KQueueArrayWrapper.java
+
+FILES_c += \
+    KQueueArrayWrapper.c
+
+vpath %.c $(call NativeSrcDirList,,native/sun/nio/fs)
+vpath %.c $(call NativeSrcDirList,,native/sun/nio/ch)
+
+else
+
 #
 # Find platform-specific C source files
 #
@@ -267,6 +352,8 @@
 vpath %.c $(PLATFORM_SRC)/native/sun/nio/ch
 vpath %.c $(SHARE_SRC)/native/sun/nio/ch
 
+endif # PLATFORM = macosx
+
 #
 # Various variables
 #
@@ -292,10 +379,13 @@
      $(OBJDIR)/../../../java.lang/java/$(OBJDIRNAME)/FileDescriptor_md.obj
 endif
 ifeq ($(PLATFORM), linux)
-OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl
+OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread $(LIBDL)
+endif
+ifeq ($(PLATFORM), macosx)
+OTHER_LDLIBS += -L$(LIBDIR) -ljava -lnet -pthread
 endif
 ifeq ($(PLATFORM), solaris)
-OTHER_LDLIBS += $(JVMLIB) $(LIBSOCKET) -lposix4 -ldl -lsendfile \
+OTHER_LDLIBS += $(JVMLIB) $(LIBSOCKET) -lposix4 $(LIBDL) -lsendfile \
 		-L$(LIBDIR)/$(LIBARCH) -ljava -lnet
 endif # PLATFORM
 
@@ -316,6 +406,9 @@
 ifeq ($(PLATFORM), linux)
 FILES_m = mapfile-linux
 endif
+ifeq ($(PLATFORM), macosx)
+FILES_m = mapfile-bsd
+endif
 include $(BUILDDIR)/common/Mapfile-vers.gmk
 include $(BUILDDIR)/common/Library.gmk
 
@@ -818,9 +911,15 @@
 $(TEMPDIR)/$(GENSOR_SRC) : $(GENSOR_SRC)
 	$(install-file)
 
+ifeq ($(PLATFORM), macosx)
+  NIO_CC=$(HOST_CC)
+else
+  NIO_CC=$(CC)
+endif
+
 $(GENSOR_EXE) : $(TEMPDIR)/$(GENSOR_SRC)
 	$(prep-target)
-	($(CD) $(TEMPDIR); $(CC) $(CPPFLAGS) $(LDDFLAGS) \
+	($(CD) $(TEMPDIR); $(NIO_CC) $(CPPFLAGS) $(LDDFLAGS) \
 	   -o genSocketOptionRegistry$(EXE_SUFFIX) $(GENSOR_SRC))
 
 ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/java/nio/mapfile-bsd	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,179 @@
+#
+# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+SUNWprivate_1.1 {
+	global:
+                Java_java_nio_MappedByteBuffer_force0;
+                Java_java_nio_MappedByteBuffer_isLoaded0;
+                Java_java_nio_MappedByteBuffer_load0;
+                Java_sun_nio_ch_DatagramChannelImpl_disconnect0;
+                Java_sun_nio_ch_DatagramChannelImpl_initIDs;
+                Java_sun_nio_ch_DatagramChannelImpl_receive0;
+                Java_sun_nio_ch_DatagramChannelImpl_send0;
+                Java_sun_nio_ch_DatagramDispatcher_read0;
+                Java_sun_nio_ch_DatagramDispatcher_readv0;
+                Java_sun_nio_ch_DatagramDispatcher_write0;
+                Java_sun_nio_ch_DatagramDispatcher_writev0;
+                Java_sun_nio_ch_FileChannelImpl_close0;
+                Java_sun_nio_ch_FileChannelImpl_initIDs;
+                Java_sun_nio_ch_FileChannelImpl_map0;
+                Java_sun_nio_ch_FileChannelImpl_position0;
+                Java_sun_nio_ch_FileChannelImpl_transferTo0;
+                Java_sun_nio_ch_FileChannelImpl_unmap0;
+                Java_sun_nio_ch_FileDispatcherImpl_close0;
+                Java_sun_nio_ch_FileDispatcherImpl_closeIntFD;
+		Java_sun_nio_ch_FileDispatcherImpl_force0;
+                Java_sun_nio_ch_FileDispatcherImpl_init;
+		Java_sun_nio_ch_FileDispatcherImpl_lock0;
+                Java_sun_nio_ch_FileDispatcherImpl_preClose0;
+                Java_sun_nio_ch_FileDispatcherImpl_pread0;
+                Java_sun_nio_ch_FileDispatcherImpl_pwrite0;
+                Java_sun_nio_ch_FileDispatcherImpl_read0;
+                Java_sun_nio_ch_FileDispatcherImpl_readv0;
+		Java_sun_nio_ch_FileDispatcherImpl_release0;
+		Java_sun_nio_ch_FileDispatcherImpl_size0;
+		Java_sun_nio_ch_FileDispatcherImpl_truncate0;
+                Java_sun_nio_ch_FileDispatcherImpl_write0;
+                Java_sun_nio_ch_FileDispatcherImpl_writev0;
+                Java_sun_nio_ch_FileKey_init;
+                Java_sun_nio_ch_FileKey_initIDs;
+		Java_sun_nio_ch_InheritedChannel_close0;
+		Java_sun_nio_ch_InheritedChannel_dup;
+		Java_sun_nio_ch_InheritedChannel_dup2;
+		Java_sun_nio_ch_InheritedChannel_open0;
+		Java_sun_nio_ch_InheritedChannel_peerAddress0;
+		Java_sun_nio_ch_InheritedChannel_peerPort0;
+		Java_sun_nio_ch_InheritedChannel_soType0;
+                Java_sun_nio_ch_IOUtil_configureBlocking;
+                Java_sun_nio_ch_IOUtil_drain;
+                Java_sun_nio_ch_IOUtil_fdVal;
+                Java_sun_nio_ch_IOUtil_initIDs;
+                Java_sun_nio_ch_IOUtil_makePipe;
+                Java_sun_nio_ch_IOUtil_randomBytes;
+                Java_sun_nio_ch_IOUtil_setfdVal;
+		Java_sun_nio_ch_KQueue_kqueue;
+		Java_sun_nio_ch_KQueue_keventRegister;
+		Java_sun_nio_ch_KQueue_keventPoll;
+		Java_sun_nio_ch_KQueue_keventSize;
+		Java_sun_nio_ch_KQueue_identOffset;
+		Java_sun_nio_ch_KQueue_filterOffset;
+		Java_sun_nio_ch_KQueue_flagsOffset;
+		Java_sun_nio_ch_KQueuePort_socketpair;
+		Java_sun_nio_ch_KQueuePort_interrupt;
+		Java_sun_nio_ch_KQueuePort_drain1;
+		Java_sun_nio_ch_KQueuePort_close0;
+		Java_sun_nio_ch_NativeThread_current;
+		Java_sun_nio_ch_NativeThread_init;
+		Java_sun_nio_ch_NativeThread_signal;
+		Java_sun_nio_ch_Net_canIPv6SocketJoinIPv4Group0;
+		Java_sun_nio_ch_Net_canJoin6WithIPv4Group0;
+		Java_sun_nio_ch_Net_socket0;
+		Java_sun_nio_ch_Net_bind0;
+		Java_sun_nio_ch_Net_connect0;
+		Java_sun_nio_ch_Net_listen;
+		Java_sun_nio_ch_Net_localPort;
+		Java_sun_nio_ch_Net_localInetAddress;
+		Java_sun_nio_ch_Net_getIntOption0;
+		Java_sun_nio_ch_Net_setIntOption0;
+                Java_sun_nio_ch_Net_initIDs;
+		Java_sun_nio_ch_Net_isIPv6Available0;
+		Java_sun_nio_ch_Net_joinOrDrop4;
+		Java_sun_nio_ch_Net_blockOrUnblock4;
+		Java_sun_nio_ch_Net_joinOrDrop6;
+		Java_sun_nio_ch_Net_blockOrUnblock6;
+		Java_sun_nio_ch_Net_setInterface4;
+		Java_sun_nio_ch_Net_getInterface4;
+		Java_sun_nio_ch_Net_setInterface6;
+		Java_sun_nio_ch_Net_getInterface6;
+		Java_sun_nio_ch_Net_shutdown;
+                Java_sun_nio_ch_PollArrayWrapper_interrupt;
+                Java_sun_nio_ch_PollArrayWrapper_poll0;
+                Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
+                Java_sun_nio_ch_ServerSocketChannelImpl_initIDs;
+                Java_sun_nio_ch_SocketChannelImpl_checkConnect;
+		Java_sun_nio_ch_SocketChannelImpl_sendOutOfBandData;
+		Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_accept0;
+		Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_initIDs;
+		Java_sun_nio_ch_UnixAsynchronousSocketChannelImpl_checkConnect;
+		Java_sun_nio_fs_BsdNativeDispatcher_initIDs;
+		Java_sun_nio_fs_BsdNativeDispatcher_getfsstat;
+		Java_sun_nio_fs_BsdNativeDispatcher_fsstatEntry;
+		Java_sun_nio_fs_BsdNativeDispatcher_endfsstat;
+		Java_sun_nio_fs_GnomeFileTypeDetector_initializeGio;
+		Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGio;
+		Java_sun_nio_fs_GnomeFileTypeDetector_initializeGnomeVfs;
+		Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGnomeVfs;
+		Java_sun_nio_fs_UnixNativeDispatcher_init;
+		Java_sun_nio_fs_UnixNativeDispatcher_getcwd;
+		Java_sun_nio_fs_UnixNativeDispatcher_strerror;
+		Java_sun_nio_fs_UnixNativeDispatcher_dup;
+		Java_sun_nio_fs_UnixNativeDispatcher_access0;
+		Java_sun_nio_fs_UnixNativeDispatcher_stat0;
+		Java_sun_nio_fs_UnixNativeDispatcher_lstat0;
+		Java_sun_nio_fs_UnixNativeDispatcher_fstat;
+		Java_sun_nio_fs_UnixNativeDispatcher_fstatat0;
+		Java_sun_nio_fs_UnixNativeDispatcher_chmod0;
+		Java_sun_nio_fs_UnixNativeDispatcher_fchmod;
+		Java_sun_nio_fs_UnixNativeDispatcher_chown0;
+		Java_sun_nio_fs_UnixNativeDispatcher_lchown0;
+		Java_sun_nio_fs_UnixNativeDispatcher_fchown;
+		Java_sun_nio_fs_UnixNativeDispatcher_utimes0;
+		Java_sun_nio_fs_UnixNativeDispatcher_futimes;
+		Java_sun_nio_fs_UnixNativeDispatcher_open0;
+		Java_sun_nio_fs_UnixNativeDispatcher_openat0;
+		Java_sun_nio_fs_UnixNativeDispatcher_close;
+		Java_sun_nio_fs_UnixNativeDispatcher_read;
+		Java_sun_nio_fs_UnixNativeDispatcher_write;
+		Java_sun_nio_fs_UnixNativeDispatcher_fopen0;
+		Java_sun_nio_fs_UnixNativeDispatcher_fclose;
+		Java_sun_nio_fs_UnixNativeDispatcher_opendir0;
+		Java_sun_nio_fs_UnixNativeDispatcher_fdopendir;
+		Java_sun_nio_fs_UnixNativeDispatcher_readdir;
+		Java_sun_nio_fs_UnixNativeDispatcher_closedir;
+		Java_sun_nio_fs_UnixNativeDispatcher_link0;
+		Java_sun_nio_fs_UnixNativeDispatcher_unlink0;
+		Java_sun_nio_fs_UnixNativeDispatcher_unlinkat0;
+		Java_sun_nio_fs_UnixNativeDispatcher_rename0;
+		Java_sun_nio_fs_UnixNativeDispatcher_renameat0;
+		Java_sun_nio_fs_UnixNativeDispatcher_mkdir0;
+		Java_sun_nio_fs_UnixNativeDispatcher_rmdir0;
+		Java_sun_nio_fs_UnixNativeDispatcher_symlink0;
+		Java_sun_nio_fs_UnixNativeDispatcher_readlink0;
+		Java_sun_nio_fs_UnixNativeDispatcher_realpath0;
+		Java_sun_nio_fs_UnixNativeDispatcher_statvfs0;
+		Java_sun_nio_fs_UnixNativeDispatcher_pathconf0;
+		Java_sun_nio_fs_UnixNativeDispatcher_fpathconf;
+		Java_sun_nio_fs_UnixNativeDispatcher_mknod0;
+		Java_sun_nio_fs_UnixNativeDispatcher_getpwuid;
+		Java_sun_nio_fs_UnixNativeDispatcher_getgrgid;
+		Java_sun_nio_fs_UnixNativeDispatcher_getpwnam0;
+		Java_sun_nio_fs_UnixNativeDispatcher_getgrnam0;
+		Java_sun_nio_fs_UnixNativeDispatcher_getextmntent;
+		Java_sun_nio_fs_UnixCopyFile_transfer;
+		handleSocketError;
+
+	local:
+		*;
+};
--- a/make/java/npt/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/npt/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -67,6 +67,11 @@
   OTHER_LCF += -export:nptInitialize -export:nptTerminate
 endif
 
+# Add location of iconv header
+ifeq ($(PLATFORM), macosx))
+  OTHER_LDLIBS += -liconv
+endif
+
 #
 # Add to ambient vpath so we pick up the library files
 #
--- a/make/java/redist/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/redist/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -46,6 +46,8 @@
 
 ifeq ($(PLATFORM), windows)
   LIB_LOCATION = $(BINDIR)
+else ifeq ($(PLATFORM), macosx)
+  LIB_LOCATION = $(LIBDIR)
 else
   LIB_LOCATION = $(LIBDIR)/$(LIBARCH)
 endif
--- a/make/java/redist/sajdi/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/redist/sajdi/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -29,6 +29,8 @@
 
 ifeq ($(PLATFORM), windows)
   LIB_LOCATION = $(BINDIR)
+else ifeq ($(PLATFORM), macosx)
+  LIB_LOCATION = $(LIBDIR)
 else
   LIB_LOCATION = $(LIBDIR)/$(LIBARCH)
 endif
--- a/make/java/security/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/security/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -45,13 +45,20 @@
 ifeq ($(PLATFORM), solaris)
 PROPS_SRC   = $(TOPDIR)/src/share/lib/security/java.security-solaris
 
-else # PLATFORM
+else # NOT_SOLARIS
 
 # Register Microsoft CryptoAPI provider only on Windows platform.
 ifeq ($(PLATFORM), windows)
   PROPS_SRC   = $(TOPDIR)/src/share/lib/security/java.security-windows
-endif
-endif # PLATFORM
+
+else # NOT_WINDOWS
+
+ifeq ($(PLATFORM), macosx)
+  PROPS_SRC   = $(TOPDIR)/src/share/lib/security/java.security-macosx
+endif # MACOSX
+
+endif # NOT_WINDOWS
+endif # NOT_SOLARIS
 
 
 PROPS_BUILD = $(LIBDIR)/security/java.security
--- a/make/java/zip/FILES_c.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/zip/FILES_c.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -29,7 +29,10 @@
 	Deflater.c \
 	Inflater.c \
 	ZipFile.c \
-	zip_util.c \
+	zip_util.c
+
+ifneq ($(SYSTEM_ZLIB),true)
+FILES_c += \
 	compress.c \
 	deflate.c \
 	gzclose.c \
@@ -44,4 +47,5 @@
 	uncompr.c \
 	zadler32.c \
 	zcrc32.c \
-	zutil.c 
+	zutil.c
+endif
--- a/make/java/zip/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/java/zip/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -74,16 +74,24 @@
 CPPFLAGS += -UDEBUG 
 endif
 
-CPPFLAGS += -I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
 CPPFLAGS += -I$(SHARE_SRC)/native/java/io
 CPPFLAGS += -I$(PLATFORM_SRC)/native/java/io
 
+ifneq ($(SYSTEM_ZLIB),true)
+CPPFLAGS += -I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
+
 #
 # Add to ambient vpath so we pick up the library files
 #
 vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/zlib-$(ZLIB_VERSION)
+endif
 
 #
 # Link to JVM library for JVM_Zip* functions
 #
+ifeq ($(SYSTEM_ZLIB),true)
+OTHER_LDLIBS = -lz
+else
 OTHER_LDLIBS = $(JVMLIB)
+endif
+
--- a/make/javax/sound/FILES_c.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/javax/sound/FILES_c.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -34,6 +34,18 @@
 
 FILES_linux = 
 
+FILES_bsd =
+
+FILES_macosx = \
+    PLATFORM_API_MacOSX_MidiIn.c \
+    PLATFORM_API_MacOSX_MidiOut.c \
+    PLATFORM_API_MacOSX_MidiUtils.c
+
+FILES_cpp_macosx = \
+    PLATFORM_API_MacOSX_Utils.cpp \
+    PLATFORM_API_MacOSX_PCM.cpp \
+    PLATFORM_API_MacOSX_Ports.cpp
+
 FILES_windows = \
 	PLATFORM_API_WinOS_MidiIn.c \
 	PLATFORM_API_WinOS_MidiOut.c \
--- a/make/javax/sound/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/javax/sound/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,11 @@
 PACKAGE = javax.sound
 LIBRARY = jsound
 PRODUCT = sun
+
+ifeq ($(PLATFORM),macosx)
+CPLUSPLUSLIBRARY = true
+endif
+
 include $(BUILDDIR)/common/Defs.gmk
 
 # include defines for sound
@@ -77,6 +82,7 @@
 	$(FILES_mkdirs)
 
 FILES_c += $(FILES_$(PLATFORM))
+FILES_cpp += $(FILES_cpp_$(PLATFORM))
 
 
 #
@@ -105,6 +111,22 @@
   #MXSPP_ADD = $(PLATFORM)-$(ARCH)/
 endif # PLATFORM linux
 
+ifeq ($(PLATFORM), macosx)
+  CPPFLAGS += -DUSE_PORTS=TRUE \
+              -DUSE_DAUDIO=TRUE \
+              -DUSE_PLATFORM_MIDI_OUT=TRUE \
+              -DUSE_PLATFORM_MIDI_IN=TRUE
+
+  INCLUDE_PORTS = TRUE
+  INCLUDE_DAUDIO = TRUE
+  INCLUDE_MIDI = TRUE
+
+  LDFLAGS += -framework CoreAudio -framework CoreFoundation \
+             -framework CoreServices -framework AudioUnit -lstdc++ \
+             -framework CoreMIDI -framework AudioToolbox
+  CXXFLAGS += -I`xcode-select -print-path`/Extras/CoreAudio/PublicUtility
+endif
+
 ifeq ($(PLATFORM), solaris)
   # build with ports and direct audio
   CPPFLAGS += -DUSE_PORTS=TRUE 	\
@@ -144,6 +166,11 @@
 CPPFLAGS += \
 	-I$(SHARE_SRC)/native/com/sun/media/sound
 
+ifeq ($(PLATFORM), macosx)
+vpath %.c   $(call NativeSrcDirList,,native/com/sun/media/sound)
+vpath %.cpp $(call NativeSrcDirList,,native/com/sun/media/sound)
+
+else
 #
 # Add to the ambient VPATH.
 #
@@ -151,6 +178,7 @@
 vpath %.c $(PLATFORM_SRC)/native/com/sun/media/sound
 vpath %.cpp $(PLATFORM_SRC)/native/com/sun/media/sound
 
+endif
 
 #
 # Include rules
--- a/make/javax/sound/SoundDefs.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/javax/sound/SoundDefs.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -40,6 +40,10 @@
   CPPFLAGS += -DX_PLATFORM=X_LINUX
 endif # PLATFORM linux
 
+ifeq ($(PLATFORM), macosx)
+  CPPFLAGS += -DX_PLATFORM=X_MACOSX
+endif # PLATFORM macosx
+
 ifeq ($(PLATFORM), solaris)
   CPPFLAGS += -DX_PLATFORM=X_SOLARIS
 
--- a/make/jpda/back/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/jpda/back/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -49,7 +49,7 @@
                  -I$(GENNATIVESRCDIR)/jdwp
 
 ifneq ($(PLATFORM), windows)
-  OTHER_LDLIBS += -ldl
+  OTHER_LDLIBS += $(LIBDL)
 endif # PLATFORM
 
 #
--- a/make/jpda/transport/socket/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/jpda/transport/socket/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -40,6 +40,11 @@
   OTHER_LDLIBS += $(LIBNSL) $(LIBSOCKET) -lpthread
 endif
 
+ifeq ($(PLATFORM), macosx))
+  LIBSOCKET =
+  OTHER_LDLIBS += -pthread
+endif
+
 ifeq ($(PLATFORM), solaris)
   OTHER_LDLIBS += $(LIBNSL) $(LIBSOCKET)
 endif
--- a/make/jprt.properties	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/jprt.properties	Tue Mar 06 20:34:38 2012 +0000
@@ -39,6 +39,7 @@
     solaris_x64_5.10-{product|fastdebug}, 			\
     linux_i586_2.6-{product|fastdebug}, 			\
     linux_x64_2.6-{product|fastdebug}, 				\
+    macosx_x64_10.7-{product|fastdebug}, 			\
     windows_i586_5.1-{product|fastdebug}, 			\
     windows_x64_5.2-{product|fastdebug}
 
@@ -53,6 +54,7 @@
     solaris_x64_5.10-product-c2-TESTNAME,                       \
     linux_i586_2.6-product-{c1|c2}-TESTNAME,                    \
     linux_x64_2.6-product-c2-TESTNAME,                          \
+    macosx_x64_10.7-product-c2-TESTNAME,                        \
     windows_i586_5.1-product-c1-TESTNAME,                       \
     windows_x64_5.2-product-c2-TESTNAME
 
--- a/make/launchers/Makefile.launcher	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/launchers/Makefile.launcher	Tue Mar 06 20:34:38 2012 +0000
@@ -82,12 +82,15 @@
 endif
 ifeq ($(PROGRAM),jsadebugd)
   SA_TOOL=true
+  INFO_PLIST_FILE=Info-privileged.plist
 endif
 ifeq ($(PROGRAM),jinfo)
   SA_TOOL=true
+  INFO_PLIST_FILE=Info-privileged.plist
 endif
 ifeq ($(PROGRAM),jmap)
   SA_TOOL=true
+  INFO_PLIST_FILE=Info-privileged.plist
 endif
 
 # special idlj launcher
--- a/make/mkdemo/jvmti/hprof/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/mkdemo/jvmti/hprof/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -37,12 +37,11 @@
 
 ifeq ($(PLATFORM), windows)
   EXTRA_LIBS += wsock32.lib winmm.lib
+else
+  OTHER_LDLIBS += $(LIBSOCKET) $(LIBNSL) $(LIBDL)
+ifeq ($(PLATFORM), linux)
+  OTHER_LDLIBS += -lpthread
 endif
-ifeq ($(PLATFORM), solaris)
-  OTHER_LDLIBS += $(LIBSOCKET) $(LIBNSL) -ldl
-endif
-ifeq ($(PLATFORM), linux)
-  OTHER_LDLIBS += $(LIBSOCKET) $(LIBNSL) -ldl -lpthread
 endif
 
 #
--- a/make/mksample/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/mksample/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -47,6 +47,11 @@
 	SUBDIRS += dtrace
 endif
 
+# and Mac OS X too
+ifeq ($(PLATFORM), macosx) 
+	SUBDIRS += dtrace
+endif
+
 include $(BUILDDIR)/common/Subdirs.gmk
 
 TOPLEVEL_FILES =							\
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/netbeans/common/architectures/name-Bsd.properties	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+#   - Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#
+#   - Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+#   - Neither the name of Oracle nor the names of its
+#     contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+platform=bsd
--- a/make/sun/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/sun/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -58,9 +58,17 @@
   XAWT_SUBDIR     = xawt
 endif
 
+ifeq ($(PLATFORM), macosx)
+  LWAWT_PRE_SUBDIR = osxapp
+  LWAWT_SUBDIR = lwawt
+endif
+
 ifndef OPENJDK
+ifneq ($(PLATFORM), macosx)
   JDBC_SUBDIR = jdbc
 endif
+endif
+
 ifdef OPENJDK
   RENDER_SUBDIR = pisces
 else
@@ -78,7 +86,7 @@
   DISPLAY_TOOLS = applet
 endif
 SUBDIRS_desktop    = audio $(RENDER_SUBDIR) image \
-                     $(DISPLAY_LIBS) $(DGA_SUBDIR) \
+                     $(LWAWT_PRE_SUBDIR) $(DISPLAY_LIBS) $(DGA_SUBDIR) $(LWAWT_SUBDIR) \
                      jawt font jpeg cmm $(DISPLAY_TOOLS) beans
 SUBDIRS_management = management
 SUBDIRS_misc       = $(ORG_SUBDIR) rmi $(JDBC_SUBDIR) tracing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/sun/awt/FILES_c_macosx.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+FILES_AWT_objc = \
+        $(TARGDIR)MacOSXResourceBundle.m
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/sun/awt/FILES_export_macosx.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,29 @@
+#
+# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# FILES_export definitions for Mac OS X
+
+FILES_export += \
+	com/apple/resources/MacOSXResourceBundle.java
--- a/make/sun/awt/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/sun/awt/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -93,7 +93,7 @@
 ifeq  ($(PLATFORM), solaris)
 FILES_c = $(FILES_2D_c)
 FILES_c += awt_LoadLibrary.c
-OTHER_LDLIBS = $(JVMLIB) $(LIBM) -ldl
+OTHER_LDLIBS = $(JVMLIB) $(LIBM) $(LIBDL)
 ifeq ($(CC_VER), 5.8)
   ifndef REMOVE_ALL_WORKAROUNDS
     ifeq ($(ARCH_FAMILY), i586)
@@ -120,14 +120,42 @@
 FILES_c = $(FILES_2D_c)
 FILES_c += awt_LoadLibrary.c
 OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
-OTHER_LDLIBS = $(JVMLIB) $(LIBM) -ldl
+OTHER_LDLIBS = $(JVMLIB) $(LIBM) $(LIBDL)
 endif
 
 FILES_c += initIDs.c
 
+ifeq ($(PLATFORM), macosx)
+FILES_c = $(FILES_2D_c)
+FILES_c += awt_LoadLibrary.c
+OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
+OTHER_LDLIBS = $(JVMLIB) $(LIBM)
+endif
+
 # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX
 endif # PLATFORM 
 
+ifeq ($(PLATFORM), macosx)
+# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv MAC OS X
+
+#
+# Files
+#
+include FILES_c_macosx.gmk
+include FILES_export_macosx.gmk
+
+FILES_objc = $(FILES_AWT_objc)
+OTHER_LDLIBS = -lmlib_image $(JVMLIB) $(LIBM) \
+    -framework Cocoa \
+    -framework OpenGL \
+    -framework JavaNativeFoundation \
+    -framework JavaRuntimeSupport \
+    -framework ApplicationServices \
+    -framework AudioToolbox
+
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MAC OS X
+endif # PLATFORM 
+
 # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS-SPARC
 # solaris-sparc and solaris-sparcv9 both build 'vis'
 ifeq ("$(PLATFORM)-$(ARCH_FAMILY)", "solaris-sparc")
@@ -240,7 +268,7 @@
 # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ WINDOWS
 endif # PLATFORM
 
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux bsd))
 # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv LINUX
 vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/../java2d/opengl
 vpath %.c   $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/opengl
@@ -249,6 +277,12 @@
 # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LINUX
 endif # PLATFORM
 
+ifeq ($(PLATFORM), macosx)
+# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv MAC OS X
+vpath %.m   $(call NativeSrcDirList,,native/com/apple/resources)
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MAC OS X
+endif # PLATFORM
+
 ifeq ($(PLATFORM), windows)
 # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS
 OTHER_LDLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib \
@@ -391,6 +425,19 @@
 # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS
 endif # PLATFORM
 
+
+ifeq ($(PLATFORM), macosx)
+# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv MAC OS X
+
+FONTCONFIGS_SRC = $(JDK_TOPDIR)/src/macosx/classes/sun/awt/fontconfigs
+_FONTCONFIGS    = \
+        fontconfig.properties
+
+FONTCONFIGS_SRC_PREFIX = $(PLATFORM).
+
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MAC OS X
+endif # PLATFORM
+
 FONTCONFIGS     = $(_FONTCONFIGS:%=$(LIBDIR)/%.src)
 BINARYFONTCONFIGS = $(_FONTCONFIGS:%.properties=$(LIBDIR)/%.bfc)
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/sun/awt/mapfile-vers-bsd	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,577 @@
+#
+# Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# Define public interface for libawt.so on Bsd.
+# Bsd port does not use mawt, all public symbols are in libawt.so
+
+SUNWprivate_1.1 {
+	global:
+		JNI_OnLoad;
+
+		Java_java_awt_CheckboxMenuItem_initIDs;
+		Java_java_awt_Color_initIDs;
+		Java_java_awt_FontMetrics_initIDs;
+		Java_java_awt_image_BufferedImage_initIDs;
+		Java_sun_awt_image_DataBufferNative_getElem;
+		Java_sun_awt_image_DataBufferNative_setElem;
+		Java_java_awt_image_ColorModel_initIDs;
+		Java_java_awt_image_ComponentSampleModel_initIDs;
+		Java_java_awt_image_IndexColorModel_initIDs;
+		Java_java_awt_image_Kernel_initIDs;
+		Java_java_awt_image_Raster_initIDs;
+		Java_java_awt_image_SampleModel_initIDs;
+		Java_java_awt_Label_initIDs;
+		Java_java_awt_MenuBar_initIDs;
+		Java_java_awt_ScrollPaneAdjustable_initIDs;
+		Java_java_awt_Toolkit_initIDs;
+		Java_java_awt_TrayIcon_initIDs;
+                Java_sun_awt_DebugSettings_setCTracingOn__Z; 
+                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2; 
+                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I; 
+		Java_sun_awt_image_ByteComponentRaster_initIDs;
+		Java_sun_awt_image_GifImageDecoder_initIDs;
+		Java_sun_awt_image_GifImageDecoder_parseImage;
+		Java_sun_awt_image_Image_initIDs;
+		Java_sun_awt_image_ImageRepresentation_initIDs;
+		Java_sun_awt_image_ImageRepresentation_setDiffICM;
+		Java_sun_awt_image_ImageRepresentation_setICMpixels;
+		Java_sun_awt_image_ImagingLib_convolveBI;
+		Java_sun_awt_image_ImagingLib_convolveRaster;
+		Java_sun_awt_image_ImagingLib_init;
+		Java_sun_awt_image_ImagingLib_transformBI;
+		Java_sun_awt_image_ImagingLib_transformRaster;
+		Java_sun_awt_image_IntegerComponentRaster_initIDs;
+		Java_sun_awt_image_ShortComponentRaster_initIDs;
+		Java_sun_java2d_pipe_SpanClipRenderer_eraseTile;
+		Java_sun_java2d_pipe_SpanClipRenderer_fillTile;
+                Java_sun_java2d_pipe_ShapeSpanIterator_addSegment;
+                Java_sun_java2d_pipe_ShapeSpanIterator_moveTo;
+                Java_sun_java2d_pipe_ShapeSpanIterator_lineTo;
+                Java_sun_java2d_pipe_ShapeSpanIterator_quadTo;
+                Java_sun_java2d_pipe_ShapeSpanIterator_curveTo;
+                Java_sun_java2d_pipe_ShapeSpanIterator_closePath;
+                Java_sun_java2d_pipe_ShapeSpanIterator_pathDone;
+                Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer;
+                Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly;
+                Java_sun_java2d_pipe_ShapeSpanIterator_dispose;
+                Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator;
+                Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox;
+                Java_sun_java2d_pipe_ShapeSpanIterator_initIDs;
+                Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox;
+                Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan;
+                Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize;
+                Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY;
+                Java_sun_java2d_pipe_ShapeSpanIterator_setRule;
+                Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo;
+
+		Java_java_awt_Dimension_initIDs;
+		Java_java_awt_event_MouseEvent_initIDs;
+		Java_java_awt_image_DataBufferInt_initIDs;
+		Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
+		Java_java_awt_Rectangle_initIDs;
+		Java_sun_awt_image_BufImgSurfaceData_getSurfaceData;
+		Java_sun_awt_image_BufImgSurfaceData_initIDs;
+		Java_sun_awt_image_BufImgSurfaceData_initRaster;
+		Java_sun_awt_image_BufImgSurfaceData_setSurfaceData;
+                Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData;
+		Java_sun_awt_image_BytePackedRaster_initIDs;
+		Java_sun_awt_image_ImagingLib_lookupByteBI;
+		Java_sun_awt_image_ImagingLib_lookupByteRaster;
+		Java_sun_java2d_SurfaceData_initIDs;
+		Java_sun_java2d_SurfaceData_isOpaqueGray;
+		Java_sun_java2d_Disposer_initIDs;
+		Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose;
+		Java_sun_java2d_loops_BlitBg_BlitBg;
+		Java_sun_java2d_loops_Blit_Blit;
+		Java_sun_java2d_loops_ScaledBlit_Scale;
+		Java_sun_java2d_loops_DrawLine_DrawLine;
+		Java_sun_java2d_loops_DrawPolygons_DrawPolygons;
+		Java_sun_java2d_loops_DrawRect_DrawRect;
+		Java_sun_java2d_loops_FillRect_FillRect;
+		Java_sun_java2d_loops_FillSpans_FillSpans;
+		Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs;
+		Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops;
+		Java_sun_java2d_loops_MaskBlit_MaskBlit;
+		Java_sun_java2d_loops_MaskFill_MaskFill;
+		Java_sun_java2d_loops_MaskFill_FillAAPgram;
+		Java_sun_java2d_loops_MaskFill_DrawAAPgram;
+                Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans;
+		Java_sun_java2d_pipe_SpanClipRenderer_initIDs;
+		sun_awt_image_GifImageDecoder_initIDs;
+
+		# libmawt entry points
+		SurfaceData_InitOps;
+		SurfaceData_ThrowInvalidPipeException;
+                Region_GetBounds;
+                Region_GetInfo;
+                Region_StartIteration;
+                Region_CountIterationRects;
+                Region_NextIteration;
+                Region_EndIteration;
+                GrPrim_CompGetXorInfo;
+                GrPrim_CompGetAlphaInfo;
+		img_makePalette;
+		initInverseGrayLut;
+		make_dither_arrays;
+		make_uns_ordered_dither_array;
+
+		# variables exported to libmawt
+		std_img_oda_red;
+		std_img_oda_blue;
+		std_img_oda_green;
+		std_odas_computed;
+		g_CMpDataID;
+		colorValueID;
+                jvm;
+
+		# CDE private entry point
+                # This is in awt_LoadLibrary.c and falls through to libmawt.
+                # Evidently CDE needs this for backward compatability.
+		Java_sun_awt_motif_XsessionWMcommand;
+
+		# Java Plugin
+                # This is in awt_LoadLibrary.c and falls through to libmawt.
+                # Evidently plugin needs this for backward compatability.
+		getAwtLockFunctions;
+		getAwtData;
+		getAwtDisplay;
+
+		# libfontmanager entry points
+		AWTIsHeadless;
+		GrPrim_Sg2dGetCompInfo;
+		GrPrim_Sg2dGetClip;
+		GetNativePrim;
+		SurfaceData_IntersectBounds;
+		SurfaceData_GetOps;
+		Disposer_AddRecord;
+		GrPrim_Sg2dGetEaRGB;
+		GrPrim_Sg2dGetPixel;
+		GrPrim_Sg2dGetLCDTextContrast;
+
+		#Java_sun_awt_motif_MComponentPeer_restoreFocus;
+		Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
+		Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
+		Java_java_awt_AWTEvent_nativeSetSource;
+		Java_java_awt_Checkbox_initIDs;
+		Java_java_awt_Component_initIDs;
+		Java_java_awt_Dialog_initIDs;
+		Java_java_awt_Font_initIDs;
+		Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner;
+                Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner;
+                Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow;
+                Java_java_awt_KeyboardFocusManager_initIDs;
+		Java_java_awt_Menu_initIDs;
+		Java_java_awt_MenuComponent_initIDs;
+		Java_java_awt_MenuItem_initIDs;
+		Java_java_awt_Scrollbar_initIDs;
+		Java_java_awt_ScrollPane_initIDs;
+		Java_java_awt_TextArea_initIDs;
+		Java_sun_awt_FontDescriptor_initIDs;
+		#Java_sun_awt_motif_MButtonPeer_create;
+		#Java_sun_awt_motif_MButtonPeer_setLabel;
+		#Java_sun_awt_motif_MCanvasPeer_create;
+		#Java_sun_awt_motif_MCanvasPeer_initIDs;
+		#Java_sun_awt_motif_MCanvasPeer_resetTargetGC;
+		#Java_sun_awt_motif_MCheckboxMenuItemPeer_pSetState;
+		#Java_sun_awt_motif_MCheckboxPeer_create;
+		#Java_sun_awt_motif_MCheckboxPeer_setCheckboxGroup;
+		#Java_sun_awt_motif_MCheckboxPeer_setLabel;
+		#Java_sun_awt_motif_MCheckboxPeer_pSetState;
+		#Java_sun_awt_motif_MCheckboxPeer_pGetState;
+		#Java_sun_awt_motif_MChoicePeer_addItem;
+		#Java_sun_awt_motif_MChoicePeer_appendItems;
+		#Java_sun_awt_motif_MChoicePeer_create;
+		#Java_sun_awt_motif_MChoicePeer_pReshape;
+		#Java_sun_awt_motif_MChoicePeer_remove;
+		#Java_sun_awt_motif_MChoicePeer_removeAll;
+		#Java_sun_awt_motif_MChoicePeer_setBackground;
+		#Java_sun_awt_motif_MChoicePeer_pSelect;
+		#Java_sun_awt_motif_MChoicePeer_setFont;
+		#Java_sun_awt_motif_MChoicePeer_setForeground;
+		#Java_sun_awt_motif_MComponentPeer_addNativeDropTarget;
+		#Java_sun_awt_motif_MComponentPeer_createBackBuffer;
+		#Java_sun_awt_motif_MComponentPeer_destroyBackBuffer;
+		#Java_sun_awt_motif_MComponentPeer_getNativeColor;
+		#Java_sun_awt_motif_MComponentPeer_getWindow;
+		#Java_sun_awt_motif_MComponentPeer_pDisable;
+		#Java_sun_awt_motif_MComponentPeer_pDispose;
+		#Java_sun_awt_motif_MComponentPeer_pEnable;
+		#Java_sun_awt_motif_MComponentPeer_pGetLocationOnScreen;
+		#Java_sun_awt_motif_MComponentPeer_pGetLocationOnScreen2;
+		#Java_sun_awt_motif_MComponentPeer_pHide;
+		#Java_sun_awt_motif_MComponentPeer_pInitialize;
+		#Java_sun_awt_motif_MComponentPeer_pMakeCursorVisible;
+		#Java_sun_awt_motif_MComponentPeer_pReshape;
+		#Java_sun_awt_motif_MComponentPeer_pShow;
+		#Java_sun_awt_motif_MComponentPeer_removeNativeDropTarget;
+		#Java_sun_awt_motif_MComponentPeer_swapBuffers;
+		#Java_sun_awt_motif_MComponentPeer_pSetBackground;
+		#Java_sun_awt_motif_MComponentPeer_pSetFont;
+                #Java_sun_awt_motif_MComponentPeer_processSynchronousLightweightTransfer;
+                #Java_sun_awt_motif_MComponentPeer__1requestFocus;
+		#Java_sun_awt_motif_MCheckboxMenuItemPeer_getState;
+		#Java_sun_awt_motif_MComponentPeer_pSetForeground;
+		#Java_sun_awt_motif_MDragSourceContextPeer_startDrag;
+		#Java_sun_awt_motif_MDragSourceContextPeer_setNativeCursor;
+		#Java_sun_awt_motif_MDropTargetContextPeer_addTransfer;
+		#Java_sun_awt_motif_MDropTargetContextPeer_dropDone;
+		#Java_sun_awt_motif_MDropTargetContextPeer_startTransfer;
+		#Java_sun_awt_motif_X11DragSourceContextPeer_startDrag;
+		#Java_sun_awt_motif_X11DragSourceContextPeer_setNativeCursor;
+		#Java_sun_awt_motif_X11DropTargetContextPeer_sendResponse;
+		#Java_sun_awt_motif_X11DropTargetContextPeer_dropDone;
+		#Java_sun_awt_motif_X11DropTargetContextPeer_getData;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_NEFcreate;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_pShowImpl;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_pReshapePrivate;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_getBoundsPrivate;
+		#Java_sun_awt_motif_MFramePeer_pSetIconImage___3B_3I_3SII;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_requestXEmbedFocus;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_isXEmbedApplicationActive;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_isXEmbedActive;
+		#Java_sun_awt_motif_MEmbeddedFrame_getWidget;
+		#Java_sun_awt_motif_MEmbeddedFrame_mapWidget;
+		#Java_sun_awt_motif_MFileDialogPeer_create;
+		#Java_sun_awt_motif_MFileDialogPeer_pDispose;
+		#Java_sun_awt_motif_MFileDialogPeer_pHide;
+		#Java_sun_awt_motif_MFileDialogPeer_pReshape;
+		#Java_sun_awt_motif_MFileDialogPeer_pShow;
+		#Java_sun_awt_motif_MFileDialogPeer_setFileEntry;
+		#Java_sun_awt_motif_MFileDialogPeer_setFont;
+		#Java_sun_awt_motif_MFramePeer_pGetIconSize;
+		#Java_sun_awt_motif_MGlobalCursorManager_cacheInit;
+		#Java_sun_awt_motif_MGlobalCursorManager_findComponentAt;
+		#Java_sun_awt_motif_MGlobalCursorManager_findHeavyweightUnderCursor;
+		#Java_sun_awt_motif_MGlobalCursorManager_getCursorPos;
+		#Java_sun_awt_motif_MGlobalCursorManager_getLocationOnScreen;
+		#Java_sun_awt_motif_MLabelPeer_create;
+		#Java_sun_awt_motif_MLabelPeer_setAlignment;
+		#Java_sun_awt_motif_MLabelPeer_setText;
+		#Java_sun_awt_motif_MListPeer_addItem;
+		#Java_sun_awt_motif_MListPeer_create;
+		#Java_sun_awt_motif_MListPeer_delItems;
+		#Java_sun_awt_motif_MListPeer_deselect;
+		#Java_sun_awt_motif_MListPeer_isSelected;
+		#Java_sun_awt_motif_MListPeer_makeVisible;
+		#Java_sun_awt_motif_MListPeer_select;
+		#Java_sun_awt_motif_MListPeer_setMultipleSelections;
+		#Java_sun_awt_motif_MMenuBarPeer_create;
+		#Java_sun_awt_motif_MMenuItemPeer_createMenuItem;
+		#Java_sun_awt_motif_MMenuItemPeer_pDisable;
+		#Java_sun_awt_motif_MMenuItemPeer_pDispose;
+		#Java_sun_awt_motif_MMenuItemPeer_pEnable;
+		#Java_sun_awt_motif_MMenuItemPeer_pSetLabel;
+		#Java_sun_awt_motif_MMenuPeer_createMenu;
+		#Java_sun_awt_motif_MMenuPeer_createSubMenu;
+		#Java_sun_awt_motif_MMenuPeer_pDispose;
+		#Java_sun_awt_motif_MPopupMenuPeer_createMenu;
+		#Java_sun_awt_motif_MPopupMenuPeer_pDispose;
+		#Java_sun_awt_motif_MPopupMenuPeer_pShow;
+		#Java_sun_awt_motif_MRobotPeer_getRGBPixelsImpl;
+		#Java_sun_awt_motif_MRobotPeer_keyPressImpl;
+		#Java_sun_awt_motif_MRobotPeer_keyReleaseImpl;
+		#Java_sun_awt_motif_MRobotPeer_mouseMoveImpl;
+		#Java_sun_awt_motif_MRobotPeer_mousePressImpl;
+		#Java_sun_awt_motif_MRobotPeer_mouseReleaseImpl;
+		#Java_sun_awt_motif_MRobotPeer_mouseWheelImpl;
+		#Java_sun_awt_motif_MRobotPeer_setup;
+		#Java_sun_awt_motif_MScrollbarPeer_create;
+		#Java_sun_awt_motif_MScrollbarPeer_setLineIncrement;
+		#Java_sun_awt_motif_MScrollbarPeer_setPageIncrement;
+		#Java_sun_awt_motif_MScrollbarPeer_pSetValues;
+		#Java_sun_awt_motif_MScrollPanePeer_create;
+		#Java_sun_awt_motif_MScrollPanePeer_pGetBlockIncrement;
+		#Java_sun_awt_motif_MScrollPanePeer_pGetScrollbarSpace;
+		#Java_sun_awt_motif_MScrollPanePeer_pGetShadow;
+		#Java_sun_awt_motif_MScrollPanePeer_pInsets;
+		#Java_sun_awt_motif_MScrollPanePeer_pSetIncrement;
+		#Java_sun_awt_motif_MScrollPanePeer_pSetScrollChild;
+		#Java_sun_awt_motif_MScrollPanePeer_setScrollPosition;
+		#Java_sun_awt_motif_MTextAreaPeer_initIDs;
+		#Java_sun_awt_motif_MTextAreaPeer_pCreate;
+		#Java_sun_awt_motif_MTextAreaPeer_getCaretPosition;
+		#Java_sun_awt_motif_MTextAreaPeer_getExtraHeight;
+		#Java_sun_awt_motif_MTextAreaPeer_getExtraWidth;
+		#Java_sun_awt_motif_MTextAreaPeer_getSelectionEnd;
+		#Java_sun_awt_motif_MTextAreaPeer_getSelectionStart;
+		#Java_sun_awt_motif_MTextAreaPeer_getText;
+		#Java_sun_awt_motif_MTextAreaPeer_insert;
+		#Java_sun_awt_motif_MTextAreaPeer_pMakeCursorVisible;
+		#Java_sun_awt_motif_MTextAreaPeer_pSetEditable;
+		#Java_sun_awt_motif_MTextAreaPeer_pShow2;
+		#Java_sun_awt_motif_MTextAreaPeer_replaceRange;
+		#Java_sun_awt_motif_MTextAreaPeer_select;
+		#Java_sun_awt_motif_MTextAreaPeer_setCaretPosition;
+		#Java_sun_awt_motif_MTextAreaPeer_setFont;
+		#Java_sun_awt_motif_MTextAreaPeer_setText;
+		#Java_sun_awt_motif_MTextAreaPeer_setTextBackground;
+		#Java_sun_awt_motif_MTextFieldPeer_initIDs;
+		#Java_sun_awt_motif_MTextFieldPeer_pCreate;
+		#Java_sun_awt_motif_MTextFieldPeer_getCaretPosition;
+		#Java_sun_awt_motif_MTextFieldPeer_getSelectionEnd;
+		#Java_sun_awt_motif_MTextFieldPeer_getSelectionStart;
+		#Java_sun_awt_motif_MTextFieldPeer_getText;
+		#Java_sun_awt_motif_MTextFieldPeer_insertReplaceText;
+		#Java_sun_awt_motif_MTextFieldPeer_preDispose;
+		#Java_sun_awt_motif_MTextFieldPeer_pSetEditable;
+		#Java_sun_awt_motif_MTextFieldPeer_select;
+		#Java_sun_awt_motif_MTextFieldPeer_setCaretPosition;
+		#Java_sun_awt_motif_MTextFieldPeer_setEchoChar;
+		#Java_sun_awt_motif_MTextFieldPeer_setFont;
+		#Java_sun_awt_motif_MTextFieldPeer_setText;
+		Java_sun_awt_motif_MToolkit_beep;
+		Java_sun_awt_motif_MToolkit_getLockingKeyStateNative;
+		Java_sun_awt_motif_MToolkit_getMulticlickTime;
+                Java_sun_awt_motif_MToolkit_getNumMouseButtons;
+		Java_sun_awt_motif_MToolkit_getScreenHeight;
+		Java_sun_awt_motif_MToolkit_getScreenResolution;
+		Java_sun_awt_motif_MToolkit_getScreenWidth;
+		Java_sun_awt_motif_MToolkit_init;
+		Java_sun_awt_motif_MToolkit_isDynamicLayoutSupportedNative;
+		Java_sun_awt_motif_MToolkit_isFrameStateSupported;
+		Java_sun_awt_motif_MToolkit_loadSystemColors;
+		Java_sun_awt_motif_MToolkit_makeColorModel;
+		Java_sun_awt_motif_MToolkit_run;
+		Java_sun_awt_motif_MToolkit_sync;
+                Java_sun_awt_motif_MToolkit_isAlwaysOnTopSupported;
+		Java_sun_awt_motif_MWindowAttributes_initIDs;
+		#Java_sun_awt_motif_MWindowPeer_pDispose;
+		#Java_sun_awt_motif_MWindowPeer_pHide;
+		#Java_sun_awt_motif_MWindowPeer_pReshape;
+		#Java_sun_awt_motif_MWindowPeer_pSetTitle;
+		#Java_sun_awt_motif_MWindowPeer_pShow;
+		#Java_sun_awt_motif_MWindowPeer_setResizable;
+		#Java_sun_awt_motif_MWindowPeer_toBack;
+		#Java_sun_awt_motif_MWindowPeer_addTextComponentNative;
+		#Java_sun_awt_motif_MWindowPeer_getState;
+		#Java_sun_awt_motif_MWindowPeer_pSetIMMOption;
+		#Java_sun_awt_motif_MWindowPeer_pSetMenuBar;
+		#Java_sun_awt_motif_MWindowPeer_pShowModal;
+		#Java_sun_awt_motif_MWindowPeer_removeTextComponentNative;
+		#Java_sun_awt_motif_MWindowPeer_setSaveUnder;
+		#Java_sun_awt_motif_MWindowPeer_setState;
+		#Java_sun_awt_motif_MWindowPeer_resetTargetGC;
+		#Java_sun_awt_motif_MWindowPeer_registerX11DropTarget;
+		#Java_sun_awt_motif_MWindowPeer_unregisterX11DropTarget;
+                #Java_sun_awt_motif_MWindowPeer_updateAlwaysOnTop;
+		#Java_sun_awt_motif_X11CustomCursor_cacheInit;
+		#Java_sun_awt_motif_X11CustomCursor_createCursor;
+		#Java_sun_awt_motif_X11CustomCursor_queryBestCursor;
+		Java_sun_awt_motif_X11FontMetrics_bytesWidth;
+		Java_sun_awt_motif_X11FontMetrics_getMFCharsWidth;
+		Java_sun_awt_motif_X11FontMetrics_init;
+		Java_sun_awt_X11InputMethod_disposeXIC;
+		Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
+		Java_sun_awt_X11InputMethod_resetXIC;
+		Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
+		Java_sun_awt_X11InputMethod_turnoffStatusWindow;
+		#Java_sun_awt_motif_MInputMethod_openXIMNative;
+		#Java_sun_awt_motif_MInputMethod_configureStatusAreaNative;
+		#Java_sun_awt_motif_MInputMethod_createXICNative;
+		#Java_sun_awt_motif_MInputMethod_reconfigureXICNative;
+		#Java_sun_awt_motif_MInputMethod_setXICFocusNative;
+		#Java_sun_awt_motif_X11Clipboard_getClipboardData;
+		#Java_sun_awt_motif_X11Clipboard_getClipboardFormats;
+		#Java_sun_awt_motif_X11Clipboard_registerClipboardViewer;
+		#Java_sun_awt_motif_X11Clipboard_unregisterClipboardViewer;
+		#Java_sun_awt_motif_X11Selection_init;
+		#Java_sun_awt_motif_X11Selection_pGetSelectionOwnership;
+		#Java_sun_awt_motif_X11Selection_clearNativeContext;
+		Java_sun_awt_SunToolkit_closeSplashScreen;
+		Java_sun_awt_PlatformFont_initIDs;
+		Java_sun_awt_X11GraphicsConfig_init;
+		Java_sun_awt_X11GraphicsConfig_dispose;
+		Java_sun_awt_X11GraphicsConfig_pGetBounds;
+		Java_sun_awt_X11GraphicsConfig_getNumColors;
+		Java_sun_awt_X11GraphicsConfig_getXResolution;
+		Java_sun_awt_X11GraphicsConfig_getYResolution;
+                Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
+		Java_sun_awt_X11GraphicsDevice_isDBESupported;
+		Java_sun_awt_X11GraphicsDevice_getDisplay;
+		Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
+		Java_sun_awt_X11GraphicsDevice_getNumConfigs;
+		Java_sun_awt_X11GraphicsDevice_initIDs;
+                Java_sun_awt_X11GraphicsDevice_initXrandrExtension;
+                Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive;
+                Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive;
+                Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode;
+                Java_sun_awt_X11GraphicsDevice_enumDisplayModes;
+                Java_sun_awt_X11GraphicsDevice_configDisplayMode;
+                Java_sun_awt_X11GraphicsDevice_resetNativeData;
+		Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
+		Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
+		Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
+		Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
+		Java_sun_awt_X11GraphicsEnvironment_initDisplay;
+		Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
+		Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
+		Java_sun_awt_X11GraphicsEnvironment_initXRender;
+        
+        
+
+		Java_java_awt_AWTEvent_initIDs;
+		Java_java_awt_Button_initIDs;
+		Java_java_awt_Container_initIDs;
+		Java_java_awt_Cursor_finalizeImpl;
+		Java_java_awt_Cursor_initIDs;
+		Java_java_awt_Event_initIDs;
+		Java_java_awt_event_InputEvent_initIDs;
+		Java_java_awt_event_KeyEvent_initIDs;
+		Java_java_awt_FileDialog_initIDs;
+		Java_java_awt_Frame_initIDs;
+		Java_java_awt_Insets_initIDs;
+		Java_java_awt_TextField_initIDs;
+		Java_java_awt_Window_initIDs;
+		#Java_sun_awt_motif_MCheckboxPeer_getIndicatorSize;
+		#Java_sun_awt_motif_MCheckboxPeer_getSpacing;
+		#Java_sun_awt_motif_MChoicePeer_freeNativeData;
+		#Java_sun_awt_motif_MComponentPeer_getComponents_1NoClientCode;
+		#Java_sun_awt_motif_MComponentPeer_getParent_1NoClientCode;
+		#Java_sun_awt_motif_MComponentPeer_initIDs;
+		#Java_sun_awt_motif_MComponentPeer_nativeHandleEvent;
+		#Java_sun_awt_motif_MComponentPeer_pSetCursor;
+		#Java_sun_awt_motif_MComponentPeer_pSetInnerForeground;
+		#Java_sun_awt_motif_MComponentPeer_pSetScrollbarBackground;
+		#Java_sun_awt_motif_MComponentPeer_setTargetBackground;
+		#Java_sun_awt_motif_MDataTransferer_dragQueryFile;
+		#Java_sun_awt_motif_MDataTransferer_getAtomForTarget;
+		#Java_sun_awt_motif_MDataTransferer_getTargetNameForAtom;
+		#Java_sun_awt_motif_MFileDialogPeer_insertReplaceFileDialogText;
+		Java_sun_awt_motif_MFontPeer_initIDs;
+		#Java_sun_awt_motif_MListPeer_setBackground;
+		#Java_sun_awt_motif_MMenuBarPeer_initIDs;
+		#Java_sun_awt_motif_MMenuBarPeer_pDispose;
+		#Java_sun_awt_motif_MMenuItemPeer_getParent_1NoClientCode;
+		#Java_sun_awt_motif_MMenuItemPeer_initIDs;
+		#Java_sun_awt_motif_MMenuItemPeer_pSetShortcut;
+		#Java_sun_awt_motif_MPopupMenuPeer_initIDs;
+		#Java_sun_awt_motif_MScrollbarPeer_initIDs;
+		#Java_sun_awt_motif_MScrollPanePeer_initIDs;
+		#Java_sun_awt_motif_MTextAreaPeer_pSetCursor;
+		Java_sun_awt_motif_MToolkit_shutdown;
+		#Java_sun_awt_motif_MWindowPeer_initIDs;
+		#Java_sun_awt_motif_MWindowPeer_pCreate;
+		#Java_sun_awt_motif_MWindowPeer_wrapInSequenced;
+		Java_sun_awt_motif_X11FontMetrics_initIDs;
+		#Java_sun_awt_X11InputMethod_initIDs;
+		Java_sun_awt_motif_X11OffScreenImage_updateBitmask;
+		#Java_sun_awt_motif_X11Selection_initIDs;
+		Java_sun_awt_motif_MToolkitThreadBlockedHandler_enter;
+		Java_sun_awt_motif_MToolkitThreadBlockedHandler_exit;
+		Java_sun_awt_X11GraphicsConfig_init;
+		Java_sun_awt_X11GraphicsConfig_initIDs;
+		Java_sun_awt_X11GraphicsConfig_makeColorModel;
+		Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
+		Java_sun_awt_X11PMBlitLoops_Blit;
+		Java_sun_awt_X11PMBlitBgLoops_nativeBlitBg;
+		Java_sun_awt_X11Renderer_devFillSpans;
+		Java_sun_awt_X11Renderer_doDrawArc;
+		Java_sun_awt_X11Renderer_doDrawLine;
+		Java_sun_awt_X11Renderer_doDrawOval;
+		Java_sun_awt_X11Renderer_doDrawPoly;
+		Java_sun_awt_X11Renderer_doDrawRect;
+		Java_sun_awt_X11Renderer_doDrawRoundRect;
+		Java_sun_awt_X11Renderer_doFillArc;
+		Java_sun_awt_X11Renderer_doFillOval;
+		Java_sun_awt_X11Renderer_doFillPoly;
+		Java_sun_awt_X11Renderer_doFillRect;
+		Java_sun_awt_X11Renderer_doFillRoundRect;
+		Java_sun_awt_X11Renderer_devCopyArea;
+		Java_sun_awt_X11SurfaceData_initIDs;
+		Java_sun_awt_X11SurfaceData_initOps;
+		Java_sun_awt_X11SurfaceData_initSurface;
+		Java_sun_awt_X11SurfaceData_isDgaAvailable;
+		Java_sun_awt_X11SurfaceData_setInvalid;
+		Java_sun_awt_X11SurfaceData_flushNativeSurface;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_initXEmbedServer;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_destroyXEmbedServer;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_isXEmbedActive;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_initDispatching;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_endDispatching;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_embedChild;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_childDestroyed;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_getEmbedPreferredSize;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_getEmbedMinimumSize;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_getClientBounds;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_notifyChildEmbedded;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_detachChild;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_forwardKeyEvent;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_getAWTKeyCodeForKeySym;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_sendMessage__I;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_sendMessage__IJJJ;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_getWindow;       
+                #Java_sun_awt_motif_MEmbedCanvasPeer_forwardEventToEmbedded;       
+                #Java_sun_awt_motif_GrabbedKey_initKeySymAndModifiers;
+                #Java_sun_awt_motif_MEmbeddedFramePeer_traverseOut;
+		awt_display;
+		awt_lock;
+		awt_Lock;
+		awt_Unlock;
+	        awt_GetDrawingSurface;
+	        awt_FreeDrawingSurface;
+	        awt_GetComponent;
+
+		X11SurfaceData_GetOps;
+		getDefaultConfig;
+                Java_sun_font_FontConfigManager_getFontConfig;
+                Java_sun_font_FontConfigManager_getFontConfigAASettings;
+		Java_sun_awt_X11FontManager_getFontPathNative;
+		Java_sun_font_SunFontManager_populateFontFileNameMap;
+
+		# CDE private entry point
+		Java_sun_awt_motif_XsessionWMcommand;
+
+		# Java Plugin
+		getAwtLockFunctions;
+		getAwtData;
+		getAwtDisplay;
+		
+		# libfontmanager entry points
+		AWTIsHeadless;
+		AWTCountFonts;
+                AWTLoadFont;
+                AWTFreeFont;
+                AWTFontMinByte1;
+                AWTFontMaxByte1;
+                AWTFontMinCharOrByte2;
+                AWTFontMaxCharOrByte2;
+                AWTFontDefaultChar;
+                AWTFontPerChar;
+                AWTFontMaxBounds;
+                AWTFontTextExtents16;
+                AWTFreeChar;
+                AWTFontGenerateImage;
+                AWTCharAdvance;
+                AWTCharLBearing;
+                AWTCharRBearing;
+                AWTCharAscent;
+                AWTCharDescent;
+                AWTDrawGlyphList;
+                AccelGlyphCache_RemoveAllCellInfos;
+
+	local:
+		*;
+};
+
--- a/make/sun/awt/mawt.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/sun/awt/mawt.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -137,7 +137,7 @@
 OTHER_LDLIBS = -lXt -lXext $(LIBXTST) $(LIBXMU) -lX11 -lXi
 endif
 
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux macosx))
 OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
 # XXX what is this define below? Isn't it motif-related?
 OTHER_CFLAGS += -DXMSTRINGDEFINES=1
@@ -148,7 +148,7 @@
 # !HEADLESS
 
 OTHER_LDLIBS += $(JVMLIB) $(LIBCXX) \
-                -lawt $(LIBM) -ldl
+                -lawt $(LIBM) $(LIBDL)
 
 #
 # Sun CC with -Xa misdefines __STDC__ to 0 (zero).
@@ -191,16 +191,35 @@
         -I$(PLATFORM_SRC)/native/$(PKGDIR) \
         $(EVENT_MODEL)
 
+ifeq ($(PLATFORM), macosx)
+CPPFLAGS += -I$(CUPS_HEADERS_PATH)
+
+ifndef HEADLESS
+CPPFLAGS += -I$(MOTIF_DIR)/include \
+            -I$(OPENWIN_HOME)/include 
+LDFLAGS  += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
+
+endif # !HEADLESS
+endif # PLATFORM
+
 ifeq ($(PLATFORM), linux)
   # Checking for the X11/extensions headers at the additional location
   CPPFLAGS += -I$(firstword $(wildcard $(OPENWIN_HOME)/include/X11/extensions) \
                         $(wildcard /usr/include/X11/extensions))
 endif
 
+ifeq ($(PLATFORM), macosx))
+  CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \
+              -I$(OPENWIN_HOME)/include 
+endif
+
 ifeq ($(PLATFORM), solaris)
   CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions
 endif
 
+ifeq ($(PLATFORM), macosx)
+  CPPFLAGS += -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
+endif
 
 LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \
 	   $(AWT_RUNPATH)
--- a/make/sun/cmm/lcms/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/sun/cmm/lcms/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -93,7 +93,11 @@
 	$(RM) $(OBJDIR)/cmm.h
 
 else
-OTHER_LDLIBS = $(LIBM) -lawt -L$(LIBDIR)/$(LIBARCH)/xawt 
+ifeq ($(PLATFORM), macosx)
+OTHER_LDLIBS = $(LIBM) -lawt -L$(LIBDIR)/xawt
+else
+OTHER_LDLIBS = $(LIBM) -lawt -L$(LIBDIR)/$(LIBARCH)/xawt
+endif
 CPPFLAGS += -I$(SHARE_SRC)/native/sun/java2d \
             -I$(SHARE_SRC)/native/sun/awt/debug
 endif
--- a/make/sun/font/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/sun/font/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -172,6 +172,15 @@
 # Libraries to link, and other C flags.
 #
 
+ifeq ($(PLATFORM), macosx))
+OTHER_INCLUDES += -I$(X11_PATH)/include
+OTHER_LDLIBS  += -lawt $(LIBM) $(LIBCXX)
+ ifeq ($(OS_VENDOR),Apple)
+   # XXXDARWIN Match BSD/Linux behavior -- the mawt.dylib symbols will
+   # be available at runtime.
+   OTHER_LDLIBS += -undefined dynamic_lookup
+ endif
+else
 ifeq ($(PLATFORM), solaris)
   # Note that on Solaris, fontmanager is built against the headless library.
   LDFLAGS      += -L$(LIBDIR)/$(LIBARCH)/headless
@@ -182,11 +191,16 @@
     OTHER_LDLIBS  += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
   endif                           
 endif
+endif
 
 endif # PLATFORM
 
 # set up compile flags..
 
+ifeq ($(PLATFORM), macosx))
+CPPFLAGS += -I$(CLASSHDRDIR)
+endif
+
 CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR) \
             -I$(SHARE_SRC)/native/$(PKGDIR)/layout \
 	    -I$(SHARE_SRC)/native/sun/awt/image/cvutils \
--- a/make/sun/headless/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/sun/headless/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -29,6 +29,11 @@
 MOTIF_VERSION = none
 MOTIF_VERSION_STRING=none
 
+ifeq ($(PLATFORM), macosx)
+LIB_LOCATION = $(LIBDIR)/headless
+else
+endif
+
 PACKAGE = sun.awt
 LIBRARY = awt_headless
 PRODUCT = sun
--- a/make/sun/image/generic/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/sun/image/generic/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -70,6 +70,6 @@
 OTHER_CFLAGS += -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES
 
 ifneq ($(PLATFORM), windows)
-	OTHER_LDLIBS = $(LIBM) -ldl
+	OTHER_LDLIBS = $(LIBM) $(LIBDL)
 endif
 
--- a/make/sun/image/vis/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/sun/image/vis/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -68,5 +68,5 @@
 CFLAGS += $(CFLAGS_$(ARCH)) $(INLINE) -I$(PLATFORM_SRC)/native/sun/awt/medialib -I$(SHARE_SRC)/native/sun/awt/medialib
 
 OTHER_CFLAGS += -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES
-OTHER_LDLIBS = $(LIBM) -ldl
+OTHER_LDLIBS = $(LIBM) $(LIBDL)
 
--- a/make/sun/jawt/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/sun/jawt/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -35,6 +35,8 @@
 #
 ifeq ($(PLATFORM), windows)
 FILES_cpp = jawt.cpp
+else ifeq ($(PLATFORM), macosx) # PLATFORM
+FILES_objc = jawt.m
 else # PLATFORM
 FILES_c = jawt.c
 endif # PLATFORM
@@ -108,6 +110,7 @@
 	    -I$(SHARE_SRC)/native/$(PKGDIR)/../dc/path \
             -I$(PLATFORM_SRC)/native/$(PKGDIR)/../jdga \
 	    $(EVENT_MODEL)
+
 #
 # Libraries to link in.
 #
@@ -128,8 +131,13 @@
   endif
 endif # PLATFORM
 
+ifeq ($(PLATFORM), macosx)
+vpath %.m   $(call NativeSrcDirList,,native/sun/awt)
+OTHER_LDLIBS = -llwawt -L$(LIBDIR)/lwawt -Xlinker -rpath -Xlinker @loader_path/lwawt \
+               -framework Cocoa
 endif # PLATFORM
 
+endif # PLATFORM
 
 #
 # Lets not remove any class files.
--- a/make/sun/jdga/Makefile	Tue Mar 06 10:25:45 2012 +0800
+++ b/make/sun/jdga/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -55,7 +55,7 @@
 vpath %.c   $(PLATFORM_SRC)/native/$(PKGDIR)
 
 ifneq ($(PLATFORM), windows)
-  LDLIBS =  -ldga -lX11 -ldl -lc
+  LDLIBS =  -ldga -lX11 $(LIBDL) -lc
 
   CPPFLAGS += \
 	-I$(SHARE_SRC)/javavm/export \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/sun/lwawt/FILES_c_macosx.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,100 @@
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+FILES_objc = \
+        awt.m \
+        ApplicationDelegate.m \
+        CFRetainedResource.m \
+        CGLGraphicsConfig.m \
+        CGLSurfaceData.m \
+        CGLLayer.m \
+        CGraphicsConfig.m \
+        CGraphicsDevice.m \
+        CGraphicsEnv.m \
+        CCharToGlyphMapper.m \
+        CSystemColors.m \
+        AWTFont.m \
+        CGGlyphOutlines.m \
+        CGGlyphImages.m \
+        CoreTextSupport.m \
+        AWTStrike.m \
+        InitIDs.m \
+        AWTEvent.m \
+        AWTView.m \
+        AWTWindow.m \
+	AWTSurfaceLayers.m \
+        CCursorManager.m \
+        CClipboard.m \
+        CDataTransferer.m \
+        CDragSource.m \
+        CDragSourceContextPeer.m \
+        CDropTarget.m \
+        CDropTargetContextPeer.m \
+        CInputMethod.m \
+				CDesktopPeer.m \
+        OSVersion.m \
+        DnDUtilities.m \
+        CFileDialog.m \
+        CImage.m \
+        CMenu.m \
+        CMenuBar.m \
+        CMenuComponent.m \
+        CMenuItem.m \
+        CPopupMenu.m \
+        CRobot.m \
+        CTrayIcon.m \
+        CWrapper.m \
+        JavaAccessibilityAction.m \
+        JavaAccessibilityUtilities.m \
+        JavaComponentAccessibility.m \
+        JavaTextAccessibility.m \
+        LWCToolkit.m \
+        GeomUtilities.m \
+        CPrinterJob.m \
+        PrintModel.m \
+        PrinterSurfaceData.m \
+        PrinterView.m \
+        QuartzSurfaceData.m \
+        QuartzRenderer.m \
+        CTextPipe.m \
+        ImageSurfaceData.m \
+        awt_DrawingSurface.m
+
+FILES_c = \
+        OGLBlitLoops.c \
+        OGLBufImgOps.c \
+        OGLContext.c \
+        OGLFuncs.c \
+        OGLMaskBlit.c \
+        OGLMaskFill.c \
+        OGLPaints.c \
+        OGLRenderQueue.c \
+        OGLRenderer.c \
+        OGLSurfaceData.c \
+        OGLTextRenderer.c \
+        OGLVertexCache.c \
+        AccelGlyphCache.c \
+        CUPSfuncs.c
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/sun/lwawt/FILES_export_macosx.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,279 @@
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# FILES_export definitions for Mac OS X
+
+FILES_export = \
+        com/apple/eawt/Application.java \
+        com/apple/eawt/_AppDockIconHandler.java \
+        com/apple/eawt/_AppEventHandler.java \
+        com/apple/eawt/_AppEventLegacyHandler.java \
+        com/apple/eawt/_AppMenuBarHandler.java \
+        com/apple/eawt/_AppMiscHandlers.java \
+        com/apple/eawt/event/GestureHandler.java \
+        com/apple/eawt/FullScreenAdapter.java \
+        com/apple/eawt/FullScreenHandler.java \
+        com/apple/eawt/FullScreenListener.java \
+        com/apple/eawt/FullScreenUtilities.java \
+        sun/font/FontManager.java \
+        sun/awt/image/ImageRepresentation.java \
+        sun/awt/image/GifImageDecoder.java \
+        sun/awt/image/NativeLibLoader.java \
+        sun/java2d/CRenderer.java \
+        sun/java2d/CompositeCRenderer.java \
+        sun/java2d/DataBufferNIOInt.java \
+        sun/java2d/IntegerNIORaster.java \
+        sun/java2d/OSXSurfaceData.java \
+        sun/java2d/OSXOffScreenSurfaceData.java \
+        sun/java2d/loops/Blit.java \
+        sun/java2d/loops/BlitBg.java \
+        sun/java2d/loops/ScaledBlit.java \
+        sun/java2d/loops/TransformBlit.java \
+        sun/java2d/loops/FillRect.java \
+        sun/java2d/loops/FillSpans.java \
+        sun/java2d/loops/FillParallelogram.java \
+        sun/java2d/loops/DrawParallelogram.java \
+        sun/java2d/loops/DrawGlyphList.java \
+        sun/java2d/loops/DrawGlyphListAA.java \
+        sun/java2d/loops/DrawGlyphListLCD.java \
+        sun/java2d/loops/DrawLine.java \
+        sun/java2d/loops/DrawRect.java \
+        sun/java2d/loops/DrawPolygons.java \
+        sun/java2d/loops/DrawPath.java \
+        sun/java2d/loops/FillPath.java \
+        sun/java2d/loops/MaskBlit.java \
+        sun/java2d/loops/MaskFill.java \
+        sun/java2d/loops/TransformHelper.java \
+        sun/java2d/loops/GraphicsPrimitiveMgr.java \
+        sun/java2d/loops/GraphicsPrimitive.java \
+        sun/java2d/pipe/hw/AccelSurface.java \
+        sun/java2d/pipe/hw/AccelDeviceEventNotifier.java \
+        sun/java2d/pipe/hw/ContextCapabilities.java \
+        sun/awt/image/ImagingLib.java \
+        sun/java2d/SurfaceData.java \
+        sun/java2d/SunGraphics2D.java \
+        sun/awt/KeyboardFocusManagerPeerImpl.java \
+        sun/awt/image/BufImgSurfaceData.java \
+        sun/awt/image/DataBufferNative.java \
+        \
+        sun/awt/CGraphicsConfig.java \
+        sun/awt/CGraphicsDevice.java \
+        sun/awt/CGraphicsEnvironment.java \
+        sun/font/CCharToGlyphMapper.java \
+        sun/font/CFont.java \
+        sun/font/CFontConfiguration.java \
+        sun/font/CFontManager.java \
+        sun/font/CStrike.java \
+        sun/font/CStrikeDisposer.java \
+        sun/java2d/BackBufferCapsProvider.java \
+        sun/java2d/MacosxSurfaceManagerFactory.java \
+        sun/lwawt/LWButtonPeer.java \
+        sun/lwawt/LWCanvasPeer.java \
+        sun/lwawt/LWCheckboxPeer.java \
+        sun/lwawt/LWChoicePeer.java \
+        sun/lwawt/LWComponentPeer.java \
+        sun/lwawt/LWContainerPeer.java \
+        sun/lwawt/LWCursorManager.java \
+        sun/lwawt/LWKeyboardFocusManagerPeer.java \
+        sun/lwawt/LWLabelPeer.java \
+        sun/lwawt/LWListPeer.java \
+        sun/lwawt/LWMouseInfoPeer.java \
+        sun/lwawt/LWPanelPeer.java \
+        sun/lwawt/LWRepaintArea.java \
+        sun/lwawt/LWScrollBarPeer.java \
+        sun/lwawt/LWScrollPanePeer.java \
+        sun/lwawt/LWTextComponentPeer.java \
+        sun/lwawt/LWTextFieldPeer.java \
+        sun/lwawt/LWToolkit.java \
+        sun/lwawt/LWWindowPeer.java \
+        sun/lwawt/PlatformWindow.java \
+        sun/lwawt/SelectionClearListener.java \
+        sun/lwawt/macosx/CPrinterDevice.java \
+        sun/lwawt/macosx/CPrinterDialog.java \
+        sun/lwawt/macosx/CPrinterDialogPeer.java \
+        sun/lwawt/macosx/CPrinterGraphics.java \
+        sun/lwawt/macosx/CPrinterGraphicsConfig.java \
+        sun/lwawt/macosx/CPrinterJob.java \
+        sun/lwawt/macosx/CPrinterJobDialog.java \
+        sun/lwawt/macosx/CPrinterPageDialog.java \
+        sun/lwawt/macosx/CPrinterSurfaceData.java \
+        sun/lwawt/macosx/CTextPipe.java \
+        sun/lwawt/macosx/CDesktopPeer.java \
+        sun/java2d/CRenderer.java \
+        sun/lwawt/macosx/EventDispatchAccess.java \
+        sun/lwawt/macosx/NSPrintInfo.java \
+        sun/lwawt/macosx/CAccessibility.java \
+        sun/lwawt/macosx/CAccessible.java \
+        sun/lwawt/macosx/CFRetainedResource.java \
+        sun/lwawt/macosx/CCheckboxMenuItem.java \
+        sun/lwawt/macosx/CClipboard.java \
+        sun/lwawt/macosx/CDataTransferer.java \
+        sun/lwawt/macosx/CDragSourceContextPeer.java \
+        sun/lwawt/macosx/CMouseDragGestureRecognizer.java \
+        sun/lwawt/macosx/CDropTarget.java \
+        sun/lwawt/macosx/CDropTargetContextPeer.java \
+        sun/lwawt/macosx/CCursorManager.java \
+        sun/lwawt/macosx/CFileDialog.java \
+        sun/lwawt/macosx/CImage.java \
+        sun/lwawt/macosx/CMenu.java \
+        sun/lwawt/macosx/CMenuBar.java \
+        sun/lwawt/macosx/CMenuComponent.java \
+        sun/lwawt/macosx/CMenuItem.java \
+        sun/lwawt/macosx/CMouseInfoPeer.java \
+        sun/lwawt/macosx/CPlatformView.java \
+        sun/lwawt/macosx/CPlatformWindow.java \
+        sun/lwawt/macosx/CPlatformComponent.java \
+        sun/lwawt/macosx/CEmbeddedFrame.java \
+        sun/lwawt/macosx/CPlatformEmbeddedFrame.java \
+        sun/lwawt/macosx/CPlatformResponder.java \
+        sun/lwawt/macosx/CPopupMenu.java \
+        sun/lwawt/macosx/CRobot.java \
+        sun/lwawt/macosx/CSystemTray.java \
+        sun/lwawt/macosx/CTrayIcon.java \
+        sun/lwawt/macosx/CWrapper.java \
+        sun/lwawt/macosx/CocoaConstants.java \
+        sun/lwawt/macosx/LWCToolkit.java \
+        sun/lwawt/macosx/CInputMethod.java \
+        sun/lwawt/macosx/CInputMethodDescriptor.java \
+        sun/lwawt/macosx/event/NSEvent.java \
+        \
+        sun/awt/DebugSettings.java \
+        sun/awt/EmbeddedFrame.java \
+        sun/awt/PlatformFont.java \
+        sun/awt/FontDescriptor.java \
+        sun/awt/NativeLibLoader.java \
+        sun/awt/CharsetString.java \
+        sun/awt/SunHints.java \
+        sun/java2d/pipe/BufferedContext.java \
+        sun/java2d/pipe/BufferedMaskBlit.java \
+        sun/java2d/pipe/BufferedOpCodes.java \
+        sun/java2d/pipe/BufferedMaskBlit.java \
+        sun/java2d/pipe/BufferedPaints.java \
+        sun/java2d/pipe/BufferedRenderPipe.java \
+        sun/java2d/pipe/BufferedTextPipe.java \
+        sun/java2d/pipe/RenderBuffer.java \
+        sun/java2d/pipe/ShapeSpanIterator.java \
+        sun/java2d/pipe/SpanClipRenderer.java \
+        sun/java2d/pipe/RegionIterator.java \
+        sun/awt/image/IntegerComponentRaster.java \
+        sun/java2d/cmm/CMSManager.java \
+        sun/java2d/cmm/PCMM.java \
+        sun/java2d/cmm/ColorTransform.java \
+        sun/awt/datatransfer/DataTransferer.java \
+        sun/awt/dnd/SunDragSourceContextPeer.java \
+        sun/java2d/opengl/OGLBlitLoops.java \
+        sun/java2d/opengl/OGLContext.java \
+        sun/java2d/opengl/OGLMaskFill.java \
+        sun/java2d/opengl/OGLPaints.java \
+        sun/java2d/opengl/OGLRenderer.java \
+        sun/java2d/opengl/OGLRenderQueue.java \
+        sun/java2d/opengl/OGLSurfaceData.java \
+        sun/java2d/opengl/OGLTextRenderer.java \
+        sun/java2d/opengl/CGLGraphicsConfig.java \
+        sun/java2d/opengl/CGLSurfaceData.java \
+        sun/java2d/opengl/CGLLayer.java \
+        sun/awt/ExtendedKeyCodes.java 
+
+FILES_export2 = \
+        java/awt/AlphaComposite.java \
+        java/awt/MouseInfo.java \
+        java/awt/Cursor.java \
+        java/awt/Graphics.java \
+        java/awt/Color.java \
+        java/awt/Image.java \
+        java/awt/Rectangle.java \
+        java/awt/Event.java \
+        java/awt/Font.java \
+        java/awt/Insets.java \
+        java/awt/Point.java \
+        java/awt/FontMetrics.java \
+        java/awt/Toolkit.java \
+        java/awt/Component.java \
+        java/awt/Container.java \
+        java/awt/Canvas.java \
+        java/awt/Button.java \
+        java/awt/List.java \
+        java/awt/Adjustable.java \
+        java/awt/Scrollbar.java \
+        java/awt/ScrollPane.java \
+        java/awt/ScrollPaneAdjustable.java \
+        java/awt/Window.java \
+        java/awt/TextField.java \
+        java/awt/Label.java \
+        java/awt/Choice.java \
+        java/awt/TextArea.java \
+        java/awt/MenuBar.java \
+        java/awt/Menu.java \
+        java/awt/MenuComponent.java \
+        java/awt/PopupMenu.java \
+        java/awt/Dialog.java \
+        java/awt/FileDialog.java \
+        java/awt/MenuItem.java \
+        java/awt/Checkbox.java \
+        java/awt/CheckboxMenuItem.java \
+        java/awt/CheckboxGroup.java \
+        java/awt/Frame.java \
+        java/awt/Transparency.java \
+        java/awt/AWTException.java \
+        java/awt/AWTEvent.java \
+        java/awt/AWTKeyStroke.java \
+        java/awt/KeyboardFocusManager.java \
+        java/awt/Dimension.java \
+        java/awt/SystemColor.java \
+        java/awt/TrayIcon.java \
+        java/awt/DisplayMode.java \
+        java/awt/color/ColorSpace.java \
+        java/awt/color/ICC_Profile.java \
+        java/awt/geom/PathIterator.java \
+        java/awt/image/AffineTransformOp.java \
+        java/awt/image/ImageConsumer.java \
+        java/awt/image/ImageObserver.java \
+        java/awt/image/BufferedImage.java \
+        java/awt/image/ColorModel.java \
+        java/awt/image/ConvolveOp.java \
+        java/awt/image/DirectColorModel.java \
+        java/awt/image/IndexColorModel.java \
+        java/awt/image/DataBuffer.java \
+        java/awt/datatransfer/Transferable.java \
+        java/awt/datatransfer/DataFlavor.java \
+        java/awt/datatransfer/UnsupportedFlavorException.java \
+        java/awt/datatransfer/Clipboard.java \
+        java/awt/datatransfer/ClipboardOwner.java \
+        java/awt/datatransfer/StringSelection.java \
+        java/awt/event/AdjustmentEvent.java \
+        java/awt/event/KeyEvent.java \
+        java/awt/event/MouseEvent.java \
+        java/awt/event/MouseWheelEvent.java \
+        java/awt/event/FocusEvent.java \
+        java/awt/event/InputEvent.java \
+        java/awt/event/WindowEvent.java \
+        java/awt/event/NativeLibLoader.java \
+        java/awt/peer/ComponentPeer.java \
+        java/awt/dnd/DnDConstants.java \
+        sun/awt/CausedFocusEvent.java \
+        java/awt/print/PageFormat.java \
+        java/awt/print/Pageable.java \
+        java/awt/print/Printable.java \
+        java/awt/BasicStroke.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/sun/lwawt/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,114 @@
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+BUILDDIR = ../..
+MODULE  = awt
+PACKAGE = sun.lwawt
+LIBRARY = lwawt
+PRODUCT = sun
+
+LIB_LOCATION = $(LIBDIR)/lwawt
+
+include $(BUILDDIR)/common/Defs.gmk
+
+#
+# Files
+#
+include FILES_c_macosx.gmk
+include FILES_export_macosx.gmk
+AUTO_FILES_JAVA_DIRS = sun/awt sun/font sun/lwawt sun/lwawt/macosx sun/java2d sun/java2d/opengl com/apple/eawt
+
+#
+# Rules.
+#
+# include $(BUILDDIR)/common/Mapfile-vers.gmk
+include $(BUILDDIR)/common/Library.gmk
+
+#
+# Add to the ambient vpath to pick up files in subdirectories
+#
+vpath %.c   $(SHARE_SRC)/native/sun/awt/debug
+vpath %.c   $(SHARE_SRC)/native/sun/awt/image
+vpath %.c   $(SHARE_SRC)/native/sun/awt/image/gif
+vpath %.c   $(SHARE_SRC)/native/sun/awt/image/cvutils
+vpath %.c   $(SHARE_SRC)/native/sun/awt/shell
+vpath %.c   $(SHARE_SRC)/native/sun/java2d
+vpath %.c   $(SHARE_SRC)/native/sun/java2d/loops
+vpath %.c   $(SHARE_SRC)/native/sun/java2d/pipe
+vpath %.c   $(SHARE_SRC)/native/sun/java2d/opengl
+vpath %.c   $(SHARE_SRC)/native/sun/awt/medialib
+vpath %.c   $(SHARE_SRC)/native/sun/awt/utility
+vpath %.c   $(SHARE_SRC)/native/sun/font
+vpath %.c   $(call NativeSrcDirList,,native/sun/awt)
+
+vpath %.cpp $(SHARE_SRC)/native/sun/image
+
+vpath %.m   $(call NativeSrcDirList,,native/sun/awt)
+vpath %.m   $(call NativeSrcDirList,,native/sun/font)
+vpath %.m   $(call NativeSrcDirList,,native/sun/java2d)
+vpath %.m   $(call NativeSrcDirList,,native/sun/java2d/opengl)
+
+OTHER_LDLIBS += \
+	-lawt -lmlib_image -losxapp $(JVMLIB) $(LIBM) \
+	-framework Accelerate \
+	-framework ApplicationServices \
+	-framework AudioToolbox \
+	-framework Carbon \
+	-framework Cocoa \
+	-framework Security \
+	-framework ExceptionHandling \
+	-framework JavaNativeFoundation \
+	-framework JavaRuntimeSupport \
+	-framework OpenGL \
+        -framework QuartzCore
+CPPFLAGS += \
+        -I$(CLASSHDRDIR) \
+        -I$(SHARE_SRC)/native/sun/awt/debug \
+        -I$(SHARE_SRC)/native/sun/awt/image/cvutils \
+        -I$(SHARE_SRC)/native/sun/java2d \
+	-I$(SHARE_SRC)/native/sun/java2d/loops \
+	-I$(SHARE_SRC)/native/sun/awt/image/cvutils \
+	-I$(SHARE_SRC)/native/sun/awt/image \
+	-I$(SHARE_SRC)/native/sun/font \
+	-I$(SHARE_SRC)/native/sun/java2d/pipe \
+	-I$(SHARE_SRC)/native/sun/java2d/opengl \
+	-I$(SHARE_SRC)/native/sun/dc/path \
+	-I$(SHARE_SRC)/native/sun/dc/doe \
+	-I$(SHARE_SRC)/native/sun/awt/alphacomposite \
+        -I$(SHARE_SRC)/native/sun/awt/medialib \
+        -I$(SHARE_SRC)/native/sun/awt \
+        $(call NativeSrcDirList,-I,/native/sun/awt) \
+        $(call NativeSrcDirList,-I,/native/sun/osxapp) \
+        $(call NativeSrcDirList,-I,/native/sun/font) \
+	$(call NativeSrcDirList,-I,/native/sun/java2d) \
+	$(call NativeSrcDirList,-I,/native/sun/java2d/opengl)
+
+ifeq ($(MILESTONE), internal)
+  CPPFLAGS += -DINTERNAL_BUILD
+endif
+
+clean clobber::
+
+.PHONY:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/sun/osxapp/Makefile	Tue Mar 06 20:34:38 2012 +0000
@@ -0,0 +1,75 @@
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+BUILDDIR = ../..
+LIBRARY = osxapp
+PRODUCT = sun
+include $(BUILDDIR)/common/Defs.gmk
+
+#
+# Files
+#
+FILES_objc = \
+	NSApplicationAWT.m \
+	QueuingApplicationDelegate.m \
+	PropertiesUtilities.m \
+	ThreadUtilities.m
+
+#
+# Rules.
+#
+include $(BUILDDIR)/common/Library.gmk
+
+#
+# Add to the ambient vpath to pick up files in subdirectories
+#
+vpath %.m   $(call NativeSrcDirList,,native/sun/osxapp)
+
+# TODO: perhaps not all of the below frameworks are required
+OTHER_LDLIBS += \
+	-framework Accelerate \
+	-framework ApplicationServices \
+	-framework AudioToolbox \
+	-framework Carbon \
+	-framework Cocoa \
+	-framework Security \
+	-framework ExceptionHandling \
+	-framework JavaNativeFoundation \
+	-framework JavaRuntimeSupport \
+	-framework OpenGL \
+	-framework IOSurface \
+	-framework QuartzCore
+
+CPPFLAGS += \
+        $(call NativeSrcDirList,-I,/native/sun/osxapp)
+
+
+ifeq ($(MILESTONE), internal)
+  CPPFLAGS += -DINTERNAL_BUILD
+endif
+
+clean clobber::
+
+.PHONY:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/sun/rm