[36079] in Kerberos

home help back first fref pref prev next nref lref last post

Re: TCP support for MIT Kerberos in HP-UX IA64

daemon@ATHENA.MIT.EDU (Greg Hudson)
Sun Apr 27 11:47:29 2014

Message-ID: <535D2681.3090501@mit.edu>
Date: Sun, 27 Apr 2014 11:47:13 -0400
From: Greg Hudson <ghudson@mit.edu>
MIME-Version: 1.0
To: Vipul Mehta <vipulmehta.1989@gmail.com>
In-Reply-To: <CAMeQEL9gJiR+i8c15JqXdmOgFw20QBktRjqcyBhEotX0zF2sPw@mail.gmail.com>
Cc: kerberos@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu

On 04/26/2014 02:59 PM, Vipul Mehta wrote:
> As everything is working fine with the change, can someone please commit this change to the repository for get_so_error() in sendto_kdc.c
> 
> #if defined(__hpux)
>  int sockerrlen;
> #else
>  socklen_t sockerrlen;
> #endof

I don't think we'd want to make that change exactly.  For one thing, it
seems likely that there are HPUX compilation environments for which
using socklen_t would work and using int would break.

Ideally, we want an autoconf test which determines whether the final
argument of getsockopt should be int * or socklen_t * under the compiler
and CFLAGS specified by the user.  From that test we would define a type
in include/port-sockets.h, and use that type when calling getsockopt.

I'm not immediately sure how to write the autoconf test, though.  My
hope is that passing socklen_t * as the final getsockopt argument
generates a warning on HPUX (perhaps you can verify this), and we can
use that to distinguish.  But AC_COMPILE_IFELSE doesn't appear to fail
on warnings, so I'm not sure what the best autoconf idiom is to look for
warnings.

I did find
http://lists.gnu.org/archive/html/autoconf/2007-05/msg00079.html
which works by triyng to to redefine prototypes for accept and connect
to determine whether a system is using socklen_t.  But it's pretty
complicated and the author wasn't completely confident in its
correctness at the time.
________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

home help back first fref pref prev next nref lref last post