diff --git a/ChangeLog b/ChangeLog index c5f954d79..6c364e08f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ - markus@cvs.openbsd.org 2001/01/23 10:45:10 [ssh.h] nuke comment + - (bal) no 64bit support patch from Tim Rice 20010123 - (bal) regexp.h typo in configure.in. Should have been regex.h diff --git a/bufaux.c b/bufaux.c index 8970ba137..b17256db6 100644 --- a/bufaux.c +++ b/bufaux.c @@ -152,6 +152,7 @@ buffer_get_int(Buffer *buffer) return GET_32BIT(buf); } +#ifdef HAVE_U_INT64_T u_int64_t buffer_get_int64(Buffer *buffer) { @@ -159,6 +160,7 @@ buffer_get_int64(Buffer *buffer) buffer_get(buffer, (char *) buf, 8); return GET_64BIT(buf); } +#endif /* * Stores an integer in the buffer in 4 bytes, msb first. @@ -171,6 +173,7 @@ buffer_put_int(Buffer *buffer, u_int value) buffer_append(buffer, buf, 4); } +#ifdef HAVE_U_INT64_T void buffer_put_int64(Buffer *buffer, u_int64_t value) { @@ -178,6 +181,7 @@ buffer_put_int64(Buffer *buffer, u_int64_t value) PUT_64BIT(buf, value); buffer_append(buffer, buf, 8); } +#endif /* * Returns an arbitrary binary string from the buffer. The string cannot diff --git a/bufaux.h b/bufaux.h index 8902ec2a8..c0182da13 100644 --- a/bufaux.h +++ b/bufaux.h @@ -31,11 +31,15 @@ int buffer_get_bignum2(Buffer *buffer, BIGNUM * value); /* Returns an integer from the buffer (4 bytes, msb first). */ u_int buffer_get_int(Buffer * buffer); +#ifdef HAVE_U_INT64_T u_int64_t buffer_get_int64(Buffer *buffer); +#endif /* Stores an integer in the buffer in 4 bytes, msb first. */ void buffer_put_int(Buffer * buffer, u_int value); +#ifdef HAVE_U_INT64_T void buffer_put_int64(Buffer *buffer, u_int64_t value); +#endif /* Returns a character from the buffer (0 - 255). */ int buffer_get_char(Buffer * buffer); diff --git a/defines.h b/defines.h index 26c532c92..087ad2af0 100644 --- a/defines.h +++ b/defines.h @@ -171,20 +171,22 @@ typedef unsigned int u_int32_t; #ifndef HAVE_INT64_T # if (SIZEOF_LONG_INT == 8) typedef long int int64_t; +# define HAVE_INT64_T 1 # else # if (SIZEOF_LONG_LONG_INT == 8) typedef long long int int64_t; -# define HAVE_INTXX_T 1 +# define HAVE_INT64_T 1 # endif # endif #endif #ifndef HAVE_U_INT64_T # if (SIZEOF_LONG_INT == 8) typedef unsigned long int u_int64_t; +# define HAVE_U_INT64_T 1 # else # if (SIZEOF_LONG_LONG_INT == 8) typedef unsigned long long int u_int64_t; -# define HAVE_U_INTXX_T 1 +# define HAVE_U_INT64_T 1 # endif # endif #endif