8003900: X11 dependencies should be removed from Mac OS X build.
Reviewed-by: anthony, art, pchelko
Contributed-by: David DeHaven <david.dehaven@oracle.com>
--- a/jdk/make/lib/Awt2dLibraries.gmk Thu May 15 20:24:13 2014 +0400
+++ b/jdk/make/lib/Awt2dLibraries.gmk Tue May 13 10:29:12 2014 -0700
@@ -318,7 +318,7 @@
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
- LIBAWT_FILES += awt_LoadLibrary.c img_colors.c
+ LIBAWT_FILES += awt_LoadLibrary.c
LIBAWT_CFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks
endif
--- a/jdk/src/solaris/native/sun/awt/awt.h Thu May 15 20:24:13 2014 +0400
+++ b/jdk/src/solaris/native/sun/awt/awt.h Tue May 13 10:29:12 2014 -0700
@@ -34,9 +34,9 @@
#include "jni_util.h"
#include "debug_util.h"
-#ifndef HEADLESS
+#if !defined(HEADLESS) && !defined(MACOSX)
#include <X11/Intrinsic.h>
-#endif /* !HEADLESS */
+#endif /* !HEADLESS && !MACOSX */
/* The JVM instance: defined in awt_MToolkit.c */
@@ -110,9 +110,9 @@
#define AWT_NOTIFY() AWT_NOTIFY_IMPL()
#define AWT_NOTIFY_ALL() AWT_NOTIFY_ALL_IMPL()
-#ifndef HEADLESS
+#if !defined(HEADLESS) && !defined(MACOSX)
extern Display *awt_display; /* awt_GraphicsEnv.c */
extern Boolean awt_ModLockIsShiftLock; /* XToolkit.c */
-#endif /* !HEADLESS */
+#endif /* !HEADLESS && !MACOSX */
#endif /* ! _AWT_ */
--- a/jdk/src/solaris/native/sun/awt/color.h Thu May 15 20:24:13 2014 +0400
+++ b/jdk/src/solaris/native/sun/awt/color.h Tue May 13 10:29:12 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -28,13 +28,13 @@
#include "awt.h"
#include "colordata.h"
-#ifndef HEADLESS
+#if !defined(HEADLESS) && !defined(MACOSX)
typedef struct {
unsigned int Depth;
XPixmapFormatValues wsImageFormat;
ImgColorData clrdata;
ImgConvertFcn *convert[NUM_IMGCV];
} awtImageData;
-#endif /* !HEADLESS */
+#endif /* !HEADLESS && !MACOSX */
#endif /* _COLOR_H_ */
--- a/jdk/src/solaris/native/sun/awt/img_util_md.h Thu May 15 20:24:13 2014 +0400
+++ b/jdk/src/solaris/native/sun/awt/img_util_md.h Tue May 13 10:29:12 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, 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
@@ -25,7 +25,7 @@
#include "color.h"
-#ifndef HEADLESS
+#if !defined(HEADLESS) && !defined(MACOSX)
typedef struct {
ImgConvertData cvdata; /* The data needed by ImgConvertFcn's */
struct Hsun_awt_image_ImageRepresentation *hJavaObject; /* backptr */
@@ -68,7 +68,7 @@
#define MaskScan(cvdata) \
((((IRData *)cvdata)->maskim->bytes_per_line) >> 2)
-#endif /* !HEADLESS */
+#endif /* !HEADLESS && !MACOSX */
#define MaskOffset(x) ((x) >> 5)
--- a/jdk/src/solaris/native/sun/awt/utility/rect.h Thu May 15 20:24:13 2014 +0400
+++ b/jdk/src/solaris/native/sun/awt/utility/rect.h Tue May 13 10:29:12 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014 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
@@ -28,8 +28,18 @@
#ifndef _AWT_RECT_H
#define _AWT_RECT_H
+#ifndef MACOSX
#include <X11/Xlib.h>
typedef XRectangle RECT_T;
+#else
+// OSX still needs this for BitmapToYXBandedRectangles
+typedef struct {
+ int x;
+ int y;
+ int width;
+ int height;
+} RECT_T;
+#endif /* !MACOSX */
#define RECT_EQ_X(r1,r2) ((r1).x==(r2).x && (r1).width==(r2).width)