diff -rc ftpd/extern.h ftpd_hpux/extern.h
*** ftpd/extern.h	Fri May 27 07:39:17 1994
--- ftpd_hpux/extern.h	Mon Jan  8 04:19:38 1996
***************
*** 33,65 ****
   *	@(#)extern.h	8.2 (Berkeley) 4/4/94
   */
  
! void	blkfree __P((char **));
! char  **copyblk __P((char **));
! void	cwd __P((char *));
! void	delete __P((char *));
! void	dologout __P((int));
! void	fatal __P((char *));
! int	ftpd_pclose __P((FILE *));
! FILE   *ftpd_popen __P((char *, char *));
! char   *getline __P((char *, int, FILE *));
! void	logwtmp __P((char *, char *, char *));
! void	lreply __P((int, const char *, ...));
! void	makedir __P((char *));
! void	nack __P((char *));
! void	pass __P((char *));
! void	passive __P((void));
! void	perror_reply __P((int, char *));
! void	pwd __P((void));
! void	removedir __P((char *));
! void	renamecmd __P((char *, char *));
! char   *renamefrom __P((char *));
! void	reply __P((int, const char *, ...));
! void	retrieve __P((char *, char *));
! void	send_file_list __P((char *));
! void	setproctitle __P((const char *, ...));
! void	statcmd __P((void));
! void	statfilecmd __P((char *));
! void	store __P((char *, char *, int));
! void	upper __P((char *));
! void	user __P((char *));
! void	yyerror __P((char *));
--- 33,65 ----
   *	@(#)extern.h	8.2 (Berkeley) 4/4/94
   */
  
! void	blkfree (char **);
! char  **copyblk (char **);
! void	cwd (char *);
! void	delete (char *);
! void	dologout (int);
! void	fatal (char *);
! int	ftpd_pclose (FILE *);
! FILE   *ftpd_popen (char *, char *);
! char   *getline (char *, int, FILE *);
! void	logwtmp (char *, char *, char *);
! void	lreply (int, const char *, ...);
! void	makedir (char *);
! void	nack (char *);
! void	pass (char *);
! void	passive (void);
! void	perror_reply (int, char *);
! void	pwd (void);
! void	removedir (char *);
! void	renamecmd (char *, char *);
! char   *renamefrom (char *);
! void	reply (int, const char *, ...);
! void	retrieve (char *, char *);
! void	send_file_list (char *);
! void	setproctitle (const char *, ...);
! void	statcmd (void);
! void	statfilecmd (char *);
! void	store (char *, char *, int);
! void	upper (char *);
! void	user (char *);
! void	yyerror (char *);
diff -rc ftpd/extern.h ftpd_hpux/extern.hftpd/ftpcmd.c ftpd_hpux/ftpcmd.c
*** ftpd/ftpcmd.c	Fri May 12 08:17:39 1995
--- ftpd_hpux/ftpcmd.c	Mon Jan  8 17:25:05 1996
***************
*** 35,40 ****
--- 35,41 ----
  #include <unistd.h>
  
  #include "extern.h"
+ #include "pathnames.h"
  
  extern	struct sockaddr_in data_dest;
  extern	int logged_in;
diff -rc ftpd/ftpcmd.c ftpd_hpux/ftpcmd.cftpd/ftpcmd.y ftpd_hpux/ftpcmd.y
*** ftpd/ftpcmd.y	Fri May 12 23:16:06 1995
--- ftpd_hpux/ftpcmd.y	Mon Jan  8 15:42:52 1996
***************
*** 43,49 ****
  #ifndef lint
  static char sccsid[] = "@(#)ftpcmd.y	8.3 (Berkeley) 4/6/94";
  #endif /* not lint */
! 
  #include <sys/param.h>
  #include <sys/socket.h>
  #include <sys/stat.h>
--- 43,49 ----
  #ifndef lint
  static char sccsid[] = "@(#)ftpcmd.y	8.3 (Berkeley) 4/6/94";
  #endif /* not lint */
! #include "pathnames.h"
  #include <sys/param.h>
  #include <sys/socket.h>
  #include <sys/stat.h>
***************
*** 800,812 ****
  	{ NULL,   0,    0,    0,	0 }
  };
  
! static char	*copy __P((char *));
! static void	 help __P((struct tab *, char *));
  static struct tab *
! 		 lookup __P((struct tab *, char *));
! static void	 sizecmd __P((char *));
! static void	 toolong __P((int));
! static int	 yylex __P((void));
  
  static struct tab *
  lookup(p, cmd)
--- 800,812 ----
  	{ NULL,   0,    0,    0,	0 }
  };
  
