changeset 1723:839024180a41

Patch FileDispatcherImpl when PR39408 is present in gjavah. 2009-03-18 Andrew John Hughes <ahughes@redhat.com> * Makefile.am: Enable new PR39408 patch when bug is found in gjavah by configure. * acinclude.m4: (IT_CP39408_JAVAH): Add classpath specification to JAVAC invocation to handle buggy ecjs. * patches/ecj/icedtea-pr39408.patch: New patch to fix build failure when PR39408 is present in gjavah.
author Andrew John Hughes <ahughes@redhat.com>
date Wed, 18 Mar 2009 18:58:02 +0000
parents b60e655cb130
children 5c9a214071b9
files ChangeLog Makefile.am acinclude.m4 patches/ecj/icedtea-pr39408.patch
diffstat 4 files changed, 35 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Mar 18 04:33:56 2009 +0000
+++ b/ChangeLog	Wed Mar 18 18:58:02 2009 +0000
@@ -1,3 +1,15 @@
+2009-03-18  Andrew John Hughes  <ahughes@redhat.com>
+
+	* Makefile.am:
+	Enable new PR39408 patch when bug is
+	found in gjavah by configure.
+	* acinclude.m4:
+	(IT_CP39408_JAVAH): Add classpath specification
+	to JAVAC invocation to handle buggy ecjs.
+	* patches/ecj/icedtea-pr39408.patch:
+	New patch to fix build failure when PR39408
+	is present in gjavah.
+
 2009-03-17  Andrew John Hughes  <ahughes@redhat.com>
 
 	* acinclude.m4:
--- a/Makefile.am	Wed Mar 18 04:33:56 2009 +0000
+++ b/Makefile.am	Wed Mar 18 18:58:02 2009 +0000
@@ -2164,6 +2164,10 @@
 	patches/ecj/icedtea-jopt.patch \
 	patches/ecj/icedtea-sbcs.patch
 
+if CP39408_JAVAH
+ICEDTEA_ECJ_PATCHES += patches/ecj/icedtea-pr39408.patch
+endif
+
 stamps/patch-ecj.stamp: stamps/clone-ecj.stamp
 	mkdir -p stamps; \
 	rm -f stamps/patch-ecj.stamp.tmp ; \
--- a/acinclude.m4	Wed Mar 18 04:33:56 2009 +0000
+++ b/acinclude.m4	Wed Mar 18 18:58:02 2009 +0000
@@ -1196,7 +1196,7 @@
   public native void doStuff();
 }
 EOF
-if $JAVAC $JAVACFLAGS $SUBCLASS >/dev/null 2>&1; then
+if $JAVAC -cp . $JAVACFLAGS $SUBCLASS >/dev/null 2>&1; then
   if $JAVAH -classpath . $SUB > /dev/null 2>&1; then
     if cat $SUBHEADER | grep POTATO > /dev/null 2>&1; then
       it_cv_cp39408_javah=no;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/ecj/icedtea-pr39408.patch	Wed Mar 18 18:58:02 2009 +0000
@@ -0,0 +1,18 @@
+diff -Nru openjdk.orig/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c openjdk/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c
+--- openjdk-ecj.orig/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c	2009-03-18 16:25:52.000000000 +0000
++++ openjdk-ecj/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c	2009-03-18 16:27:03.000000000 +0000
+@@ -36,6 +36,14 @@
+ #include "nio.h"
+ #include "nio_util.h"
+ 
++#undef sun_nio_ch_FileDispatcherImpl_NO_LOCK
++#define sun_nio_ch_FileDispatcherImpl_NO_LOCK -1L
++#undef sun_nio_ch_FileDispatcherImpl_LOCKED
++#define sun_nio_ch_FileDispatcherImpl_LOCKED 0L
++#undef sun_nio_ch_FileDispatcherImpl_RET_EX_LOCK
++#define sun_nio_ch_FileDispatcherImpl_RET_EX_LOCK 1L
++#undef sun_nio_ch_FileDispatcherImpl_INTERRUPTED
++#define sun_nio_ch_FileDispatcherImpl_INTERRUPTED 2L
+ 
+ static int preCloseFD = -1;     /* File descriptor to which we dup other fd's
+                                    before closing them for real */