linc-0.1.11 problems building on Solaris 2.6 with Proposed Fixes.




I haven't tried to hack a fix into the autoconf stuff for this yet... But
it looks like the
configure for Solaris 2.6 missed picking up the
"/usr/include/arpa/nameser.h"
thus leaving the MAXDNAME definition in resolve.h undefined.

In the Solaris 2.6 headers we have:
     "/usr/include/resolv.h: char  defdname[MAXDNAME] /* default domain */"
     "/usr/include/arpa/nameser.h:#define MAXDNAME  256 /* maximum domain
name */"

____________________________________________
In "src/linc-protocols.c" Add something like follows...

#include <string.h>
#ifdef   HAVE_MAXDNAME_IN_NAMESER_H
#include <arpa/inet.h>
#include <arpa/nameser.h>
#endif
#include <resolv.h>
#include <netdb.h>
#include <linc/linc-protocol.h>
_____________________________________________
Then in "configure.in" the following can be added (assuming the "*"
pattern matches)...

if test X"$host_os" = "Xsolaris*" ; then
        AC_DEFINE(HAVE_MAXDNAME_IN_NAMESER_H)
fi


__________________
otherwise the AC_DEFINE needs to somehow be added  in one of the case
statements for solaris.
I don't claim to be an autoconf expert...  So, if someone has a better way
of doing this.  Please pipe up.
Maybe there should be a more extensive test... to configure this?


Also I found the following problems after fixing the MAXDNAME problem. (I
just put the arpa/inet.h and arpa/nameser.h includes into the
linc-protocols.c file.)

___________________

I managed to get rid of the following errors by #defining NI_MAXSERV and
NI_MAXHOST to the same values used on Linux in the config.h for linc.  I
couldn't decide on what the proper "existing" definitions were.  Just
wanted to get things working.


linc-protocols.c: In function `linc_protocol_get_sockinfo_ipv46':
linc-protocols.c:476: `NI_MAXSERV' undeclared (first use in this function)
linc-protocols.c:476: (Each undeclared identifier is reported only once
linc-protocols.c:476: for each function it appears in.)
linc-protocols.c:476: warning: unused variable `tmpport'
linc-protocols.c: In function `linc_protocol_get_sockinfo_unix':
linc-protocols.c:599: `NI_MAXHOST' undeclared (first use in this function)
linc-protocols.c:599: warning: unused variable `hname'
linc-protocols.c: In function `linc_protocol_tcp_setup':
linc-protocols.c:708: warning: passing arg 4 of `setsockopt' from incompatible pointer type
make[2]: *** [linc-protocols.lo] Error 1

_______________________


I had the following error when building the latest version of ORBit2:
gcc3.0.2/include/linc-1.0/linc/linc-protocol.h:37: parse error before "socklen_t"

The following define needs to be  put into the appropriate installed header
config.h:#define socklen_t size_t

Note: this was in the linc config.h but somehow didn't make it into the
installed headers. I put the define into the linc/linc-config.h header that
was installed.


-Dave

--
David Haverkamp
dahaverk@rockwellcollins.com
Rockwell Collins
Advanced Technology Center






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]