提交 4fca4016 编写于 作者: P prr

7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files

Reviewed-by: igor, jgodinez
上级 ad6fa056
......@@ -136,8 +136,25 @@ ifeq ($(PLATFORM), linux)
-I$(OPENWIN_HOME)/include
endif
# We have some odd logic here because some Solaris 10 updates
# have a render.h file that suggests gradients are supported, but
# the Xrender.h doesn't have the corresponding type definitions.
# Earlier updates have neither. We'd like to know if there's a mismatch.
# Whilst in the C preprocessor we can tell if the render.h define's are set
# we can't tell anything about C declarations.
# A grep of Xrender.h is the only way to know this. If they are absent
# we will set a flag indicating this mismatch and the JDK source file
# will interpret it to resolve the problem.
ifeq ($(PLATFORM), solaris)
CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions
OS_VERSION := $(shell uname -r)
XRENDER_H := $(OPENWIN_HOME)/share/include/X11/extensions/Xrender.h
ifeq ($(OS_VERSION),5.10)
LINEARGRADIENT_CNT := $(shell $(EGREP) -c XLinearGradient $(XRENDER_H))
ifeq ($(LINEARGRADIENT_CNT),0)
CFLAGS+= -DSOLARIS10_NO_XRENDER_STRUCTS
endif
endif
endif
ifeq ($(MILESTONE), internal)
......
......@@ -31,6 +31,21 @@
#include <X11/extensions/Xrender.h>
/* On Solaris 10 updates 8, 9, the render.h file defines these
* protocol values but does not define the structs in Xrender.h.
* Thus in order to get these always defined on Solaris 10
* we will undefine the symbols if we have determined via the
* makefiles that Xrender.h is lacking the structs. This will
* trigger providing our own definitions as on earlier updates.
* We could assume that *all* Solaris 10 update versions will lack the updated
* Xrender.h and do this based solely on O/S being any 5.10 version, but this
* could still change and we'd be broken again as we'd be re-defining them.
*/
#ifdef SOLARIS10_NO_XRENDER_STRUCTS
#undef X_RenderCreateLinearGradient
#undef X_RenderCreateRadialGradient
#endif
#ifndef X_RenderCreateLinearGradient
typedef struct _XLinearGradient {
XPointFixed p1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册