This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Partial InetAddress merge


Hi all,

Two weeks ago I merged all the good bits of GCJ's InetAddress into
Classpath's, removing some dead code and inconsistent stuff in the
process.  I then updated Classpath's SocketPermission to correctly
check hosts, and updated Classpath's InetAddress to correctly cache
DNS lookups.  This commit merges these changes.

I wanted to get the changes in before the branch, since without these
changes the security manager can provide no meaningful protection for
networking calls.  The reason this is a partial merge is that the full
merge requires Windows-specific changes that I am unable to test, and
the absence of any Windows testers looked to be a showstopper.  This
commit retains all the old native code, and the new "native" methods
are simply Java glue at the moment.

There are some tweaks to Posix-specific code.  These make the Posix
code correct; the corresponding Windows code is therefore wrong, but
no less broken than it was before.

I had to tweak classpath/java/net/Inet[46]Address.java because these
files contain definitions of AF_INET and AF_INET6 which end up in CNI
headers and get trampled by the preprocessor.  This tweak is not
necessary in the full merge as directly accessing these classes (and,
by extension, including their CNI headers) is incorrect.  The Posix
files no longer do this but the Windows ones still do.

This is all ugly and hacky.  I'll shortly be posting a full-merge
patch which I will commit directly after the branch is created.

Cheers,
Gary

Attachment: inetaddress-semimerge.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]