! static char	*copy (char *);
! static void	 help (struct tab *, char *);
  static struct tab *
! 		 lookup (struct tab *, char *);
! static void	 sizecmd (char *);
! static void	 toolong (int);
! static int	 yylex (void);
  
  static struct tab *
  lookup(p, cmd)
diff -rc ftpd/ftpcmd.y ftpd_hpux/ftpcmd.yftpd/ftpd.c ftpd_hpux/ftpd.c
*** ftpd/ftpd.c	Mon May 22 22:24:58 1995
--- ftpd_hpux/ftpd.c	Mon Jan  8 16:28:04 1996
***************
*** 63,69 ****
  
  #include <ctype.h>
  #include <dirent.h>
- #include <err.h>
  #include <errno.h>
  #include <fcntl.h>
  #include <glob.h>
--- 63,68 ----
***************
*** 184,204 ****
  #define LOGCMD2(x, y, z)
  #define LOGBYTES(x, y, z)
  
! static void	 ack __P((char *));
! static void	 myoob __P((int));
! static int	 checkuser __P((char *));
! static FILE	*dataconn __P((char *, off_t, char *));
! static void	 dolog __P((struct sockaddr_in *));
! static char	*curdir __P((void));
! static void	 end_login __P((void));
! static FILE	*getdatasock __P((char *));
! static char	*gunique __P((char *));
! static void	 lostconn __P((int));
! static int	 receive_data __P((FILE *, FILE *));
! static void	 send_data __P((FILE *, FILE *, off_t, off_t, int));
  static struct passwd *
! 		 sgetpwnam __P((char *));
! static char	*sgetsave __P((char *));
  
  static char *
  curdir()
--- 183,203 ----
  #define LOGCMD2(x, y, z)
  #define LOGBYTES(x, y, z)
  
! static void	 ack (char *);
! static void	 myoob (int);
! static int	 checkuser (char *);
! static FILE	*dataconn (char *, off_t, char *);
! static void	 dolog (struct sockaddr_in *);
! static char	*curdir (void);
! static void	 end_login (void);
! static FILE	*getdatasock (char *);
! static char	*gunique (char *);
! static void	 lostconn (int);
! static int	 receive_data (FILE *, FILE *);
! static void	 send_data (FILE *, FILE *, off_t, off_t, int);
  static struct passwd *
! 		 sgetpwnam (char *);
! static char	*sgetsave (char *);
  
  static char *
  curdir()
***************
*** 298,304 ****
  
  			val = strtol(optarg, &optarg, 8);
  			if (*optarg != '\0' || val < 0)
! 				warnx("bad value for -u");
  			else
  				defumask = val;
  			break;
--- 297,303 ----
  
  			val = strtol(optarg, &optarg, 8);
  			if (*optarg != '\0' || val < 0)
! 				fprintf(stderr, "bad value for -u");
  			else
  				defumask = val;
  			break;
***************
*** 309,315 ****
  			break;
  
  		default:
! 			warnx("unknown flag -%c ignored", optopt);
  			break;
  		}
  	}
--- 308,314 ----
  			break;
  
  		default:
! 			fprintf(stderr,"unknown flag -%c ignored", optopt);
  			break;
  		}
  	}
