diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/appl/gssftp/ftp/ChangeLog | 6 | ||||
| -rw-r--r-- | src/appl/gssftp/ftp/configure.in | 3 | ||||
| -rw-r--r-- | src/appl/gssftp/ftp/secure.c | 18 |
3 files changed, 24 insertions, 3 deletions
diff --git a/src/appl/gssftp/ftp/ChangeLog b/src/appl/gssftp/ftp/ChangeLog index 3533bf026..f3426f786 100644 --- a/src/appl/gssftp/ftp/ChangeLog +++ b/src/appl/gssftp/ftp/ChangeLog @@ -1,3 +1,9 @@ +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 diff --git a/src/appl/gssftp/ftp/configure.in b/src/appl/gssftp/ftp/configure.in index 76b7cbee3..40b07852f 100644 --- a/src/appl/gssftp/ftp/configure.in +++ b/src/appl/gssftp/ftp/configure.in @@ -7,6 +7,9 @@ USE_ANAME CHECK_SIGPROCMASK CHECK_WAIT_TYPE DECLARE_SYS_ERRLIST +AC_CHECK_SIZEOF(short) +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(long) AC_FUNC_VFORK AC_HAVE_FUNCS(getcwd getdtablesize) AC_HEADER_STDARG diff --git a/src/appl/gssftp/ftp/secure.c b/src/appl/gssftp/ftp/secure.c index 6500ed330..183f10a3a 100644 --- a/src/appl/gssftp/ftp/secure.c +++ b/src/appl/gssftp/ftp/secure.c @@ -35,6 +35,18 @@ extern gss_ctx_id_t gcontext; 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; @@ -213,8 +225,8 @@ unsigned int nbyte; { 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 @@ -295,7 +307,7 @@ int fd; /* 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))) |
