- (djm) Seperate tests for int64_t and u_int64_t types

This commit is contained in:
Damien Miller 2000-09-23 14:12:24 +11:00
parent 9600233f0f
commit 578783e6bf
5 changed files with 53 additions and 20 deletions

View File

@ -2,6 +2,7 @@
- (djm) Fix address logging in utmp from Kevin Steves
<stevesk@sweden.hp.com>
- (djm) Redhat spec and manpage fixes from Pekka Savola <pekkas@netcore.fi>
- (djm) Seperate tests for int64_t and u_int64_t types
20000920
- (djm) Fix bad path substitution. Report from Andrew Miner

View File

@ -207,6 +207,8 @@
#undef HAVE_INTXX_T
#undef HAVE_U_INTXX_T
#undef HAVE_UINTXX_T
#undef HAVE_INT64_T
#undef HAVE_U_INT64_T
#undef HAVE_SOCKLEN_T
#undef HAVE_SIZE_T
#undef HAVE_SSIZE_T

View File

@ -487,6 +487,19 @@ if test "x$ac_cv_have_intxx_t" = "xyes" ; then
have_intxx_t=1
fi
AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
AC_TRY_COMPILE(
[ #include <sys/types.h> ],
[ int64_t a; a = 1;],
[ ac_cv_have_int64_t="yes" ],
[ ac_cv_have_int64_t="no" ]
)
])
if test "x$ac_cv_have_int64_t" = "xyes" ; then
AC_DEFINE(HAVE_INT64_T)
have_int64_t=1
fi
AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
AC_TRY_COMPILE(
[ #include <sys/types.h> ],
@ -500,6 +513,19 @@ if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
have_u_intxx_t=1
fi
AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
AC_TRY_COMPILE(
[ #include <sys/types.h> ],
[ u_int64_t a; a = 1;],
[ ac_cv_have_u_int64_t="yes" ],
[ ac_cv_have_u_int64_t="no" ]
)
])
if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
AC_DEFINE(HAVE_U_INT64_T)
have_u_int64_t=1
fi
if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
test "x$ac_cv_header_sys_bitypes_h" = "xyes")
then

View File

@ -123,16 +123,6 @@ typedef int int32_t;
# else
# error "32 bit int type not found."
# endif
# if (SIZEOF_LONG_INT == 8)
typedef long int int64_t;
# else
# if (SIZEOF_LONG_LONG_INT == 8)
typedef long long int int64_t;
# define HAVE_INTXX_T 1
# else
# error "64 bit int type not found."
# endif
# endif
#endif
/* If sys/types.h does not supply u_intXX_t, supply them ourselves */
@ -141,7 +131,6 @@ typedef long long int int64_t;
typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t;
typedef uint64_t u_int64_t;
# define HAVE_U_INTXX_T 1
# else
# if (SIZEOF_CHAR == 1)
@ -159,15 +148,31 @@ typedef unsigned int u_int32_t;
# else
# error "32 bit int type not found."
# endif
# if (SIZEOF_LONG_INT == 8)
typedef unsigned long int u_int64_t;
# endif
#endif
/* 64-bit types */
#ifndef HAVE_INT64_T
# if (SIZEOF_LONG_INT == 8)
typedef long int int64_t;
# else
# if (SIZEOF_LONG_LONG_INT == 8)
typedef long long int int64_t;
# define HAVE_INTXX_T 1
# else
# if (SIZEOF_LONG_LONG_INT == 8)
# error "64 bit int type not found."
# endif
# endif
#endif
#ifndef HAVE_U_INT64_T
# if (SIZEOF_LONG_INT == 8)
typedef unsigned long int u_int64_t;
# else
# if (SIZEOF_LONG_LONG_INT == 8)
typedef unsigned long long int u_int64_t;
# define HAVE_U_INTXX_T 1
# else
# error "64 bit int type not found."
# endif
# define HAVE_U_INTXX_T 1
# else
# error "64 bit int type not found."
# endif
# endif
#endif

View File

@ -161,7 +161,7 @@
#include "xmalloc.h"
#include "loginrec.h"
RCSID("$Id: loginrec.c,v 1.24 2000/09/23 02:57:27 djm Exp $");
RCSID("$Id: loginrec.c,v 1.25 2000/09/23 03:12:25 djm Exp $");
/**
** prototypes for helper functions in this file
@ -681,7 +681,6 @@ construct_utmpx(struct logininfo *li, struct utmpx *utx)
/* this is just a 32-bit IP address */
if (li->hostaddr.sa.sa_family == AF_INET)
utx->ut_addr = li->hostaddr.sa_in.sin_addr.s_addr;
# endif
# endif
# ifdef HAVE_SYSLEN_IN_UTMPX
/* ut_syslen is the length of the utx_host string */