- (bal) no 64bit support patch from Tim Rice <tim@multitalents.net>

This commit is contained in:
Ben Lindstrom 2001-01-23 16:26:52 +00:00
parent bda5bdcf8d
commit 16a86be01a
4 changed files with 13 additions and 2 deletions

View File

@ -3,6 +3,7 @@
- markus@cvs.openbsd.org 2001/01/23 10:45:10 - markus@cvs.openbsd.org 2001/01/23 10:45:10
[ssh.h] [ssh.h]
nuke comment nuke comment
- (bal) no 64bit support patch from Tim Rice <tim@multitalents.net>
20010123 20010123
- (bal) regexp.h typo in configure.in. Should have been regex.h - (bal) regexp.h typo in configure.in. Should have been regex.h

View File

@ -152,6 +152,7 @@ buffer_get_int(Buffer *buffer)
return GET_32BIT(buf); return GET_32BIT(buf);
} }
#ifdef HAVE_U_INT64_T
u_int64_t u_int64_t
buffer_get_int64(Buffer *buffer) buffer_get_int64(Buffer *buffer)
{ {
@ -159,6 +160,7 @@ buffer_get_int64(Buffer *buffer)
buffer_get(buffer, (char *) buf, 8); buffer_get(buffer, (char *) buf, 8);
return GET_64BIT(buf); return GET_64BIT(buf);
} }
#endif
/* /*
* Stores an integer in the buffer in 4 bytes, msb first. * 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); buffer_append(buffer, buf, 4);
} }
#ifdef HAVE_U_INT64_T
void void
buffer_put_int64(Buffer *buffer, u_int64_t value) 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); PUT_64BIT(buf, value);
buffer_append(buffer, buf, 8); buffer_append(buffer, buf, 8);
} }
#endif
/* /*
* Returns an arbitrary binary string from the buffer. The string cannot * Returns an arbitrary binary string from the buffer. The string cannot

View File

@ -31,11 +31,15 @@ int buffer_get_bignum2(Buffer *buffer, BIGNUM * value);
/* Returns an integer from the buffer (4 bytes, msb first). */ /* Returns an integer from the buffer (4 bytes, msb first). */
u_int buffer_get_int(Buffer * buffer); u_int buffer_get_int(Buffer * buffer);
#ifdef HAVE_U_INT64_T
u_int64_t buffer_get_int64(Buffer *buffer); u_int64_t buffer_get_int64(Buffer *buffer);
#endif
/* Stores an integer in the buffer in 4 bytes, msb first. */ /* Stores an integer in the buffer in 4 bytes, msb first. */
void buffer_put_int(Buffer * buffer, u_int value); void buffer_put_int(Buffer * buffer, u_int value);
#ifdef HAVE_U_INT64_T
void buffer_put_int64(Buffer *buffer, u_int64_t value); void buffer_put_int64(Buffer *buffer, u_int64_t value);
#endif
/* Returns a character from the buffer (0 - 255). */ /* Returns a character from the buffer (0 - 255). */
int buffer_get_char(Buffer * buffer); int buffer_get_char(Buffer * buffer);

View File

@ -171,20 +171,22 @@ typedef unsigned int u_int32_t;
#ifndef HAVE_INT64_T #ifndef HAVE_INT64_T
# if (SIZEOF_LONG_INT == 8) # if (SIZEOF_LONG_INT == 8)
typedef long int int64_t; typedef long int int64_t;
# define HAVE_INT64_T 1
# else # else
# if (SIZEOF_LONG_LONG_INT == 8) # if (SIZEOF_LONG_LONG_INT == 8)
typedef long long int int64_t; typedef long long int int64_t;
# define HAVE_INTXX_T 1 # define HAVE_INT64_T 1
# endif # endif
# endif # endif
#endif #endif
#ifndef HAVE_U_INT64_T #ifndef HAVE_U_INT64_T
# if (SIZEOF_LONG_INT == 8) # if (SIZEOF_LONG_INT == 8)
typedef unsigned long int u_int64_t; typedef unsigned long int u_int64_t;
# define HAVE_U_INT64_T 1
# else # else
# if (SIZEOF_LONG_LONG_INT == 8) # if (SIZEOF_LONG_LONG_INT == 8)
typedef unsigned long long int u_int64_t; typedef unsigned long long int u_int64_t;
# define HAVE_U_INTXX_T 1 # define HAVE_U_INT64_T 1
# endif # endif
# endif # endif
#endif #endif