diff options
author | Colin Watson <cjwatson@debian.org> | 2003-09-01 18:52:37 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2003-09-01 18:52:37 +0000 |
commit | 854156dd39acbde9b4a47ec0fc54a042ea7358e0 (patch) | |
tree | 96755f8590acc2146f4b4ef5b5cdba600e5d9353 /bufaux.c | |
parent | fad82e8999e790899083f9e22a1841148d746df6 (diff) | |
parent | 053db7da5ce09acdf742789d9d1a05e81d4861d0 (diff) |
Import OpenSSH 3.6.1p2.
Diffstat (limited to 'bufaux.c')
-rw-r--r-- | bufaux.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 | ||
168 | u_int64_t | 169 | u_int64_t |
169 | buffer_get_int64(Buffer *buffer) | 170 | buffer_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 | ||
198 | void | 201 | void |
199 | buffer_put_int64(Buffer *buffer, u_int64_t value) | 202 | buffer_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 |