diff -rC2 TIP+3.0.orig/tip+3.0.1/config-bsd.h TIP+3.0/tip+3.0.1/config-bsd.h *** TIP+3.0.orig/tip+3.0.1/config-bsd.h Thu Feb 22 07:37:44 1996 --- TIP+3.0/tip+3.0.1/config-bsd.h Wed Mar 27 17:10:55 1996 *************** *** 38,42 **** --- 38,46 ---- /* ---------------------------------------------------------------- * uucp lock dir. may be system dependent */ + #ifndef __FreeBSD__ #define LOCKDIRFMT "/usr/spool/uucp/LCK/LCK..%s" + #else + #define LOCKDIRFMT "/var/spool/lock/LCK..%s" + #endif typedef void sigfunc_t; diff -rC2 TIP+3.0.orig/tip+3.0.1/ioctl.c TIP+3.0/tip+3.0.1/ioctl.c *** TIP+3.0.orig/tip+3.0.1/ioctl.c Sun Feb 11 08:41:16 1996 --- TIP+3.0/tip+3.0.1/ioctl.c Sun Apr 7 00:27:18 1996 *************** *** 11,14 **** --- 11,17 ---- #include + #ifdef __FreeBSD__ + #include + #endif #define YES 1 diff -rC2 TIP+3.0.orig/tip+3.0.1/misc.c TIP+3.0/tip+3.0.1/misc.c *** TIP+3.0.orig/tip+3.0.1/misc.c Wed Feb 21 06:44:25 1996 --- TIP+3.0/tip+3.0.1/misc.c Wed Mar 27 16:52:07 1996 *************** *** 154,157 **** --- 154,158 ---- + #ifndef __FreeBSD__ int isblank(s) char *s; { char c; *************** *** 163,166 **** --- 164,168 ---- return 1; } + #endif char *strlower(s) char *s; diff -rC2 TIP+3.0.orig/tip+3.0.1/speed.c TIP+3.0/tip+3.0.1/speed.c *** TIP+3.0.orig/tip+3.0.1/speed.c Wed Feb 21 23:08:19 1996 --- TIP+3.0/tip+3.0.1/speed.c Sun Apr 7 00:23:52 1996 *************** *** 11,14 **** --- 11,18 ---- #include + #ifdef __FreeBSD__ + #define USE_OLD_TTY + #include + #endif /* *************** *** 85,88 **** --- 89,96 ---- "4800", 4800, B4800, "9600", 9600, B9600, + #ifdef __FreeBSD__ + "19200", 19200, EXTA, + "38400", 38400, EXTB, + #else "14400", 14400, B14400, "19200", 19200, B19200, *************** *** 90,94 **** --- 98,106 ---- "38400", 38400, B38400, "43200", 43200, B43200, + #endif "57600", 57600, B57600, + #ifdef __FreeBSD__ + "115200", 115200, B115200, + #endif "HUP", 0, B0, "EXTA", 0, EXTA, diff -rC2 TIP+3.0.orig/tip+3.0.1/tip.c TIP+3.0/tip+3.0.1/tip.c *** TIP+3.0.orig/tip+3.0.1/tip.c Thu Mar 28 16:52:34 1996 --- TIP+3.0/tip+3.0.1/tip.c Fri Apr 12 15:52:35 1996 *************** *** 198,202 **** if(argc < 2) usage(tipname); ! while ((ch = getopt(argc,argv,"hrv0123456789")) != EOF){ switch (ch){ case 'h': --- 198,202 ---- if(argc < 2) usage(tipname); ! while ((ch = getopt(argc,argv,"hrvb:0123456789")) != EOF){ switch (ch){ case 'h': *************** *** 208,211 **** --- 208,214 ---- vflag = YES; break; + case 'b': + baudopt = atoi(optarg); + break; case '0': case '1': *************** *** 222,234 **** * argv[optind] is "-123456789". * therefor we skip '-'. * -Kenar- */ ! p = argv[optind]; ! baudopt = atoi(++p); break; default: usage(tipname); } - if(baudopt) break; } i = optind; --- 225,239 ---- * argv[optind] is "-123456789". * therefor we skip '-'. + * Note that 'baudopt' should be evaluated only once. * -Kenar- */ ! if(!baudopt) { ! p = argv[optind]; ! if (p) baudopt = atoi(++p); ! } break; default: usage(tipname); } } i = optind; *************** *** 237,245 **** if(!system){ ! perror("No host-name"); usage(tipname); } if(rflag && !rdata){ ! perror("Program not specified\n"); usage(tipname); } --- 242,250 ---- if(!system){ ! fputs("No host-name\n", stderr); usage(tipname); } if(rflag && !rdata){ ! fputs("Program not specified\n", stderr); usage(tipname); } *************** *** 549,552 **** --- 554,558 ---- static uid_t ceuid; /* current effective uid */ + static gid_t cegid; /* current effective uid */ /* ryu */ /* *************** *** 573,580 **** if(ceuid != uid) { ! setregid(egid,gid); setreuid(euid,uid); ceuid = uid; } } --- 579,591 ---- if(ceuid != uid) { ! /*setregid(egid,gid);*/ setreuid(euid,uid); ceuid = uid; } + if(cegid != gid) + { + setregid(egid,gid); + cegid = gid; + } } *************** *** 589,594 **** { setreuid(uid,euid); ! setregid(gid,egid); ceuid = euid; } } --- 600,610 ---- { setreuid(uid,euid); ! /* setregid(gid,egid); */ ceuid = euid; + } + if(cegid != egid) + { + setregid(gid,egid); + cegid = egid; } } diff -rC2 TIP+3.0.orig/tip+3.0.1/uucplock.c TIP+3.0/tip+3.0.1/uucplock.c *** TIP+3.0.orig/tip+3.0.1/uucplock.c Wed Feb 21 06:21:44 1996 --- TIP+3.0/tip+3.0.1/uucplock.c Wed Apr 10 11:07:59 1996 *************** *** 148,151 **** if(!lockfile) return; (void)sprintf(tbuf, LOCKDIRFMT, lockfile); ! unlink(tbuf); } --- 148,152 ---- if(!lockfile) return; (void)sprintf(tbuf, LOCKDIRFMT, lockfile); ! if (unlink(tbuf) == -1) ! perror("unlink"); } diff -rC2 TIP+3.0.orig/tipxfer/Makefile TIP+3.0/tipxfer/Makefile *** TIP+3.0.orig/tipxfer/Makefile Fri Feb 2 14:08:47 1996 --- TIP+3.0/tipxfer/Makefile Wed Apr 10 09:35:45 1996 *************** *** 18,21 **** --- 18,22 ---- INCLUDE1 = /usr/include/ansi INCLUDE2 = /usr/include/bsd + INCLUDE = /usr/include COMFLAGS = -Dpyr *************** *** 63,67 **** clean: ! rm tipsz tiprz tipbp *.o install: $(INSDIR)/tipbp --- 64,68 ---- clean: ! -rm -f tipsz tiprz tipbp *.o install: $(INSDIR)/tipbp diff -rC2 TIP+3.0.orig/tipxfer/bplus.c TIP+3.0/tipxfer/bplus.c *** TIP+3.0.orig/tipxfer/bplus.c Fri Feb 2 14:08:29 1996 --- TIP+3.0/tipxfer/bplus.c Sun Apr 7 02:32:54 1996 *************** *** 92,95 **** --- 92,100 ---- #include #include + #ifdef __FreeBSD__ + /*#include */ + #define USE_OLD_TTY + #include + #endif extern size_t time(); *************** *** 1884,1895 **** --- 1889,1909 ---- /* The followings are added by Kenar * However I don't know the rule of values. */ + #ifdef __FreeBSD__ + case EXTA: + #else case B14400: case B19200: case B28800: + #endif Def_BS = 10; Port_Update_Rate = 300; break; + #ifdef __FreeBSD__ + case EXTB: + case B115200: + #else case B38400: case B43200: + #endif case B57600: Def_BS = 12; diff -rC2 TIP+3.0.orig/tipxfer/tipbp.c TIP+3.0/tipxfer/tipbp.c *** TIP+3.0.orig/tipxfer/tipbp.c Thu Dec 7 12:17:15 1995 --- TIP+3.0/tipxfer/tipbp.c Sun Apr 7 02:35:06 1996 *************** *** 405,408 **** --- 405,412 ---- case B4800: br = 4800L; break; case B9600: br = 9600L; break; + #ifdef __FreeBSD__ + case EXTA: br = 19200L; break; + case EXTB: br = 38400L; break; + #else case B14400: br = 14400L; break; case B19200: br = 19200L; break; *************** *** 410,414 **** --- 414,422 ---- case B38400: br = 38400L; break; case B43200: br = 43200L; break; + #endif case B57600: br = 57600L; break; + #ifdef __FreeBSD__ + case B115200: br = 115200L; break; + #endif default: PortBps = B0; br = 0L; break; } diff -rC2 TIP+3.0.orig/tipxfer/tiprz.c TIP+3.0/tipxfer/tiprz.c *** TIP+3.0.orig/tipxfer/tiprz.c Wed May 30 13:04:40 1990 --- TIP+3.0/tipxfer/tiprz.c Wed Apr 10 10:53:25 1996 *************** *** 78,82 **** --- 78,84 ---- extern unsigned long total_data_chars_xfered; /* zcurses.c */ extern int errno; + #ifndef __FreeBSD__ extern char *sys_errlist[]; + #endif extern char Attn[]; /* Attention string rx sends to tx on err */ extern int Crc32; /* Display flag indicating 32 bit CRC being received */ diff -rC2 TIP+3.0.orig/tipxfer/tipsz.c TIP+3.0/tipxfer/tipsz.c *** TIP+3.0.orig/tipxfer/tipsz.c Thu Dec 7 01:04:05 1995 --- TIP+3.0/tipxfer/tipsz.c Wed Mar 27 16:59:36 1996 *************** *** 91,95 **** --- 91,97 ---- #include "zlint.h" + #ifndef __FreeBSD__ extern char *sys_errlist[]; + #endif extern unsigned short crctab[]; /* wht */ extern unsigned long total_data_chars_xfered; /* zcurses.c */ *************** *** 1114,1118 **** --- 1116,1122 ---- { register c,m; + #ifndef __FreeBSD__ long lseek(); + #endif long X_txpos = lseek(fileno(in),0L,1); char diag_str[64]; diff -rC2 TIP+3.0.orig/tipxfer/zcommon.c TIP+3.0/tipxfer/zcommon.c *** TIP+3.0.orig/tipxfer/zcommon.c Fri Dec 8 09:59:25 1995 --- TIP+3.0/tipxfer/zcommon.c Wed Apr 10 10:53:27 1996 *************** *** 24,27 **** --- 24,32 ---- #include #include + #ifdef __FreeBSD__ + /*#include */ + #define USE_OLD_TTY + #include + #endif #include "zmodem.h" *************** *** 53,56 **** --- 58,65 ---- 4800, B4800, 9600, B9600, + #ifdef __FreeBSD__ + 19200, EXTA, + 38400, EXTB, + #else 14400, B14400, 19200, B19200, *************** *** 58,62 **** --- 67,75 ---- 38400, B38400, 43200, B43200, + #endif 57600, B57600, + #ifdef __FreeBSD__ + 115200, B115200, + #endif 0, };