diff options
author | Andrew Haley <aph@redhat.com> | 2009-10-22 16:51:18 +0000 |
---|---|---|
committer | Andrew Haley <aph@redhat.com> | 2009-10-22 16:51:18 +0000 |
commit | d13376fc5a0bb0a2ee0246e76ee3319e6baf9516 (patch) | |
tree | 04e140c03b4123587b0ed0e0423480d57faf88ed | |
parent | cca242d46d9679fe82e8457544ff2dda5c04121d (diff) | |
download | classpath-d13376fc5a0bb0a2ee0246e76ee3319e6baf9516.tar.gz |
2009-10-22 Andrew Haley <aph@redhat.com>
* native/jni/native-lib/cpnet.c (cpnet_addMembership): Fix
aliasing warning.
(cpnet_dropMembership): Likewise.
2009-10-21 Richard Guenther <rguenther@suse.de>
PR cp-tools/39177
* tools/gnu/classpath/tools/jar/Creator.java (writeCommandLineEntries):
Do not use uninitialized manifest.
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | native/jni/native-lib/cpnet.c | 6 | ||||
-rw-r--r-- | tools/gnu/classpath/tools/jar/Creator.java | 11 |
3 files changed, 23 insertions, 6 deletions
@@ -1,3 +1,15 @@ +2009-10-22 Andrew Haley <aph@redhat.com> + + * native/jni/native-lib/cpnet.c (cpnet_addMembership): Fix + aliasing warning. + (cpnet_dropMembership): Likewise. + +2009-10-21 Richard Guenther <rguenther@suse.de> + + PR cp-tools/39177 + * tools/gnu/classpath/tools/jar/Creator.java (writeCommandLineEntries): + Do not use uninitialized manifest. + 2009-08-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * doc/cp-hacking.texinfo (Needed Tools and Libraries): Bump diff --git a/native/jni/native-lib/cpnet.c b/native/jni/native-lib/cpnet.c index 044498113..154a7dd7d 100644 --- a/native/jni/native-lib/cpnet.c +++ b/native/jni/native-lib/cpnet.c @@ -578,9 +578,10 @@ jint cpnet_addMembership (JNIEnv *env UNUSED, jint fd, cpnet_address *addr) { struct ip_mreq req; int ret; + struct sockaddr_in *sockaddr = (struct sockaddr_in *)addr->data; memset(&req, 0, sizeof(req)); - req.imr_multiaddr = ((struct sockaddr_in *)addr->data)->sin_addr; + req.imr_multiaddr = sockaddr->sin_addr; req.imr_interface.s_addr = INADDR_ANY; ret = setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &req, sizeof(req)); if (ret != 0) @@ -593,9 +594,10 @@ jint cpnet_dropMembership (JNIEnv *env UNUSED, jint fd, cpnet_address *addr) { struct ip_mreq req; int ret; + struct sockaddr_in *sockaddr = (struct sockaddr_in *)addr->data; memset(&req, 0, sizeof(req)); - req.imr_multiaddr = ((struct sockaddr_in *)addr->data)->sin_addr; + req.imr_multiaddr = sockaddr->sin_addr; req.imr_interface.s_addr = INADDR_ANY; ret = setsockopt(fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, &req, sizeof(req)); if (ret != 0) diff --git a/tools/gnu/classpath/tools/jar/Creator.java b/tools/gnu/classpath/tools/jar/Creator.java index a6b6112ca..6ffce18ac 100644 --- a/tools/gnu/classpath/tools/jar/Creator.java +++ b/tools/gnu/classpath/tools/jar/Creator.java @@ -216,11 +216,14 @@ public class Creator manifest = createManifest(parameters); /* If no version is specified, provide the same manifest version default * as Sun's jar tool */ - Attributes attr = manifest.getMainAttributes(); - if (attr.getValue(Attributes.Name.MANIFEST_VERSION) == null) - attr.putValue(Attributes.Name.MANIFEST_VERSION.toString(), "1.0"); - attr.putValue("Created-By", System.getProperty("java.version") + + if (parameters.wantManifest) + { + Attributes attr = manifest.getMainAttributes(); + if (attr.getValue(Attributes.Name.MANIFEST_VERSION) == null) + attr.putValue(Attributes.Name.MANIFEST_VERSION.toString(), "1.0"); + attr.putValue("Created-By", System.getProperty("java.version") + " (" + System.getProperty("java.vendor") + ")"); + } outputStream = new JarOutputStream(os, manifest); // FIXME: this sets the method too late for the manifest file. outputStream.setMethod(parameters.storageMode); |