[rfc][icedtea6] patches for windows builds

Alex Kasko alex.kasko.lists at gmail.com
Mon Jul 22 08:50:59 PDT 2013


Hi,

I've built icedtea6 head (hg:11f837636a0a) for windows-i586 and
windows-amd64 and want to publish patches for possible upstreaming
(maybe some of them) into icedtea6.

Previous mailing list thread about windows builds -
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2013-June/023706.html

Patches were done from temporary git repository
(https://bitbucket.org/alexkasko/openjdk-icedtea6) with openjdk sources
from icedtea6 build using 'git format-patch' command.

Patched sources (git:9d44b25) were built and tested with "make test" on
windows-i586 (windows 2000), windows-amd64 (windows 2003 x64),
linux-i586 and linux-amd64 (both debian lenny). All builds were done as
separate openjdk builds without icedtea infrastructure. Binaries
download link - https://bitbucket.org/alexkasko/openjdk-icedtea6/downloads

Patches list:

   * 0001-use-included-zip.patch
   * 0002-jpeg-sources-included.patch (too big for attachment, file link 
- 
https://bitbucket.org/alexkasko/openjdk-icedtea6/downloads/0002-jpeg-sources-included.patch)
   * 0003-splashscreen-with-included-jpeg-png-and-gif.patch
   * 0004-hostspot-SIZE_MAX-and-varmacro-patch.patch
   * 0005-jdk-nio-typo-patch.patch
   * 0006-jdk-SIZE_MAX-patch.patch
   * 0007-awt-wheel95-patch.patch
   * 0008-awt-_WIN32_WINNT-patch.patch
   * 0009-pack-header-change-to-fix-linux_x64-builds.patch


Patches description:

0001-use-included-zip.patch
(https://bitbucket.org/alexkasko/openjdk-icedtea6/commits/52ab88acf2336e1d5f6ff42f67041e8070ae5999)

Changelog:

	* jdk/make/com/sun/java/pack/Makefile:
	add included zlib sources to buil flags
	* jdk/make/common/Program.gmk:
	remove system zlib dependencies (-lz) from LDFLAGS
	* jdk/make/java/jli/Makefile:
	add ZLIB_VERSION and ZIP_SRC variables, add included zlib sources to
compilation list, remove system zlib dependencies (-lz) from LDLIBS
	* jdk/make/java/zip/FILES_c.gmk:
	add included zlib sources to compilation list
	* jdk/make/java/zip/Makefile:
	add ZLIB_VERSION variable and append included zlib headers to CPPFLAGS
	* jdk/make/sun/splashscreen/Makefile:
	remove system zlib dependencies (-lz) from OTHER_LDLIBS, add include
zlib sources
	
Changes brought back from openjdk6 sources. Maybe these changes should
be done on "configure" level, not in patch.


0002-jpeg-sources-included.patch (too big for attachment, file link - 
https://bitbucket.org/alexkasko/openjdk-icedtea6/downloads/0002-jpeg-sources-included.patch, 
https://bitbucket.org/alexkasko/openjdk-icedtea6/commits/dfafae220eb2f754a665758ab484659b8d388802)

Changelog:

	* jdk/make/sun/jpeg/FILES_c.gmk:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/README:
	file copied from openjdk7
	* jdk/src//share/native/sun/awt/image/jpeg/imageioJPEG.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jcapimin.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jcapistd.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jccoefct.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jccolor.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jcdctmgr.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jchuff.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jchuff.h:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jcinit.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jcmainct.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jcmarker.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jcmaster.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jcomapi.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jconfig.h:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jcparam.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jcphuff.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jcprepct.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jcsample.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jctrans.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jdapimin.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jdapistd.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jdcoefct.c:
	file copied from openjdk7
      	* jdk/src/share/native/sun/awt/image/jpeg/jdcolor.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jdct.h:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jddctmgr.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jdhuff.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jdhuff.h:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jdinput.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jdmainct.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jdmarker.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jdmaster.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jdmerge.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jdphuff.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jdpostct.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jdsample.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jdtrans.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jerror.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jerror.h:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jfdctflt.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jfdctfst.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jfdctint.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jidctflt.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jidctfst.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jidctint.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jidctred.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jinclude.h:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jmemmgr.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jmemnobs.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jmemsys.h:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jmorecfg.h:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jpegint.h:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jpeglib.h:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jquant1.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jquant2.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jutils.c:
	file copied from openjdk7
	* jdk/src/share/native/sun/awt/image/jpeg/jversion.h:
	file copied from openjdk7

All JPEG sources are copied from openjdk7 without changes. jdk7 is used
here instead of jdk6 to include these changes -
http://hg.openjdk.java.net/jdk7/2d/jdk/rev/bcf663c292ef
(http://bugs.sun.com/view_bug.do?bug_id=6989774). Maybe these changes
should be done on "configure" level, not in patch.


0003-splashscreen-with-included-jpeg-png-and-gif
(https://bitbucket.org/alexkasko/openjdk-icedtea6/commits/c923ca878ec87a8a25ae8c4318adaf9ea5506b43)

Changelog:

	* jdk/make/sun/splashscreen/FILES_c.gmk:
	add zlib, jpeg, png and gif included sources to compilation list
	* jdk/make/sun/splashscreen/Makefile:
	remove "-lpng", "-ljpeg" and "-lgif" from OTHER_LDLIBS, add gif and png
incuded sources to vpath
	* jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c:
	use included gif header instead of system one
	* jdk/src/share/native/sun/awt/splashscreen/splashscreen_jpeg.c:
	use included jpeg header instead of system one
	* jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c:
	use included png header instead of system one

Changes were brought back from openjdk6 sources. Maybe these changes
should be done on "configure" level, not in patch.


0004-hostspot-SIZE_MAX-and-varmacro-patch.patch
(https://bitbucket.org/alexkasko/openjdk-icedtea6/commits/3602db05977bd874fe1180c81d2bb7ff07795918)

Changelog:

	* hotspot/src/share/vm/oops/arrayOop.hpp:
	SIZE_MAX macro definition, copied from
http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/file/84101d9f6c3a/src/share/native/common/sizecalc.h 

. _WIN32 checks are necessary because MSVS2003 doesn't have stdint.h
	* hotspot/src/share/vm/trace/traceMacros.hpp:
	turn empty variadic macro into simple one, MSVS2003 doesn't support
varmacros and this one is used only with two arguments anyway

These changes are specific to hotspot 23 that is intended to be built
with VS2010 in jdk7. Hotspot 20 from icedtea 1.12.6 doesn't have such
problems.


0005-jdk-nio-typo-patch.patch
(https://bitbucket.org/alexkasko/openjdk-icedtea6/commits/b02ef9cb80e2595115159a92b4a500daf0efdaaf)

Changelog:

	* jdk/src/windows/native/sun/nio/ch/Net.c:
	fix parameter name typo

I think typo appeared on backport of this change
http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/diff/8dd8266a2f4b/src/windows/native/sun/nio/ch/Net.c


0006-jdk-SIZE_MAX-patch.patch
(https://bitbucket.org/alexkasko/openjdk-icedtea6/commits/80b5bf850eab55727502f17024b1d1aeee60ca05)

Changelog:

	* jdk/src/share/native/common/sizecalc.h
	add  _WIN32 checks because MSVS2003 doesn't have stdint.h


0007-awt-wheel95-patch.patch
(https://bitbucket.org/alexkasko/openjdk-icedtea6/commits/30ffef2215e4d6615aa487dbe7c5b9e48f766ee6)

Changelog:

	* jdk/src/windows/native/sun/windows/awt_Component.cpp:
	add empty variables related to mouse wheel support in windows 95, they
are not used, but are required for compilation
	* jdk/src/windows/native/sun/windows/awt_Component.h:
	add functions related to mouse wheel support in windows 95, they are
not used, but are required for compilation

The problem appears because icedtea6 codebase contains partial changes
from this commit
http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/75755e92430c . I
doubt that whole commit may be backported to MSVS2003 so decided to
restore some empty functions.


0008-awt-_WIN32_WINNT-patch.patch
(https://bitbucket.org/alexkasko/openjdk-icedtea6/commits/da1de1aca635b834a44e74f379bdc03082ce252f)

Changelog:

	* jdk/src/windows/native/sun/windows/awt_MMStub.h:
	add 4 constants, 1 typedef and 2 function declarations from winuser.h
	* jdk/src/windows/native/sun/windows/awt_Toolkit.cpp:
	use MONITOR_INFO type from awt_MMStub.h instead of native MONITORINFO
	* jdk/src/windows/native/sun/windows/awt_Window.cpp:
	use MHND type from awt_MMStub.h instead of native HMONITOR

As in previous patch, the problem appears because icedtea6 codebase
contains partial changes from this commit
http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/75755e92430c . I
doubt that whole commit may be backported to MSVS2003. When including
winuser.h (through windows.h) imported definitions depend on value of
_WIN32_WINNT macro which represents OS version. Before change this macro
wasn't defined so some definitions aren't imported from winuser.h. OS
version cannot be defined properly here, because most of AWT code in
icedtea6 still uses AWT's own definitions from awt_MMStub.h and though
data types are similar they don't coincide. So I reverted some parts of
the change to use definitions from awt_MMStub.h. But some of new changes
use API that requires additional definitions from winuser.h. For those
API I copied declarations to awt_MMStub.h (all functions are supported
on win2000+, implementation is in user32.dll).


0009-pack-header-change-to-fix-linux_x64-builds.patch
(https://bitbucket.org/alexkasko/openjdk-icedtea6/commits/9d44b25626450948461429f37bcd1b269bbbee3b)

Changelog:

	*  jdk/src/share/native/com/sun/java/util/jar/pack/defines.h:
	use zlib 32 ints on x64 to allow compiling on linux x64

Change was brought back from openjdk6 sources.

-- 
Regards,
Alex Kasko






-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-use-included-zip.patch
Type: text/x-diff
Size: 5511 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20130722/c4aa5743/0001-use-included-zip.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-splashscreen-with-included-jpeg-png-and-gif.patch
Type: text/x-diff
Size: 4761 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20130722/c4aa5743/0003-splashscreen-with-included-jpeg-png-and-gif.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-hostspot-SIZE_MAX-and-varmacro-patch.patch
Type: text/x-diff
Size: 1529 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20130722/c4aa5743/0004-hostspot-SIZE_MAX-and-varmacro-patch.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-jdk-nio-typo-patch.patch
Type: text/x-diff
Size: 910 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20130722/c4aa5743/0005-jdk-nio-typo-patch.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-jdk-SIZE_MAX-patch.patch
Type: text/x-diff
Size: 852 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20130722/c4aa5743/0006-jdk-SIZE_MAX-patch.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-awt-wheel95-patch.patch
Type: text/x-diff
Size: 2268 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20130722/c4aa5743/0007-awt-wheel95-patch.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-awt-_WIN32_WINNT-patch.patch
Type: text/x-diff
Size: 4461 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20130722/c4aa5743/0008-awt-_WIN32_WINNT-patch.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-pack-header-change-to-fix-linux_x64-builds.patch
Type: text/x-diff
Size: 941 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20130722/c4aa5743/0009-pack-header-change-to-fix-linux_x64-builds.patch 


More information about the distro-pkg-dev mailing list