Kerberos 1.3.1 on HPUX ? - fix

Jin Zhou jinz at gene.com
Fri Sep 5 20:26:33 EDT 2003


OK, here are tricks for building Kerberos 1.3.1 on HPUX 11.0

1) To solve the problem with dispatch.c, I need to change inet_ntop() a
little.
macro inet_ntop() is defined in ./include/port-sockets.h as:
#define inet_ntop(AF,SRC,DST,CNT)
\
    ((AF) == AF_INET
\
     ? ((CNT) < 16
\
        ? (SOCKET_SET_ERRNO(ENOSPC), (char *) NULL)
\
        : (sprintf((DST), "%d.%d.%d.%d",
\
                   ((const unsigned char *)(const void *)(SRC))[0] & 0xff,
\
                   ((const unsigned char *)(const void *)(SRC))[1] & 0xff,
\
                   ((const unsigned char *)(const void *)(SRC))[2] & 0xff,
\
                   ((const unsigned char *)(const void *)(SRC))[3] & 0xff),
\
           (DST)))
\
     : (SOCKET_SET_ERRNO(EAFNOSUPPORT), (char *) NULL))

Add "(char *)" to the front of both "NULL", otherwise HP C will complain and
exit.

2) Krb5-131's configure could not detect the presence of HPUX version
   of utimes(), because HPUX utimes() defines as
   int utimes(const char *path, const struct timeval times[2])

   Note the "const" keyword, which conflict with MIT version of utimes(), so
I need to
   add "const" to MIT version.

   Or I guess we can fix configure, so it will detect that HPUX11 has
utimes().

3) There is a conflict between
   void kerberos5_printsub (unsigned char *, int, unsigned char *, int);
   which is defined in src/appl/telnet/libtelnet/kerberos5.c

   and the declaration in  auth-proto.h, which has
   void kerberos5_printsub (unsigned char *, int, unsigned char *, unsigned
int);

   Note that last argument in should be "int", instead of "unsigned int".


Then you should be able to compile on HPUX 11.0. I have not tried 10.20 and
11i yet.
But the binary on HPUX11 should be working on 11i.


Jin
-----------------------------------------------------------------------------------------------------------------------

Jin Zhou wrote:

> Hi,
>
> Has anybody successfully compiled/built Kerberos 1.3.1 on HPUX (11, 11i,
> 10.20) ?
>
> The HP ANSI C compiler (to be accurate, the cpp.ansi pre-processor) on
> my system dies with signal 11 when it tries to process aestab.c, and
> there is no other error message.
>
> In addition, HPUX doesn't have "inet_ntop()", and the MIT version of
> "inet_ntop" macro is causing error due to the incompatible data types.
> The error message is:
>
> cc: "dispatch.c", line 58: error 1647: Illegal integer-pointer
> combination for second and third operands of conditional expression
> (?:).
>
> I'm wondering whether I can re-implement a C version of inet_ntop() to
> replace the macro one?
>
> If somebody has already built krb5 1.3.1 on any of HPUX, can you do a
> "swlist -l product" and let me know what version of HP ANSI C compiler
> you have on your HPUX system?
>
> I wonder whether GNU C could build krb5 1.3.1 without problem....
>
> Thanks
>
> Jin
>
> ________________________________________________
> Kerberos mailing list           Kerberos at mit.edu
> https://mailman.mit.edu/mailman/listinfo/kerberos


More information about the Kerberos mailing list