1 diff -uNr dip-3.3.7o/command.c dip-3.3.7o-64/command.c
2 --- dip-3.3.7o/command.c Tue May 30 15:42:24 2000
3 +++ dip-3.3.7o-64/command.c Tue May 30 15:44:06 2000
5 static char var_securidfixed[9] = ""; /* fixed part of secureID */
9 +char *stpcpy(char *dest, const char *src);
16 nargv = malloc (argc*sizeof(char*)); /* allocate the array of pointers */
17 if (nargv == NULL) /* Ooops? */
19 - fprintf (stderr, "error: Couldn't allocate %ld bytes for" /* Ooops! */
20 + fprintf (stderr, "error: Couldn't allocate %d bytes for" /* Ooops! */
21 " onexit commands array: `%s'\n",
22 argc*sizeof(char*), strerror (errno) );
25 nargv[cnt] = malloc (strlen(argv[cnt]) + 1); /* allocate */
26 if (nargv[cnt] == NULL) /* Oops? */
28 - fprintf (stderr, "error: Couldn't allocate %ld bytes for argument %d"
29 + fprintf (stderr, "error: Couldn't allocate %d bytes for argument %d"
30 " of the onexit command: `%s'\n",
31 strlen (argv[cnt]), cnt, strerror (errno) );
32 arg_clean (argc, nargv); /* clean */
33 @@ -2227,7 +2231,10 @@
38 +/* This used to be Alpha-specific code, but the assembler code is not very
39 + * portable to new binutils versions. */
44 * The following routines come from linux/arch/alpha/lib/checksum.c and
48 static inline unsigned short
49 -from64to16(unsigned long x)
50 +from64to16(u_int64_t x)
52 /* add up 32-bit words for 33 bits */
53 x = (x & 0xffffffff) + (x >> 32);
54 @@ -2255,15 +2262,15 @@
55 * inner loop could be unrolled a bit further, and there are better
56 * ways to do the carry, but this is reasonable.
58 -static inline unsigned long
59 +static inline u_int64_t
60 do_csum(unsigned char * buff, int len)
63 - unsigned long result = 0;
64 + u_int64_t result = 0;
68 - odd = 1 & (unsigned long) buff;
69 + odd = 1 & (int) buff;
75 count = len >> 1; /* nr of 16-bit words.. */
77 - if (2 & (unsigned long) buff) {
78 + if (2 & (int) buff) {
79 result += *(unsigned short *) buff;
84 count >>= 1; /* nr of 32-bit words.. */
86 - if (4 & (unsigned long) buff) {
87 + if (4 & (int) buff) {
88 result += *(unsigned int *) buff;
93 count >>= 1; /* nr of 64-bit words.. */
95 - unsigned long carry = 0;
96 + u_int64_t carry = 0;
98 - unsigned long w = *(unsigned long *) buff;
99 + u_int64_t w = *(u_int64_t*) buff;
103 @@ -2332,21 +2339,21 @@
104 * computes the checksum of the TCP/UDP pseudo-header
105 * returns a 16-bit checksum, already complemented.
107 -unsigned short int csum_tcpudp_magic(unsigned long saddr,
108 - unsigned long daddr,
109 +unsigned short int csum_tcpudp_magic(u_int64_t saddr,
112 unsigned short proto,
115 return ~from64to16(saddr + daddr + sum +
116 - ((unsigned long) ntohs(len) << 16) +
117 - ((unsigned long) proto << 8));
118 + ((u_int64_t) ntohs(len) << 16) +
119 + ((u_int64_t) proto << 8));
123 static unsigned short
124 udp_check(struct udphdr *uh, int len,
125 - unsigned long saddr, unsigned long daddr)
126 + u_int64_t saddr, u_int64_t daddr)
128 return(csum_tcpudp_magic(saddr, daddr, len, IPPROTO_UDP, 0));
130 diff -uNr dip-3.3.7o/login.c dip-3.3.7o-64/login.c
131 --- dip-3.3.7o/login.c Tue Jun 13 14:46:31 1995
132 +++ dip-3.3.7o-64/login.c Tue May 30 15:34:14 2000
141 #define MIN(a, b) ((a < b)? a : b)
143 static int verify_inet_addr(char *p);