summaryrefslogtreecommitdiff
path: root/bufaux.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2003-09-01 18:52:37 +0000
committerColin Watson <cjwatson@debian.org>2003-09-01 18:52:37 +0000
commit854156dd39acbde9b4a47ec0fc54a042ea7358e0 (patch)
tree96755f8590acc2146f4b4ef5b5cdba600e5d9353 /bufaux.c
parentfad82e8999e790899083f9e22a1841148d746df6 (diff)
parent053db7da5ce09acdf742789d9d1a05e81d4861d0 (diff)
Import OpenSSH 3.6.1p2.
Diffstat (limited to 'bufaux.c')
-rw-r--r--bufaux.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bufaux.c b/bufaux.c
index 16cd2d01c..3c276b810 100644
--- a/bufaux.c
+++ b/bufaux.c
@@ -119,7 +119,7 @@ buffer_put_bignum2(Buffer *buffer, BIGNUM *value)
119 /**XXX should be two's-complement */ 119 /**XXX should be two's-complement */
120 int i, carry; 120 int i, carry;
121 u_char *uc = buf; 121 u_char *uc = buf;
122 logit("negativ!"); 122 log("negativ!");
123 for (i = bytes-1, carry = 1; i>=0; i--) { 123 for (i = bytes-1, carry = 1; i>=0; i--) {
124 uc[i] ^= 0xff; 124 uc[i] ^= 0xff;
125 if (carry) 125 if (carry)
@@ -165,6 +165,7 @@ buffer_get_int(Buffer *buffer)
165 return GET_32BIT(buf); 165 return GET_32BIT(buf);
166} 166}
167 167
168#ifdef HAVE_U_INT64_T
168u_int64_t 169u_int64_t
169buffer_get_int64(Buffer *buffer) 170buffer_get_int64(Buffer *buffer)
170{ 171{
@@ -173,6 +174,7 @@ buffer_get_int64(Buffer *buffer)
173 buffer_get(buffer, (char *) buf, 8); 174 buffer_get(buffer, (char *) buf, 8);
174 return GET_64BIT(buf); 175 return GET_64BIT(buf);
175} 176}
177#endif
176 178
177/* 179/*
178 * Stores integers in the buffer, msb first. 180 * Stores integers in the buffer, msb first.
@@ -195,6 +197,7 @@ buffer_put_int(Buffer *buffer, u_int value)
195 buffer_append(buffer, buf, 4); 197 buffer_append(buffer, buf, 4);
196} 198}
197 199
200#ifdef HAVE_U_INT64_T
198void 201void
199buffer_put_int64(Buffer *buffer, u_int64_t value) 202buffer_put_int64(Buffer *buffer, u_int64_t value)
200{ 203{
@@ -203,6 +206,7 @@ buffer_put_int64(Buffer *buffer, u_int64_t value)
203 PUT_64BIT(buf, value); 206 PUT_64BIT(buf, value);
204 buffer_append(buffer, buf, 8); 207 buffer_append(buffer, buf, 8);
205} 208}
209#endif
206 210
207/* 211/*
208 * Returns an arbitrary binary string from the buffer. The string cannot 212 * Returns an arbitrary binary string from the buffer. The string cannot