This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: libjava build failure on branch for sparc-sun-solaris2.7


Joe Buck wrote:
> Undefined                       first referenced
>  symbol                             in file
> java::net::PlainSocketImpl::bind(java::net::InetAddress*, int)./.libs/libgcj.so

I saw this too.  It turns out that Solaris <sys/socket.h> does:

#define bind __xnet_bind

however only when _XOPEN_SOURCE is defined.  That changed with this
patch:

2001-05-15  Mark Mitchell  <mark@codesourcery.com>
        * config/sparc/sol2.h (CPLUSPLUS_CPP_SPEC): Define.

I tried undef'ing bind etc. in my libjava tree.  Although that worked
for my build, it feels like a dirty hack to me.

What's the right way to keep the preprocessor from interfering with java
names?

Jeff


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