This error is still in there as of 3.3.3 and appears under Solaris 9 as well. I'm not sure why HAVE_NETDB_H isn't being properly set; however, 6 hours into a compile is not a good time to crash out - the little stuffed dust puppy I had in my hand at the time almost didn't survive... Stu > As Dan points out, grep didn't show the whole > story. I still don't understand the code well > enough to explain it, but I did get gcc to build > by just inserting the > #define MAXHOSTNAMELEN 256 > line in the natInetAddress.cc file. Thanks for > your consideration, > > Bec > > Dan Kegel wrote: >> >> Becky Sander wrote: >> > I'm having problems building gcc3.3.1 on solaris 2.7. ... >> > ../../../gcc-3.3.1/libjava/java/net/natInetAddress.cc:338:error: `MAXHOSTNAMELEN' undeclared (first use this function) >> > ... >> > # grep MAXHOST /usr/include/netdb.h >> > #define MAXHOSTNAMELEN 256 >> > >> > I've added /usr/include with CPPFLAGS environment >> > variable, but the build still crashes here. And, >> > I can't seem to locate where buffer is defined, >> > either. I'm completely stuck. Any suggestions are >> > greatly appreciated! >> >> Grep doesn't tell the whole story. Look at the previous ten lines: >> >> #if !defined(_XPG4_2) || defined(__EXTENSIONS__) >> #define NO_ADDRESS NO_DATA /* no address, look for MX record */ >> >> /* BIND */ >> #define NETDB_INTERNAL -1 /* see errno */ >> #define NETDB_SUCCESS 0 /* no problem */ >> /* End BIND */ >> >> #define MAXHOSTNAMELEN 256 >> >> Maybe gcc doesn't define __EXTENSIONS__. You could try setting >> CXXFLAGS="-g -O2 -D__EXTENSIONS__" when running gcc's configure; >> not sure if that's how to jam that define in there, but it sounds >> good to me. >> - Dan >> >> -- >> Dan Kegel >> http://www.kegel.com >> http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045 > > -- > Becky Sander CSU Special Projects > rknigh@xxxxxxxxxx 505.844.1164