summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--bufaux.c4
-rw-r--r--bufaux.h4
-rw-r--r--defines.h6
4 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c5f954d79..6c364e08f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
3 - markus@cvs.openbsd.org 2001/01/23 10:45:10 3 - markus@cvs.openbsd.org 2001/01/23 10:45:10
4 [ssh.h] 4 [ssh.h]
5 nuke comment 5 nuke comment
6 - (bal) no 64bit support patch from Tim Rice <tim@multitalents.net>
6 7
720010123 820010123
8 - (bal) regexp.h typo in configure.in. Should have been regex.h 9 - (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)
152 return GET_32BIT(buf); 152 return GET_32BIT(buf);
153} 153}
154 154
155#ifdef HAVE_U_INT64_T
155u_int64_t 156u_int64_t
156buffer_get_int64(Buffer *buffer) 157buffer_get_int64(Buffer *buffer)
157{ 158{
@@ -159,6 +160,7 @@ buffer_get_int64(Buffer *buffer)
159 buffer_get(buffer, (char *) buf, 8); 160 buffer_get(buffer, (char *) buf, 8);
160 return GET_64BIT(buf); 161 return GET_64BIT(buf);
161} 162}
163#endif
162 164
163/* 165/*
164 * Stores an integer in the buffer in 4 bytes, msb first. 166 * Stores an integer in the buffer in 4 bytes, msb first.
@@ -171,6 +173,7 @@ buffer_put_int(Buffer *buffer, u_int value)
171 buffer_append(buffer, buf, 4); 173 buffer_append(buffer, buf, 4);
172} 174}
173 175
176#ifdef HAVE_U_INT64_T
174void 177void
175buffer_put_int64(Buffer *buffer, u_int64_t value) 178buffer_put_int64(Buffer *buffer, u_int64_t value)
176{ 179{
@@ -178,6 +181,7 @@ buffer_put_int64(Buffer *buffer, u_int64_t value)
178 PUT_64BIT(buf, value); 181 PUT_64BIT(buf, value);
179 buffer_append(buffer, buf, 8); 182 buffer_append(buffer, buf, 8);
180} 183}
184#endif
181 185
182/* 186/*
183 * Returns an arbitrary binary string from the buffer. The string cannot 187 * 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);
31 31
32/* Returns an integer from the buffer (4 bytes, msb first). */ 32/* Returns an integer from the buffer (4 bytes, msb first). */
33u_int buffer_get_int(Buffer * buffer); 33u_int buffer_get_int(Buffer * buffer);
34#ifdef HAVE_U_INT64_T
34u_int64_t buffer_get_int64(Buffer *buffer); 35u_int64_t buffer_get_int64(Buffer *buffer);
36#endif
35 37
36/* Stores an integer in the buffer in 4 bytes, msb first. */ 38/* Stores an integer in the buffer in 4 bytes, msb first. */
37void buffer_put_int(Buffer * buffer, u_int value); 39void buffer_put_int(Buffer * buffer, u_int value);
40#ifdef HAVE_U_INT64_T
38void buffer_put_int64(Buffer *buffer, u_int64_t value); 41void buffer_put_int64(Buffer *buffer, u_int64_t value);
42#endif
39 43
40/* Returns a character from the buffer (0 - 255). */ 44/* Returns a character from the buffer (0 - 255). */
41int buffer_get_char(Buffer * buffer); 45int 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;
171#ifndef HAVE_INT64_T 171#ifndef HAVE_INT64_T
172# if (SIZEOF_LONG_INT == 8) 172# if (SIZEOF_LONG_INT == 8)
173typedef long int int64_t; 173typedef long int int64_t;
174# define HAVE_INT64_T 1
174# else 175# else
175# if (SIZEOF_LONG_LONG_INT == 8) 176# if (SIZEOF_LONG_LONG_INT == 8)
176typedef long long int int64_t; 177typedef long long int int64_t;
177# define HAVE_INTXX_T 1 178# define HAVE_INT64_T 1
178# endif 179# endif
179# endif 180# endif
180#endif 181#endif
181#ifndef HAVE_U_INT64_T 182#ifndef HAVE_U_INT64_T
182# if (SIZEOF_LONG_INT == 8) 183# if (SIZEOF_LONG_INT == 8)
183typedef unsigned long int u_int64_t; 184typedef unsigned long int u_int64_t;
185# define HAVE_U_INT64_T 1
184# else 186# else
185# if (SIZEOF_LONG_LONG_INT == 8) 187# if (SIZEOF_LONG_LONG_INT == 8)
186typedef unsigned long long int u_int64_t; 188typedef unsigned long long int u_int64_t;
187# define HAVE_U_INTXX_T 1 189# define HAVE_U_INT64_T 1
188# endif 190# endif
189# endif 191# endif
190#endif 192#endif