在dos格式下读并在unix格式下保存,可以将<cr><nl>替换为单个的<nl>
diff -Naur netkit-ftp-0.17.orig/configure netkit-ftp-0.17/configure --- netkit-ftp-0.17.orig/configure 2008-01-21 15:27:56.000000000 -0500 +++ netkit-ftp-0.17/configure 2008-01-21 15:27:58.000000000 -0500 @@ -93,7 +93,6 @@ echo 'no' echo 'Compiler '"$CC"' does not exist or cannot compile C; try another.' rm -f __conftest* - exit fi fi @@ -180,7 +179,6 @@ echo 'no' echo 'This package needs BSD signal semantics to run.' rm -f __conftest* - exit fi fi rm -f __conftest* @@ -238,7 +236,6 @@ echo 'not found' echo 'This package needs termcap to run.' rm -f __conftest* - exit fi fi rm -f __conftest* @@ -323,7 +320,6 @@ echo 'no' echo 'Cannot work out what to use for socklen_t. Help...' rm -f __conftest* - exit fi fi fi @@ -400,7 +396,6 @@ echo 'missing' echo 'This package requires snprintf.' rm -f __conftest* - exit fi fi fi diff -Naur netkit-ftp-0.17.orig/ftp/cmds.c netkit-ftp-0.17/ftp/cmds.c --- netkit-ftp-0.17.orig/ftp/cmds.c 2008-01-21 15:27:56.000000000 -0500 +++ netkit-ftp-0.17/ftp/cmds.c 2008-01-21 15:27:58.000000000 -0500 @@ -68,6 +68,10 @@ #include "cmds.h" #include "glob.h" +#ifndef index +#define index strchr +#endif + void intr(int); extern FILE *cout; diff -Naur netkit-ftp-0.17.orig/ftp/ftp.c netkit-ftp-0.17/ftp/ftp.c --- netkit-ftp-0.17.orig/ftp/ftp.c 2008-01-21 15:27:56.000000000 -0500 +++ netkit-ftp-0.17/ftp/ftp.c 2008-01-21 15:27:58.000000000 -0500 @@ -65,6 +65,13 @@ #include "../version.h" +#ifndef index +#define index strchr +#endif +#ifndef rindex +#define rindex strrchr +#endif + int data = -1; off_t restart_point = 0; diff -Naur netkit-ftp-0.17.orig/ftp/Makefile netkit-ftp-0.17/ftp/Makefile --- netkit-ftp-0.17.orig/ftp/Makefile 2008-01-21 15:27:56.000000000 -0500 +++ netkit-ftp-0.17/ftp/Makefile 2008-01-21 15:30:01.000000000 -0500 @@ -16,11 +16,12 @@ cmds.o glob.o: glob.h install: ftp - install -s -m$(BINMODE) ftp $(INSTALLROOT)$(BINDIR) - ln -sf ftp $(INSTALLROOT)$(BINDIR)/pftp - install -m$(MANMODE) ftp.1 $(INSTALLROOT)$(MANDIR)/man1 - ln -sf ftp.1 $(INSTALLROOT)$(MANDIR)/man1/pftp.1 - install -m$(MANMODE) netrc.5 $(INSTALLROOT)$(MANDIR)/man5 + mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man{1,5} + install -m$(BINMODE) ftp $(DESTDIR)$(BINDIR) + cd $(DESTDIR)$(BINDIR)/ && ln -sf ftp pftp + install -m$(MANMODE) ftp.1 $(DESTDIR)$(MANDIR)/man1 + cd $(DESTDIR)$(MANDIR)/man1 && ln -sf ftp.1 pftp.1 + install -m$(MANMODE) netrc.5 $(DESTDIR)$(MANDIR)/man5 clean: rm -f *.o ftp diff -Naur netkit-ftp-0.17.orig/ftp/ruserpass.c netkit-ftp-0.17/ftp/ruserpass.c --- netkit-ftp-0.17.orig/ftp/ruserpass.c 2008-01-21 15:27:56.000000000 -0500 +++ netkit-ftp-0.17/ftp/ruserpass.c 2008-01-21 15:27:58.000000000 -0500 @@ -58,6 +58,10 @@ #define ID 10 #define MACH 11 +#ifndef index +#define index strchr +#endif + static char tokval[100]; static struct toktab {