gcc-3.3.1 build problem MAXHOSTNAMELEN undeclared
Dan Kegel
dank@kegel.com
Fri Oct 10 08:11:00 GMT 2003
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.
BTW a very OT thanks to Sandia for fabricating the rad-hard NS32C016
CPUs used in the Mars Observer Camera. Ran at all of 10MHz, but that's
all we needed... http://ida.wr.usgs.gov/corrections/mocinst.cat
- Dan
--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045
More information about the Gcc
mailing list