Hi, I am still commit crippled, so please someone commit these for me: For jdk: 1. Prefer hw.physmem64 if it exists. 2..(n-1): jibx 1.2.1 needs an isExtension(String) implemented. n. - NetBSD does not have statfs, it has statvfs. - Don't cast malloc return; it is bad form (and it will hide errors from not including <stdlib.h>). - NULL is not 0, could be (void *)0 For corba [the last patch], same as [1]: Thank you! Best, christos diff -r 73f318cc8800 make/common/shared/Platform.gmk --- a/make/common/shared/Platform.gmk Tue Jun 02 11:13:14 2009 -0400 +++ b/make/common/shared/Platform.gmk Tue Jun 02 17:17:07 2009 -0400 @@ -287,7 +287,7 @@ # a fully built workspace. REQUIRED_FREE_SPACE=1500000 # How much RAM does this machine have: - MB_OF_MEMORY=$(shell sysctl -n hw.physmem | awk '{print int($$NF / 1048576); }' ) + MB_OF_MEMORY=$(shell (sysctl -n hw.physmem64 2> /dev/null || sysctl -n hw.physmem) | awk '{print int($$NF / 1048576); }' ) endif # Windows with and without CYGWIN will be slightly different diff -r 73f318cc8800 make/tools/swing-nimbus/classes/org/jdesktop/swingx/designer/jibxhelpers/CanvasMapper.java --- a/make/tools/swing-nimbus/classes/org/jdesktop/swingx/designer/jibxhelpers/CanvasMapper.java Tue Jun 02 11:13:14 2009 -0400 +++ b/make/tools/swing-nimbus/classes/org/jdesktop/swingx/designer/jibxhelpers/CanvasMapper.java Tue Jun 02 17:17:07 2009 -0400 @@ -64,6 +64,10 @@ return false; } + public boolean isExtension(String s) { + return false; + } + public boolean isPresent(IUnmarshallingContext iUnmarshallingContext) throws JiBXException { return iUnmarshallingContext.isAt(null, ELEMENT_NAME); } diff -r 73f318cc8800 make/tools/swing-nimbus/classes/org/jdesktop/swingx/designer/jibxhelpers/ColorMapper.java --- a/make/tools/swing-nimbus/classes/org/jdesktop/swingx/designer/jibxhelpers/ColorMapper.java Tue Jun 02 11:13:14 2009 -0400 +++ b/make/tools/swing-nimbus/classes/org/jdesktop/swingx/designer/jibxhelpers/ColorMapper.java Tue Jun 02 17:17:07 2009 -0400 @@ -50,6 +50,10 @@ return false; } + public boolean isExtension(String s) { + return false; + } + public boolean isPresent(IUnmarshallingContext iUnmarshallingContext) throws JiBXException { return iUnmarshallingContext.isAt(null, ELEMENT_NAME); } diff -r 73f318cc8800 make/tools/swing-nimbus/classes/org/jdesktop/swingx/designer/jibxhelpers/DimensionMapper.java --- a/make/tools/swing-nimbus/classes/org/jdesktop/swingx/designer/jibxhelpers/DimensionMapper.java Tue Jun 02 11:13:14 2009 -0400 +++ b/make/tools/swing-nimbus/classes/org/jdesktop/swingx/designer/jibxhelpers/DimensionMapper.java Tue Jun 02 17:17:07 2009 -0400 @@ -65,6 +65,10 @@ return false; } + public boolean isExtension(String s) { + return false; + } + public boolean isPresent(IUnmarshallingContext iUnmarshallingContext) throws JiBXException { return iUnmarshallingContext.isAt(uri, ELEMENT_NAME); } diff -r 73f318cc8800 make/tools/swing-nimbus/classes/org/jdesktop/swingx/designer/jibxhelpers/InsetsMapper.java --- a/make/tools/swing-nimbus/classes/org/jdesktop/swingx/designer/jibxhelpers/InsetsMapper.java Tue Jun 02 11:13:14 2009 -0400 +++ b/make/tools/swing-nimbus/classes/org/jdesktop/swingx/designer/jibxhelpers/InsetsMapper.java Tue Jun 02 17:17:07 2009 -0400 @@ -40,6 +40,7 @@ * * @author Created by Jasper Potts (Jun 8, 2007) */ +/*###43 [cc] org.jdesktop.swingx.designer.jibxhelpers.InsetsMapper is not abstract and does not override abstract method isExtension(java.lang.String) in org.jibx.runtime.IMarshaller%%%*/ public class InsetsMapper implements IMarshaller, IUnmarshaller, IAliasable { private static final String ELEMENT_NAME = "insets"; private static final String TOP_NAME = "top"; @@ -68,6 +69,10 @@ return false; } + public boolean isExtension(String s) { + return false; + } + public boolean isPresent(IUnmarshallingContext iUnmarshallingContext) throws JiBXException { return iUnmarshallingContext.isAt(uri, ELEMENT_NAME); } diff -r 73f318cc8800 make/tools/swing-nimbus/classes/org/jdesktop/synthdesigner/synthmodel/jibxhelpers/BorderMapper.java --- a/make/tools/swing-nimbus/classes/org/jdesktop/synthdesigner/synthmodel/jibxhelpers/BorderMapper.java Tue Jun 02 11:13:14 2009 -0400 +++ b/make/tools/swing-nimbus/classes/org/jdesktop/synthdesigner/synthmodel/jibxhelpers/BorderMapper.java Tue Jun 02 17:17:07 2009 -0400 @@ -99,6 +99,10 @@ return false; } + public boolean isExtension(String s) { + return false; + } + public boolean isPresent(IUnmarshallingContext iUnmarshallingContext) throws JiBXException { return iUnmarshallingContext.isAt(uri, ELEMENT_NAME); diff -r 73f318cc8800 make/tools/swing-nimbus/classes/org/jdesktop/synthdesigner/synthmodel/jibxhelpers/ClassMapper.java --- a/make/tools/swing-nimbus/classes/org/jdesktop/synthdesigner/synthmodel/jibxhelpers/ClassMapper.java Tue Jun 02 11:13:14 2009 -0400 +++ b/make/tools/swing-nimbus/classes/org/jdesktop/synthdesigner/synthmodel/jibxhelpers/ClassMapper.java Tue Jun 02 17:17:07 2009 -0400 @@ -40,6 +40,10 @@ return false; } + public boolean isExtension(String s) { + return false; + } + public boolean isPresent(IUnmarshallingContext iUnmarshallingContext) throws JiBXException { return iUnmarshallingContext.isAt(null, ELEMENT_NAME); } diff -r 73f318cc8800 make/tools/swing-nimbus/classes/org/jdesktop/synthdesigner/synthmodel/jibxhelpers/FontMapper.java --- a/make/tools/swing-nimbus/classes/org/jdesktop/synthdesigner/synthmodel/jibxhelpers/FontMapper.java Tue Jun 02 11:13:14 2009 -0400 +++ b/make/tools/swing-nimbus/classes/org/jdesktop/synthdesigner/synthmodel/jibxhelpers/FontMapper.java Tue Jun 02 17:17:07 2009 -0400 @@ -49,6 +49,10 @@ return false; } + public boolean isExtension(String s) { + return false; + } + public boolean isPresent(IUnmarshallingContext iUnmarshallingContext) throws JiBXException { return iUnmarshallingContext.isAt(null, ELEMENT_NAME); } diff -r 73f318cc8800 make/tools/swing-nimbus/classes/org/jdesktop/synthdesigner/synthmodel/jibxhelpers/UIPropertyMapper.java --- a/make/tools/swing-nimbus/classes/org/jdesktop/synthdesigner/synthmodel/jibxhelpers/UIPropertyMapper.java Tue Jun 02 11:13:14 2009 -0400 +++ b/make/tools/swing-nimbus/classes/org/jdesktop/synthdesigner/synthmodel/jibxhelpers/UIPropertyMapper.java Tue Jun 02 17:17:07 2009 -0400 @@ -51,6 +51,10 @@ return false; } + public boolean isExtension(String s) { + return false; + } + public boolean isPresent(IUnmarshallingContext iUnmarshallingContext) throws JiBXException { return iUnmarshallingContext.isAt(null, ELEMENT_NAME); } diff -r 73f318cc8800 src/solaris/native/sun/nio/fs/BsdNativeDispatcher.c --- a/src/solaris/native/sun/nio/fs/BsdNativeDispatcher.c Tue Jun 02 11:13:14 2009 -0400 +++ b/src/solaris/native/sun/nio/fs/BsdNativeDispatcher.c Tue Jun 02 17:17:07 2009 -0400 @@ -30,6 +30,14 @@ #include <sys/param.h> #include <sys/mount.h> +#ifdef ST_RDONLY +#define statfs statvfs +#define getfsstat getvfsstat +#define f_flags f_flag +#define ISREADONLY ST_RDONLY +#else +#define ISREADONLY MNT_RDONLY +#endif #include <stdlib.h> #include <string.h> @@ -40,6 +48,7 @@ static jfieldID entry_options; static jfieldID entry_dev; + struct fsstat_iter { struct statfs *buf; int pos; @@ -80,11 +89,11 @@ { int nentries; size_t bufsize; - struct fsstat_iter *iter = (struct fsstat_iter *)malloc(sizeof(*iter)); + struct fsstat_iter *iter = malloc(sizeof(*iter)); if (iter == NULL) { JNU_ThrowOutOfMemoryError(env, "native heap"); - return NULL; + return 0; } iter->pos = 0; @@ -96,7 +105,7 @@ if (nentries <= 0) { free(iter); throwUnixException(env, errno); - return NULL; + return 0; } // It's possible that a new filesystem gets mounted between @@ -109,11 +118,11 @@ bufsize = nentries * sizeof(struct statfs); iter->nentries = nentries; - iter->buf = (struct statfs *)malloc(bufsize); + iter->buf = malloc(bufsize); if (iter->buf == NULL) { free(iter); JNU_ThrowOutOfMemoryError(env, "native heap"); - return NULL; + return 0; } nentries = getfsstat(iter->buf, bufsize, MNT_WAIT); @@ -121,7 +130,7 @@ free(iter->buf); free(iter); throwUnixException(env, errno); - return NULL; + return 0; } } @@ -147,7 +156,7 @@ name = iter->buf[iter->pos].f_mntfromname; dir = iter->buf[iter->pos].f_mntonname; fstype = iter->buf[iter->pos].f_fstypename; - if (iter->buf[iter->pos].f_flags & MNT_RDONLY) + if (iter->buf[iter->pos].f_flags & ISREADONLY) options="ro"; else options=""; diff -r 8f0606272941 make/common/shared/Platform.gmk --- a/make/common/shared/Platform.gmk Wed May 20 18:49:21 2009 -0400 +++ b/make/common/shared/Platform.gmk Tue Jun 02 17:17:14 2009 -0400 @@ -338,7 +338,7 @@ # a fully built workspace. REQUIRED_FREE_SPACE=1500000 # How much RAM does this machine have: - MB_OF_MEMORY=$(shell sysctl -n hw.physmem | awk '{print int($$NF / 1048576); }' ) + MB_OF_MEMORY=$(shell (sysctl -n hw.physmem64 2> /dev/null || sysctl -n hw.physmem) | awk '{print int($$NF / 1048576); }' ) endif # Windows with and without CYGWIN will be slightly different
On Jun 2, 5:27pm, christos@zoulas.com (Christos Zoulas) wrote: -- Subject: Fixes for Head... | For jdk: | | 1. Prefer hw.physmem64 if it exists. | 2..(n-1): jibx 1.2.1 needs an isExtension(String) implemented. | n. - NetBSD does not have statfs, it has statvfs. | - Don't cast malloc return; it is bad form (and it will hide errors | from not including <stdlib.h>). | - NULL is not 0, could be (void *)0 | | For corba [the last patch], same as [1]: | Oops, one of the patches has an error comment in it... Delete it please: +++ b/make/tools/swing-nimbus/classes/org/jdesktop/swingx/designer/jibxhelpers/I nsetsMapper.java christos
Hi Christos, Christos Zoulas wrote:
Hi,
I am still commit crippled, so please someone commit these for me:
For jdk:
1. Prefer hw.physmem64 if it exists.
OpenBSD's sysctl doesn't error out when presented with bad data it just warns and continues to parse arguments so I'll special case it. FreeBSD and OS X/Darwin do error out like NetBSD.
2..(n-1): jibx 1.2.1 needs an isExtension(String) implemented.
I prefer these not to be committed. We're trying to keep changes to a minimum and the build docs require a specific version of jibx. See README-builds.html: JIBX libraries version 1.1.5 is required for building the OpenJDK.
n. - NetBSD does not have statfs, it has statvfs. - Don't cast malloc return; it is bad form (and it will hide errors from not including <stdlib.h>). - NULL is not 0, could be (void *)0
Whoops - sorry. I swear I checked NetBSD's online man pages, but now I see it isn't there.
For corba [the last patch], same as [1]:
Will handle same as [1] Thanks, -Kurt
On Jun 2, 7:55pm, kurt@intricatesoftware.com (Kurt Miller) wrote: -- Subject: Re: Fixes for Head... | > For jdk: | > | > 1. Prefer hw.physmem64 if it exists. | | OpenBSD's sysctl doesn't error out when presented with bad data it | just warns and continues to parse arguments so I'll special case | it. FreeBSD and OS X/Darwin do error out like NetBSD. Ok, thanks. | > 2..(n-1): jibx 1.2.1 needs an isExtension(String) implemented. | | I prefer these not to be committed. We're trying to keep changes to | a minimum and the build docs require a specific version of jibx. See | | README-builds.html: JIBX libraries version 1.1.5 is required for | building the OpenJDK. Fine with me (the change actually future proofs the code, so both 1.1.5 and 1.2.1 work with it; eventually OpenJDK will have to add it). | > n. - NetBSD does not have statfs, it has statvfs. | > - Don't cast malloc return; it is bad form (and it will hide errors | > from not including <stdlib.h>). | > - NULL is not 0, could be (void *)0 | | Whoops - sorry. I swear I checked NetBSD's online man pages, but now | I see it isn't there. Great, thanks. | > For corba [the last patch], same as [1]: | | Will handle same as [1] Thank you! christos
participants (2)
-
christos@zoulas.com
-
Kurt Miller