+Mon Jul 29 22:37:23 1996 Ezra Peisach <epeisach@kangaroo.mit.edu>
+
+ * secure.c: Do not assume sizeof(long) = 4 for sending lengths OTW
+
+ * configure.in: Determine sizeof short, int, long for secure.c
+
Fri Jul 26 20:55:12 1996 Sam Hartman <hartmans@tertius.mit.edu>
* secure.c (secure_putbyte): Reset nout to zero on errorso we
extern char *sys_errlist[];
#endif
+#if (SIZEOF_SHORT == 4)
+typedef unsigned short ftp_uint32;
+typedef short ftp_int32;
+#elif (SIZEOF_INT == 4)
+typedef unsigned int ftp_uint32;
+typedef int ftp_int32;
+#elif (SIZEOF_LONG == 4)
+typedef unsigned long ftp_uint32;
+typedef long ftp_int32;
+#endif
+
+
extern struct sockaddr_in hisaddr;
extern struct sockaddr_in myaddr;
extern int level;
{
static char *outbuf; /* output ciphertext */
static unsigned int bufsize; /* size of outbuf */
- long length;
- u_long net_len;
+ ftp_int32 length;
+ ftp_uint32 net_len;
/* Other auth types go here ... */
#ifdef KERBEROS
/* number of chars in ucbuf, pointer into ucbuf */
static unsigned int nin, bufp;
int kerror;
- u_long length;
+ ftp_uint32 length;
if (nin == 0) {
if ((kerror = looping_read(fd, &length, sizeof(length)))