Call for testing for 3.5 OpenSSH
Michael Tokarev
mjt at tls.msk.ru
Wed Sep 25 05:09:08 EST 2002
Ben Lindstrom wrote:
[]
>>*** 101,111 ****
>>--- 101,119 ----
>> if (h == NULL) {
>> debug("Installing crc compensation attack detector.");
>> n = l;
>>+ #if defined(_CRAY) && !defined(_CRAYSV2)
>>+ h = (u_int16_t *) xmalloc(n * sizeof(u_int16_t));
>>+ #else
>> h = (u_int16_t *) xmalloc(n * HASH_ENTRYSIZE);
>>+ #endif /* _CRAY */
>> } else {
>> if (l > n) {
>> n = l;
>>+ #if defined(_CRAY) && !defined(_CRAYSV2)
>>+ h = (u_int16_t *) xrealloc(h, n * sizeof(u_int16_t));
>>+ #else
>> h = (u_int16_t *) xrealloc(h, n * HASH_ENTRYSIZE);
>>+ #endif /* _CRAY */
etc etc. I think this way will be *much* simpler:
#if defined(_CRAY) && ! defined(_CRAYSV2)
#include <ia.h>
#define HASH_ENTRYSIZE sizeof(u_int16_t)
#define HASH_UNUSEDCHAR (HASH_UNUSED>>8)
#endif /* _CRAY */
and just forgot about this whole hunk?
Also, instead of repeating "#if defined(_CRAY) && ! defined(_CRAYSV2)",
will it be better to use something like
#if defined(_CRAY) && ! defined(_CRAYSV2)
# define _CRAY_IA
#endif
and use #if _CRAY_IA (or whatether) in the rest of places?
/mjt
More information about the openssh-unix-dev
mailing list