***************
*** 728,734 ****
  {
  	FILE *fin, *dout;
  	struct stat st;
! 	int (*closefunc) __P((FILE *));
  #ifdef STATS
  	long start;
  #endif
--- 727,733 ----
  {
  	FILE *fin, *dout;
  	struct stat st;
! 	int (*closefunc) (FILE *);
  #ifdef STATS
  	long start;
  #endif
***************
*** 806,812 ****
  {
  	FILE *fout, *din;
  	struct stat st;
! 	int (*closefunc) __P((FILE *));
  
  	if (unique && stat(name, &st) == 0 &&
  	    (name = gunique(name)) == NULL) {
--- 805,811 ----
  {
  	FILE *fout, *din;
  	struct stat st;
! 	int (*closefunc) (FILE *);
  
  	if (unique && stat(name, &st) == 0 &&
  	    (name = gunique(name)) == NULL) {
***************
*** 1452,1458 ****
  {
  	char path[MAXPATHLEN + 1];
  
! 	if (getwd(path) == (char *)NULL)
  		reply(550, "%s.", path);
  	else
  		reply(257, "\"%s\" is current directory.", path);
--- 1451,1457 ----
  {
  	char path[MAXPATHLEN + 1];
  
! 	if (getcwd(path, MAXPATHLEN) == (char *)NULL)
  		reply(550, "%s.", path);
  	else
  		reply(257, "\"%s\" is current directory.", path);
***************
*** 1837,1843 ****
  	char path[MAXPATHLEN + 1];
  	long now;
  
! 	if (statfd >= 0 && getwd(path) != NULL) {
  		time(&now);
  		sprintf(buf, "%.20s!%s!%s!%s/%s!%ld!%ld\n",
  			ctime(&now)+4, ident, remotehost,
--- 1836,1842 ----
  	char path[MAXPATHLEN + 1];
  	long now;
  
! 	if (statfd >= 0 && getcwd(path, MAXPATHLEN) != NULL) {
  		time(&now);
  		sprintf(buf, "%.20s!%s!%s!%s/%s!%ld!%ld\n",
  			ctime(&now)+4, ident, remotehost,
diff -rc ftpd/ftpd.c ftpd_hpux/ftpd.cftpd/pathnames.h ftpd_hpux/pathnames.h
*** ftpd/pathnames.h	Sun Feb 26 15:14:10 1995
--- ftpd_hpux/pathnames.h	Mon Jan  8 04:34:38 1996
***************
*** 33,40 ****
   *	@(#)pathnames.h	8.1 (Berkeley) 6/4/93
   */
  
! #include <paths.h>
! 
  #define	_PATH_FTPWELCOME	"/etc/ftpwelcome"
  #define	_PATH_FTPLOGINMESG	"/etc/ftpmotd"
  #define _PATH_FTPDSTATFILE	"/var/log/ftpd"
--- 33,48 ----
   *	@(#)pathnames.h	8.1 (Berkeley) 6/4/93
   */
  
! #include <sys/file.h>
  #define	_PATH_FTPWELCOME	"/etc/ftpwelcome"
  #define	_PATH_FTPLOGINMESG	"/etc/ftpmotd"
  #define _PATH_FTPDSTATFILE	"/var/log/ftpd"
+ #define _PATH_DEVNULL		"/dev/null"
+ #define _PATH_NOLOGIN		"/etc/nologin"
+ #define _PATH_BSHELL		"/bin/sh"
+ #define _INCLUDE_HPUX_SOURCE
+ 
+ /* FOO */
+ #define GLOB_BRACE 1
+ #define GLOB_QUOTE 2
+ #define GLOB_TILDE 3
diff -rc ftpd/pathnames.h ftpd_hpux/pathnames.hftpd/popen.c ftpd_hpux/popen.c
*** ftpd/popen.c	Fri May 27 07:39:16 1994
--- ftpd_hpux/popen.c	Mon Jan  8 16:00:09 1996
***************
*** 41,47 ****
  
  #include <sys/types.h>
  #include <sys/wait.h>
! 
  #include <errno.h>
  #include <glob.h>
  #include <signal.h>
--- 41,47 ----
  
  #include <sys/types.h>
  #include <sys/wait.h>
! #include "pathnames.h"
  #include <errno.h>
  #include <glob.h>
  #include <signal.h>
***************
*** 73,80 ****
  		return (NULL);
  
  	if (!pids) {
! 		if ((fds = getdtablesize()) <= 0)
! 			return (NULL);
  		if ((pids = (int *)malloc((u_int)(fds * sizeof(int)))) == NULL)
  			return (NULL);
  		memset(pids, 0, fds * sizeof(int));
--- 73,80 ----
  		return (NULL);
  
  	if (!pids) {
! 		/*if ((fds = getdtablesize()) <= 0)
! 			return (NULL);*/
  		if ((pids = (int *)malloc((u_int)(fds * sizeof(int)))) == NULL)
  			return (NULL);
  		memset(pids, 0, fds * sizeof(int));

