summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--acconfig.h2
-rw-r--r--configure.in26
-rw-r--r--defines.h41
-rw-r--r--loginrec.c3
5 files changed, 53 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index ef8407e19..9adb880d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
2 - (djm) Fix address logging in utmp from Kevin Steves 2 - (djm) Fix address logging in utmp from Kevin Steves
3 <stevesk@sweden.hp.com> 3 <stevesk@sweden.hp.com>
4 - (djm) Redhat spec and manpage fixes from Pekka Savola <pekkas@netcore.fi> 4 - (djm) Redhat spec and manpage fixes from Pekka Savola <pekkas@netcore.fi>
5 - (djm) Seperate tests for int64_t and u_int64_t types
5 6
620000920 720000920
7 - (djm) Fix bad path substitution. Report from Andrew Miner 8 - (djm) Fix bad path substitution. Report from Andrew Miner
diff --git a/acconfig.h b/acconfig.h
index e129ef33c..1b860d66d 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -207,6 +207,8 @@
207#undef HAVE_INTXX_T 207#undef HAVE_INTXX_T
208#undef HAVE_U_INTXX_T 208#undef HAVE_U_INTXX_T
209#undef HAVE_UINTXX_T 209#undef HAVE_UINTXX_T
210#undef HAVE_INT64_T
211#undef HAVE_U_INT64_T
210#undef HAVE_SOCKLEN_T 212#undef HAVE_SOCKLEN_T
211#undef HAVE_SIZE_T 213#undef HAVE_SIZE_T
212#undef HAVE_SSIZE_T 214#undef HAVE_SSIZE_T
diff --git a/configure.in b/configure.in
index 774529d30..305d9a493 100644
--- a/configure.in
+++ b/configure.in
@@ -487,6 +487,19 @@ if test "x$ac_cv_have_intxx_t" = "xyes" ; then
487 have_intxx_t=1 487 have_intxx_t=1
488fi 488fi
489 489
490AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
491 AC_TRY_COMPILE(
492 [ #include <sys/types.h> ],
493 [ int64_t a; a = 1;],
494 [ ac_cv_have_int64_t="yes" ],
495 [ ac_cv_have_int64_t="no" ]
496 )
497])
498if test "x$ac_cv_have_int64_t" = "xyes" ; then
499 AC_DEFINE(HAVE_INT64_T)
500 have_int64_t=1
501fi
502
490AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [ 503AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
491 AC_TRY_COMPILE( 504 AC_TRY_COMPILE(
492 [ #include <sys/types.h> ], 505 [ #include <sys/types.h> ],
@@ -500,6 +513,19 @@ if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
500 have_u_intxx_t=1 513 have_u_intxx_t=1
501fi 514fi
502 515
516AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
517 AC_TRY_COMPILE(
518 [ #include <sys/types.h> ],
519 [ u_int64_t a; a = 1;],
520 [ ac_cv_have_u_int64_t="yes" ],
521 [ ac_cv_have_u_int64_t="no" ]
522 )
523])
524if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
525 AC_DEFINE(HAVE_U_INT64_T)
526 have_u_int64_t=1
527fi
528
503if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ 529if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
504 test "x$ac_cv_header_sys_bitypes_h" = "xyes") 530 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
505then 531then
diff --git a/defines.h b/defines.h
index 0ac3e96b2..cf2a34291 100644
--- a/defines.h
+++ b/defines.h
@@ -123,16 +123,6 @@ typedef int int32_t;
123# else 123# else
124# error "32 bit int type not found." 124# error "32 bit int type not found."
125# endif 125# endif
126# if (SIZEOF_LONG_INT == 8)
127typedef long int int64_t;
128# else
129# if (SIZEOF_LONG_LONG_INT == 8)
130typedef long long int int64_t;
131# define HAVE_INTXX_T 1
132# else
133# error "64 bit int type not found."
134# endif
135# endif
136#endif 126#endif
137 127
138/* If sys/types.h does not supply u_intXX_t, supply them ourselves */ 128/* If sys/types.h does not supply u_intXX_t, supply them ourselves */
@@ -141,7 +131,6 @@ typedef long long int int64_t;
141typedef uint8_t u_int8_t; 131typedef uint8_t u_int8_t;
142typedef uint16_t u_int16_t; 132typedef uint16_t u_int16_t;
143typedef uint32_t u_int32_t; 133typedef uint32_t u_int32_t;
144typedef uint64_t u_int64_t;
145# define HAVE_U_INTXX_T 1 134# define HAVE_U_INTXX_T 1
146# else 135# else
147# if (SIZEOF_CHAR == 1) 136# if (SIZEOF_CHAR == 1)
@@ -159,15 +148,31 @@ typedef unsigned int u_int32_t;
159# else 148# else
160# error "32 bit int type not found." 149# error "32 bit int type not found."
161# endif 150# endif
162# if (SIZEOF_LONG_INT == 8) 151# endif
163typedef unsigned long int u_int64_t; 152#endif
153
154/* 64-bit types */
155#ifndef HAVE_INT64_T
156# if (SIZEOF_LONG_INT == 8)
157typedef long int int64_t;
158# else
159# if (SIZEOF_LONG_LONG_INT == 8)
160typedef long long int int64_t;
161# define HAVE_INTXX_T 1
164# else 162# else
165# if (SIZEOF_LONG_LONG_INT == 8) 163# error "64 bit int type not found."
164# endif
165# endif
166#endif
167#ifndef HAVE_U_INT64_T
168# if (SIZEOF_LONG_INT == 8)
169typedef unsigned long int u_int64_t;
170# else
171# if (SIZEOF_LONG_LONG_INT == 8)
166typedef unsigned long long int u_int64_t; 172typedef unsigned long long int u_int64_t;
167# define HAVE_U_INTXX_T 1 173# define HAVE_U_INTXX_T 1
168# else 174# else
169# error "64 bit int type not found." 175# error "64 bit int type not found."
170# endif
171# endif 176# endif
172# endif 177# endif
173#endif 178#endif
diff --git a/loginrec.c b/loginrec.c
index 460f551b2..22c2be1e5 100644
--- a/loginrec.c
+++ b/loginrec.c
@@ -161,7 +161,7 @@
161#include "xmalloc.h" 161#include "xmalloc.h"
162#include "loginrec.h" 162#include "loginrec.h"
163 163
164RCSID("$Id: loginrec.c,v 1.24 2000/09/23 02:57:27 djm Exp $"); 164RCSID("$Id: loginrec.c,v 1.25 2000/09/23 03:12:25 djm Exp $");
165 165
166/** 166/**
167 ** prototypes for helper functions in this file 167 ** prototypes for helper functions in this file
@@ -681,7 +681,6 @@ construct_utmpx(struct logininfo *li, struct utmpx *utx)
681 /* this is just a 32-bit IP address */ 681 /* this is just a 32-bit IP address */
682 if (li->hostaddr.sa.sa_family == AF_INET) 682 if (li->hostaddr.sa.sa_family == AF_INET)
683 utx->ut_addr = li->hostaddr.sa_in.sin_addr.s_addr; 683 utx->ut_addr = li->hostaddr.sa_in.sin_addr.s_addr;
684 # endif
685# endif 684# endif
686# ifdef HAVE_SYSLEN_IN_UTMPX 685# ifdef HAVE_SYSLEN_IN_UTMPX
687 /* ut_syslen is the length of the utx_host string */ 686 /* ut_syslen is the length of the utx_host string */