Subject: my old wu-ftpd patches are obsolescent (almost)
To: None <current-users@NetBSD.ORG>
From: John F. Woods <jfw@jfwhome.funhouse.com>
List: current-users
Date: 06/06/1997 22:49:07
For the many people who picked up my patches to wu-ftpd-2.4 for NetBSD 1.0,
you should rush out and get the very latest wu-ftpd (wu-ftpd-2.4.2-beta13)
from wuarchive.wustl.edu (/packages/wuarchive-ftpd/).  It compiles right out
of the box on NetBSD 1.x ("./build nbs"), though you'll want to fix the last
two cases of using %ld printf strings for objects of type off_t (sigh...  I
just sent them mail about this, hopefully they'll fix it for beta 14 ;-).
They have conditional compilation cruft surrounding all the printf() calls
to use %qd; the following fixes cast the arguments to reply() calls to be
standard integral types (though it can, and probably should, use the %qd
cruft as well).

*** ftpcmd.y.orig	Fri Jun  6 22:08:31 1997
--- ftpcmd.y	Fri Jun  6 22:10:08 1997
***************
*** 714,721 ****
  
              fromname = 0;
              restart_point = $3;
!             if (log_commands) syslog(LOG_INFO, "REST %d", restart_point);
!             reply(350, "Restarting at %ld. %s", restart_point,
                  "Send STORE or RETRIEVE to initiate transfer.");
          }
  
--- 714,721 ----
  
              fromname = 0;
              restart_point = $3;
!             if (log_commands) syslog(LOG_INFO, "REST %d", (int)restart_point);
!             reply(350, "Restarting at %ld. %s", (long)restart_point,
                  "Send STORE or RETRIEVE to initiate transfer.");
          }
  
*** ftpd.c.orig	Fri Jun  6 22:10:49 1997
--- ftpd.c	Fri Jun  6 22:19:41 1997
***************
*** 3234,3243 ****
      }
      if (strcmp(cp, "STAT\r\n") == 0) {
          if (file_size != (off_t) - 1)
!             reply(213, "Status: %lu of %lu bytes transferred",
!                   byte_count, file_size);
          else
!             reply(213, "Status: %lu bytes transferred", byte_count);
      }
  }
  
--- 3234,3243 ----
      }
      if (strcmp(cp, "STAT\r\n") == 0) {
          if (file_size != (off_t) - 1)
! 		reply(213, "Status: %lu of %lu bytes transferred",
!                   (unsigned long)byte_count, (unsigned long)file_size);
          else
!             reply(213, "Status: %lu bytes transferred", (unsigned long)byte_count);
      }
  }