public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "rainer@emrich-ebersheim.de" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug libgcj/48709] New: java/net/natVMInetAddress.cc:42:52: error: declaration of C function 'int gethostname(char*, int)' conflicts
Date: Thu, 21 Apr 2011 12:47:00 -0000	[thread overview]
Message-ID: <bug-48709-8172@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48709

           Summary: java/net/natVMInetAddress.cc:42:52: error: declaration
                    of C function 'int gethostname(char*, int)' conflicts
           Product: gcc
           Version: 4.5.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcj
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rainer@emrich-ebersheim.de


Building cross x86_64-unknown-linux-gnu to i686-pc-cygwin:

libtool: compile:  /SCRATCH/tmp.uPE4kUseBu/gcc-4.5.3/gcc-4.5.3/./gcc/xgcc
-shared-libgcc -B/SCRATCH/tmp.uPE4kUseBu/gcc-4.5.3/gcc-4.5.3/./gcc -nostdinc++
-L/SCRATCH/tmp.uPE4kUseBu/gcc-4.5.3/gcc-4.5.3/i686-pc-cygwin/libstdc++-v3/src
-L/SCRATCH/tmp.uPE4kUseBu/gcc-4.5.3/gcc-4.5.3/i686-pc-cygwin/libstdc++-v3/src/.libs
-B/opt/devel/gnu/cross-gcc/Linux/x86_64-unknown-linux-gnu/openSUSE_11.3/cross/CYGWIN_NT-5.1/i686-pc-cygwin/cygwin-1.7.9-1/gcc-4.5.3/i686-pc-cygwin/bin/
-B/opt/devel/gnu/cross-gcc/Linux/x86_64-unknown-linux-gnu/openSUSE_11.3/cross/CYGWIN_NT-5.1/i686-pc-cygwin/cygwin-1.7.9-1/gcc-4.5.3/i686-pc-cygwin/lib/
-isystem
/opt/devel/gnu/cross-gcc/Linux/x86_64-unknown-linux-gnu/openSUSE_11.3/cross/CYGWIN_NT-5.1/i686-pc-cygwin/cygwin-1.7.9-1/gcc-4.5.3/i686-pc-cygwin/include
-isystem
/opt/devel/gnu/cross-gcc/Linux/x86_64-unknown-linux-gnu/openSUSE_11.3/cross/CYGWIN_NT-5.1/i686-pc-cygwin/cygwin-1.7.9-1/gcc-4.5.3/i686-pc-cygwin/sys-include
-DHAVE_CONFIG_H -I. -I/opt/devel/gnu/src/gcc-cygwin/gcc-4.5.3/libjava
-I./include -I./gcj -I/opt/devel/gnu/src/gcc-cygwin/gcc-4.5.3/libjava -Iinclude
-I/opt/devel/gnu/src/gcc-cygwin/gcc-4.5.3/libjava/include
-I/opt/devel/gnu/src/gcc-cygwin/gcc-4.5.3/libjava/classpath/include
-Iclasspath/include
-I/opt/devel/gnu/src/gcc-cygwin/gcc-4.5.3/libjava/classpath/native/fdlibm
-I/opt/devel/gnu/src/gcc-cygwin/gcc-4.5.3/libjava/../boehm-gc/include
-I../boehm-gc/include
-I/opt/devel/gnu/src/gcc-cygwin/gcc-4.5.3/libjava/.././libjava/../gcc
-I/opt/devel/gnu/src/gcc-cygwin/gcc-4.5.3/libjava/../zlib
-I/opt/devel/gnu/src/gcc-cygwin/gcc-4.5.3/libjava/../libffi/include
-I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers
-Wswitch-enum -D_FILE_OFFSET_BITS=64 -ffloat-store -fomit-frame-pointer -Usun
-Wextra -Wall -D_GNU_SOURCE
-DPREFIX=\"/opt/devel/gnu/cross-gcc/Linux/x86_64-unknown-linux-gnu/openSUSE_11.3/cross/CYGWIN_NT-5.1/i686-pc-cygwin/cygwin-1.7.9-1/gcc-4.5.3\"
-DTOOLEXECLIBDIR=\"/opt/devel/gnu/cross-gcc/Linux/x86_64-unknown-linux-gnu/openSUSE_11.3/cross/CYGWIN_NT-5.1/i686-pc-cygwin/cygwin-1.7.9-1/gcc-4.5.3/i686-pc-cygwin/lib\"
-DJAVA_HOME=\"/opt/devel/gnu/cross-gcc/Linux/x86_64-unknown-linux-gnu/openSUSE_11.3/cross/CYGWIN_NT-5.1/i686-pc-cygwin/cygwin-1.7.9-1/gcc-4.5.3\"
-DBOOT_CLASS_PATH=\"/opt/devel/gnu/cross-gcc/Linux/x86_64-unknown-linux-gnu/openSUSE_11.3/cross/CYGWIN_NT-5.1/i686-pc-cygwin/cygwin-1.7.9-1/gcc-4.5.3/share/java/libgcj-4.5.3.jar\"
-DJAVA_EXT_DIRS=\"/opt/devel/gnu/cross-gcc/Linux/x86_64-unknown-linux-gnu/openSUSE_11.3/cross/CYGWIN_NT-5.1/i686-pc-cygwin/cygwin-1.7.9-1/gcc-4.5.3/share/java/ext\"
-DGCJ_ENDORSED_DIRS=\"/opt/devel/gnu/cross-gcc/Linux/x86_64-unknown-linux-gnu/openSUSE_11.3/cross/CYGWIN_NT-5.1/i686-pc-cygwin/cygwin-1.7.9-1/gcc-4.5.3/share/java/gcj-endorsed\"
-DGCJ_VERSIONED_LIBDIR=\"/opt/devel/gnu/cross-gcc/Linux/x86_64-unknown-linux-gnu/openSUSE_11.3/cross/CYGWIN_NT-5.1/i686-pc-cygwin/cygwin-1.7.9-1/gcc-4.5.3/lib/gcj-4.5.3-11\"
-DPATH_SEPARATOR=\":\" -DECJ_JAR_FILE=\"\"
-DLIBGCJ_DEFAULT_DATABASE=\"/opt/devel/gnu/cross-gcc/Linux/x86_64-unknown-linux-gnu/openSUSE_11.3/cross/CYGWIN_NT-5.1/i686-pc-cygwin/cygwin-1.7.9-1/gcc-4.5.3/lib/gcj-4.5.3-11/classmap.db\"
-DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL=\"gcj-4.5.3-11/classmap.db\" -g -O2 -MT
java/net/natVMInetAddress.lo -MD -MP -MF java/net/.deps/natVMInetAddress.Tpo -c
java/net/natVMInetAddress.cc  -DDLL_EXPORT -DPIC -o
java/net/.libs/natVMInetAddress.o

java/net/natVMInetAddress.cc:42:52: error: declaration of C function ‘int
gethostname(char*, int)’ conflicts with
/opt/devel/gnu/cross-gcc/Linux/x86_64-unknown-linux-gnu/openSUSE_11.3/cross/CYGWIN_NT-5.1/i686-pc-cygwin/cygwin-1.7.9-1/gcc-4.5.3/i686-pc-cygwin/include/sys/unistd.h:232:6:
error: previous declaration ‘int gethostname(char*, size_t)’ here

It seems somehow related to PR45872.


java/net/natVMInetAddressPosix.cc has:
#ifndef HAVE_GETHOSTNAME_DECL
extern "C" int gethostname (char *name, int namelen);
#endif

But HAVE_GETHOSTNAME_DECL isn't defined.
A grep in the libjava build tree gives:
include/config.h:/* #undef HAVE_GETHOSTNAME_DECL */
java/net/natVMInetAddress.cc:#ifndef HAVE_GETHOSTNAME_DECL

I don't know if it's cause by the fact that cygwin has it's unistd.h in the
include/sys directory, not in include.


                 reply	other threads:[~2011-04-21 12:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-48709-8172@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=java-prs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).