public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/30109] New: InetAddress.getHostName() does not resolve host names
@ 2006-12-07 13:33 renaud dot saintgratien at orange-ftgroup dot com
2006-12-07 13:34 ` [Bug libgcj/30109] " renaud dot saintgratien at orange-ftgroup dot com
0 siblings, 1 reply; 2+ messages in thread
From: renaud dot saintgratien at orange-ftgroup dot com @ 2006-12-07 13:33 UTC (permalink / raw)
To: gcc-bugs
InetAddress.getHostName() does not resolve host names, which differs from the
Sun's JDK behaviour. Consider the following test case:
import java.net.InetAddress;
public class Test {
public static void main(String[] argv) throws Exception {
String resolved = InetAddress.getByName("127.0.0.1").getHostName();
System.out.println("127.0.0.1 hostname: expected=localhost, actual=" +
resolved);
}
}
With Sun's JDK:
$ java -version
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)
$ javac Test.java
$ java -cp . Test
127.0.0.1 hostname: expected=localhost, actual=localhost
With GCJ 4.2 (snapshot of 20061128):
$ gcj -v
Using built-in specs.
Reading specs from
/opt/gcc-4.2/lib/gcc/sparc-sun-solaris2.8/4.2.0/../../../libgcj.spec
rename spec startfile to startfileorig
rename spec lib to liborig
Target: sparc-sun-solaris2.8
Configured with: ../gcc-4.2-20061128/configure --prefix=/opt/gcc-4.2
--disable-nls
Thread model: posix
gcc version 4.2.0 20061128 (prerelease)
$ gcj -L/opt/gcc-4.2/lib -lstdc++ -L/usr/local/lib -o Test --main=Test
Test.class
$ ./Test
127.0.0.1 hostname: expected=localhost, actual=127.0.0.1
Same results with gcj 4.0.2.
--
Summary: InetAddress.getHostName() does not resolve host names
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: renaud dot saintgratien at orange-ftgroup dot com
GCC host triplet: sparc-sun-solaris2.8
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30109
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libgcj/30109] InetAddress.getHostName() does not resolve host names
2006-12-07 13:33 [Bug libgcj/30109] New: InetAddress.getHostName() does not resolve host names renaud dot saintgratien at orange-ftgroup dot com
@ 2006-12-07 13:34 ` renaud dot saintgratien at orange-ftgroup dot com
0 siblings, 0 replies; 2+ messages in thread
From: renaud dot saintgratien at orange-ftgroup dot com @ 2006-12-07 13:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from renaud dot saintgratien at orange-ftgroup dot com 2006-12-07 13:34 -------
Created an attachment (id=12765)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12765&action=view)
Test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30109
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-12-07 13:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-07 13:33 [Bug libgcj/30109] New: InetAddress.getHostName() does not resolve host names renaud dot saintgratien at orange-ftgroup dot com
2006-12-07 13:34 ` [Bug libgcj/30109] " renaud dot saintgratien at orange-ftgroup dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).