Quoting Gabriele Bartolini ([EMAIL PROTECTED]):
>
> >The problem with compiling htnet?Connection.cc is the result of
> >build/include/htconfig.h containing:
> >
> >#define GETPEERNAME_LENGTH_T int
> >
> >instead of
> >
> >#define GETPEERNAME_LENGTH_T size_t
> >
> >
>
> Ciao Michael, I am sure that Loc probably overrated my knowledge. As I can
> see, the problem resides in the configure.in file. I think that, by looking
> at your sys/types.h, that if no __cplusplus directive is set, the 3rd
> element of getpeername is an int. That's what makes it not work ... I think.
>
> I tried to change the configure.in by substituting the AC_LANG_C with
> AC_LANG_CPLUSPLUS. Hope it works !!!
>
> Ciao
> -Gabriele
>
>
Your change to AC_TRY_COMPILE in configure.in always fails for EGCS
because ANSI C++ forbids function declarations without a return type.
The relevant configure.in fragment should be similar to the following.
---- from configure.in ----
AC_LANG_CPLUSPLUS
AC_MSG_CHECKING(how to call getpeername?)
for sock_t in 'struct sockaddr' 'void'; do
for getpeername_length_t in 'size_t' 'int' 'unsigned int' 'long unsigned int'
'socklen_t'; do
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>
extern "C" int getpeername(int, $sock_t *, $getpeername_length_t *);],
[$sock_t s; $getpeername_length_t l; getpeername(0,&s,&l);],
[ac_found=yes ; break 2],ac_found=no)
done
done
if test "$ac_found" = no; then
AC_MSG_WARN([can't determine argument type using int])
AC_DEFINE_UNQUOTED(GETPEERNAME_LENGTH_T, int)
else
AC_MSG_RESULT($getpeername_length_t)
AC_DEFINE_UNQUOTED(GETPEERNAME_LENGTH_T, $getpeername_length_t)
fi
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.