summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjlam <jlam>2006-10-30 03:33:59 +0000
committerjlam <jlam>2006-10-30 03:33:59 +0000
commit8f0f6728fef7e6423d21f6d7ad7d60407e811a0b (patch)
treea492510acb4ab1699ff17dd90f1425cda2320ddf /net
parenteb72e77f8f63fb69a018dbf74aee05cc94c9a570 (diff)
downloadpkgsrc-8f0f6728fef7e6423d21f6d7ad7d60407e811a0b.tar.gz
Merge improvements from the version of Taylor UUCP 1.06.1 that exists
in NetBSD's src/gnu/libexec/uucp directory. Changes include: * Teaching cu(1) about hardware flow control. * Make cu(1) honor "echocheck" and "binary mode" with respect to inspecting the data stream for newlines. * Make some proper integer casts so as not to break on LP64 platforms. * Teach uucp to substitute for \H with the IP address of the system. * Avoid potential divide-by-zero errors when computing times using serial rates. * Properly initialize some variables. The main difference between this version and the one in NetBSD is the location of uucico, uuconv, and uuxqt -- the vanilla UUCP location is ${PREFIX}/sbin while the NetBSD location is /usr/libexec/uucp. Bump PKGREVISION to 1.
Diffstat (limited to 'net')
-rw-r--r--net/uucp/DESCR15
-rw-r--r--net/uucp/Makefile43
-rw-r--r--net/uucp/distinfo18
-rw-r--r--net/uucp/patches/patch-aa2
-rw-r--r--net/uucp/patches/patch-ab12
-rw-r--r--net/uucp/patches/patch-ac28
-rw-r--r--net/uucp/patches/patch-ad150
-rw-r--r--net/uucp/patches/patch-ae15
-rw-r--r--net/uucp/patches/patch-af164
-rw-r--r--net/uucp/patches/patch-ag30
-rw-r--r--net/uucp/patches/patch-ah15
-rw-r--r--net/uucp/patches/patch-ai24
-rw-r--r--net/uucp/patches/patch-aj13
-rw-r--r--net/uucp/patches/patch-ak16
-rw-r--r--net/uucp/patches/patch-al26
-rw-r--r--net/uucp/patches/patch-am13
-rw-r--r--net/uucp/patches/patch-an44
-rw-r--r--net/uucp/patches/patch-ao22
-rw-r--r--net/uucp/patches/patch-ap22
-rw-r--r--net/uucp/patches/patch-aq13
20 files changed, 665 insertions, 20 deletions
diff --git a/net/uucp/DESCR b/net/uucp/DESCR
index 05519ab7472..3d90a1e2d6a 100644
--- a/net/uucp/DESCR
+++ b/net/uucp/DESCR
@@ -1,8 +1,7 @@
-This package provides everything you need to make a UUCP connection.
-It currently supports the 'f', 'g' (in all window and packet sizes),
-'G', 't' and 'e' protocols, as well a Zmodem protocol, the FX UUCICO
-'y' protocol, and two new bidirectional protocols. If you have a
-Berkeley sockets library, it can make TCP connections. If you have
-TLI libraries, it can make TLI connections. It supports a new
-configuration file mechanism.
-
+The Taylor UUCP package provides everything you need to make a UUCP
+connection. It currently supports the 'f', 'g' (in all window and
+packet sizes), 'G', 't' and 'e' protocols, as well a Zmodem protocol,
+the FX UUCICO 'y' protocol, and two new bidirectional protocols.
+If you have a Berkeley sockets library, it can make TCP connections.
+If you have TLI libraries, it can make TLI connections. It supports
+a new configuration file mechanism.
diff --git a/net/uucp/Makefile b/net/uucp/Makefile
index 53086e46c63..9ecf479b04b 100644
--- a/net/uucp/Makefile
+++ b/net/uucp/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.1.1.1 2006/04/24 23:21:46 jlam Exp $
+# $NetBSD: Makefile,v 1.2 2006/10/30 03:33:59 jlam Exp $
DISTNAME= uucp-1.07
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_GNU:=uucp/}
@@ -12,7 +13,7 @@ USE_TOOLS+= mkdir:run pwd:run rmdir:run
PKG_SYSCONFSUBDIR= uucp
GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --with-user=uucp
+CONFIGURE_ARGS+= --with-user=${UUCP_USER}
CONFIGURE_ARGS+= --with-newconfigdir=${PKG_SYSCONFDIR:Q}
CONFIGURE_ARGS+= --with-oldconfigdir=${PKG_SYSCONFDIR:Q}
CONFIGURE_ENV+= MKDIR_PROGRAM=${TOOLS_MKDIR:Q}
@@ -20,18 +21,40 @@ CONFIGURE_ENV+= PWD_PROGRAM=${TOOLS_PWD_CMD:Q}
CONFIGURE_ENV+= RMDIR_PROGRAM=${TOOLS_RMDIR:Q}
UUCP_GROUP?= daemon
+UUCP_USER?= uucp
PKG_GROUPS= ${UUCP_GROUP}
-PKG_USERS= uucp:${UUCP_GROUP}
+PKG_USERS= ${UUCP_USER}:${UUCP_GROUP}
INFO_FILES= # PLIST
# UUCP installs many set-uid "uucp" binaries.
-SPECIAL_PERMS+= bin/cu uucp ${ROOT_GROUP} 4555
-SPECIAL_PERMS+= bin/uucp uucp ${ROOT_GROUP} 4555
-SPECIAL_PERMS+= bin/uuname uucp ${ROOT_GROUP} 4555
-SPECIAL_PERMS+= bin/uustat uucp ${ROOT_GROUP} 4555
-SPECIAL_PERMS+= bin/uux uucp ${ROOT_GROUP} 4555
-SPECIAL_PERMS+= sbin/uucico uucp ${ROOT_GROUP} 4555
-SPECIAL_PERMS+= sbin/uuxqt uucp ${ROOT_GROUP} 4555
+SPECIAL_PERMS+= bin/cu ${UUCP_USER} ${ROOT_GROUP} 4555
+SPECIAL_PERMS+= bin/uucp ${UUCP_USER} ${ROOT_GROUP} 4555
+SPECIAL_PERMS+= bin/uuname ${UUCP_USER} ${ROOT_GROUP} 4555
+SPECIAL_PERMS+= bin/uustat ${UUCP_USER} ${ROOT_GROUP} 4555
+SPECIAL_PERMS+= bin/uux ${UUCP_USER} ${ROOT_GROUP} 4555
+SPECIAL_PERMS+= sbin/uucico ${UUCP_USER} ${ROOT_GROUP} 4555
+SPECIAL_PERMS+= sbin/uuxqt ${UUCP_USER} ${ROOT_GROUP} 4555
+
+SENDMAIL?= /usr/sbin/sendmail
+
+UUCP_MAIL_PROGRAM?= ${SENDMAIL} -t
+UUCP_CMDPATH?= /bin /usr/bin ${PREFIX}/bin
+UUCP_LOCKDIR?= ${VARBASE}/spool/lock
+UUCP_SPOOLDIR?= ${VARBASE}/spool/uucp
+UUCP_PUBDIR?= ${UUCP_SPOOLDIR}public
+UUCP_LOGFILE?= ${UUCP_SPOOLDIR}/Log
+UUCP_STATFILE?= ${UUCP_SPOOLDIR}/Stats
+UUCP_DEBUGFILE?= ${UUCP_SPOOLDIR}/Debug
+
+# Generate a policy_local.h header file that holds the paths used by UUCP.
+post-configure:
+ @${RM} -f ${WRKSRC}/policy_local.h
+.for _var_ in MAIL_PROGRAM CMDPATH LOCKDIR \
+ SPOOLDIR PUBDIR LOGFILE \
+ STATFILE DEBUGFILE
+ @${ECHO} "#define ${_var_} \""${UUCP_${_var_}:Q}"\"" \
+ >> ${WRKSRC}/policy_local.h
+.endfor
.include "../../mk/bsd.pkg.mk"
diff --git a/net/uucp/distinfo b/net/uucp/distinfo
index c6158856a51..c6d900edaa2 100644
--- a/net/uucp/distinfo
+++ b/net/uucp/distinfo
@@ -1,6 +1,22 @@
-$NetBSD: distinfo,v 1.1.1.1 2006/04/24 23:21:46 jlam Exp $
+$NetBSD: distinfo,v 1.2 2006/10/30 03:33:59 jlam Exp $
SHA1 (uucp-1.07.tar.gz) = e7c93c3aa6468f1b26dd4d9104dbbe8c2949e9ee
RMD160 (uucp-1.07.tar.gz) = e265ecd08245dd2510db20430a7a0e387ef4df51
Size (uucp-1.07.tar.gz) = 1013234 bytes
SHA1 (patch-aa) = 4fc29d344083abc4ea57194c1f4f9cd77aa763eb
+SHA1 (patch-ab) = 28f7010cd2db58d0252602cf3aecef8dc56d1b01
+SHA1 (patch-ac) = 98cf1cfec963e165828b496b3d3bc4c06d883ef5
+SHA1 (patch-ad) = 8343bd4d774ff626df53b2c7b37ea102531941fa
+SHA1 (patch-ae) = ab53bb0e77bf7da984c04bdd6236b9c8794ed2b9
+SHA1 (patch-af) = aeeb31483f90c8879900e282b6f703291ba37c79
+SHA1 (patch-ag) = 5e8725073f4874555750911a8369fad318cd11ce
+SHA1 (patch-ah) = 68ffd0b3e338a3df98ff1a93ec37e3bfd898f6b9
+SHA1 (patch-ai) = 78a4bc213b5e689dbcd2347226355edc57fbaba9
+SHA1 (patch-aj) = 5717f8fd76f9afd270b98606ddf2b8e92f2d147d
+SHA1 (patch-ak) = fc845430558a17df57fd74f5e2e38adc30c981e8
+SHA1 (patch-al) = 2ab607628c3f010eb44831b621e017e04ba27ffd
+SHA1 (patch-am) = 408a911fa3c8d4389832cfc44532aa0abe11f42a
+SHA1 (patch-an) = ca1b3db734c701b7308f64e9321b08e37f75045b
+SHA1 (patch-ao) = ee7145bfdd837fab74d33c20996886b803f4310a
+SHA1 (patch-ap) = e2a7e4d28a7d0e911ed8432f8f3524a1eecd7398
+SHA1 (patch-aq) = bb6bcaa133ddda48ad24a94ed690afb5934b96d0
diff --git a/net/uucp/patches/patch-aa b/net/uucp/patches/patch-aa
index 0f6c873b258..176f1fcc90b 100644
--- a/net/uucp/patches/patch-aa
+++ b/net/uucp/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.1.1.1 2006/04/24 23:21:46 jlam Exp $
+$NetBSD: patch-aa,v 1.2 2006/10/30 03:33:59 jlam Exp $
--- unix/Makefile.in.orig 2003-05-29 21:31:50.000000000 -0400
+++ unix/Makefile.in
diff --git a/net/uucp/patches/patch-ab b/net/uucp/patches/patch-ab
new file mode 100644
index 00000000000..bffae617c74
--- /dev/null
+++ b/net/uucp/patches/patch-ab
@@ -0,0 +1,12 @@
+$NetBSD: patch-ab,v 1.1 2006/10/30 03:33:59 jlam Exp $
+
+--- chat.c.orig 2003-05-29 02:08:44.000000000 -0400
++++ chat.c
+@@ -566,6 +566,7 @@ fcsend (qconn, puuconf, z, qsys, qdial,
+ pfwrite = fconn_write;
+ zcallout_login = NULL;
+ zcallout_pass = NULL;
++ fquote = FALSE;
+
+ #if DEBUG > 1
+ if (FDEBUGGING (DEBUG_CHAT))
diff --git a/net/uucp/patches/patch-ac b/net/uucp/patches/patch-ac
new file mode 100644
index 00000000000..f1ea0e90a1d
--- /dev/null
+++ b/net/uucp/patches/patch-ac
@@ -0,0 +1,28 @@
+$NetBSD: patch-ac,v 1.1 2006/10/30 03:33:59 jlam Exp $
+
+--- cu.1.orig 2003-05-29 02:08:45.000000000 -0400
++++ cu.1
+@@ -225,6 +225,11 @@ and
+ .B \-o
+ are given.
+ .TP 5
++.B (\-F, default)
++Use hardware flow control.
++.B (-f).
++Turn off hardware flow control.
++.TP 5
+ .B \-h, \-\-halfduplex
+ Echo characters locally (half-duplex mode).
+ .TP 5
+@@ -265,6 +270,11 @@ Where # is a number, equivalent to
+ .B \-n, \-\-prompt
+ Prompt for the phone number to use.
+ .TP 5
++.B \-q
++Be quiet during file transfers.
++.I cu
++is normally quite verbose.
++.TP 5
+ .B \-d
+ Enter debugging mode. Equivalent to
+ .B \-\-debug all.
diff --git a/net/uucp/patches/patch-ad b/net/uucp/patches/patch-ad
new file mode 100644
index 00000000000..f2be91bf438
--- /dev/null
+++ b/net/uucp/patches/patch-ad
@@ -0,0 +1,150 @@
+$NetBSD: patch-ad,v 1.1 2006/10/30 03:33:59 jlam Exp $
+
+--- cu.c.orig 2003-05-29 02:08:45.000000000 -0400
++++ cu.c
+@@ -258,6 +258,8 @@ main (argc, argv)
+ enum txonxoffsetting txonxoff = XONXOFF_ON;
+ /* -I: configuration file name. */
+ const char *zconfig = NULL;
++ /* -F/-f: Hard/Soft flow control. */
++ boolean hflow = TRUE;
+ int iopt;
+ pointer puuconf;
+ int iuuconf;
+@@ -295,7 +297,7 @@ main (argc, argv)
+ }
+ }
+
+- while ((iopt = getopt_long (argc, argv, "a:c:deE:hnI:l:op:s:tvx:z:",
++ while ((iopt = getopt_long (argc, argv, "a:c:deE:fFhnI:l:op:qs:tvx:z:",
+ asCulongopts, (int *) NULL)) != EOF)
+ {
+ switch (iopt)
+@@ -322,6 +324,16 @@ main (argc, argv)
+ zCuvar_escape = optarg;
+ break;
+
++ case 'f':
++ /* No h/w flow control. */
++ hflow = FALSE;
++ break;
++
++ case 'F':
++ /* Use h/w flow control. */
++ hflow = TRUE;
++ break;
++
+ case 'h':
+ /* Local echo. */
+ fCulocalecho = TRUE;
+@@ -348,6 +360,11 @@ main (argc, argv)
+ zport = optarg;
+ break;
+
++ case 'q':
++ /* Quiet file transfers */
++ fCuvar_verbose = FALSE;
++ break;
++
+ case 's':
+ /* Speed. */
+ ibaud = strtol (optarg, (char **) NULL, 10);
+@@ -599,6 +616,8 @@ main (argc, argv)
+ sport.uuconf_palloc = NULL;
+ sport.uuconf_u.uuconf_sdirect.uuconf_zdevice = NULL;
+ sport.uuconf_u.uuconf_sdirect.uuconf_ibaud = ibaud;
++ sport.uuconf_u.uuconf_sdirect.uuconf_fcarrier = FALSE;
++ sport.uuconf_u.uuconf_sdirect.uuconf_fhardflow = hflow;
+
+ if (! fconn_init (&sport, &sconn, UUCONF_PORTTYPE_UNKNOWN))
+ ucuabort ();
+@@ -842,11 +861,14 @@ ucuhelp ()
+ printf (" -e: Set even parity\n");
+ printf (" -o: Set odd parity\n");
+ printf (" --parity={odd,even}: Set parity\n");
++ printf (" -f: Use hardware flow control\n");
++ printf (" -F: Turn off hardware flow control (default)\n");
+ printf (" -E,--escape char: Set escape character\n");
+ printf (" -h,--halfduplex: Echo locally\n");
+ printf (" --nostop: Turn off XON/XOFF handling\n");
+ printf (" -t,--mapcr: Map carriage return to carriage return/linefeed\n");
+ printf (" -n,--prompt: Prompt for phone number\n");
++ printf (" -q: Be quiet during file transfers\n");
+ printf (" -d: Set maximum debugging level\n");
+ printf (" -x,--debug debug: Set debugging type\n");
+ #if HAVE_TAYLOR_CONFIG
+@@ -1013,7 +1035,7 @@ fcudo_cmd (puuconf, qconn, bcmd)
+ switch (bcmd)
+ {
+ default:
+- if (! isprint (*zCuvar_escape))
++ if (! isprint (BUCHAR (*zCuvar_escape)))
+ sprintf (abescape, "\\%03o", BUCHAR (*zCuvar_escape));
+ else
+ {
+@@ -1111,7 +1133,7 @@ fcudo_cmd (puuconf, qconn, bcmd)
+ return TRUE;
+
+ case '?':
+- if (! isprint (*zCuvar_escape))
++ if (! isprint (BUCHAR (*zCuvar_escape)))
+ sprintf (abescape, "\\%03o", BUCHAR (*zCuvar_escape));
+ else
+ {
+@@ -1248,7 +1270,7 @@ icuunrecogvar (puuconf, argc, argv, pvar
+ {
+ char abescape[5];
+
+- if (! isprint (*zCuvar_escape))
++ if (! isprint (BUCHAR (*zCuvar_escape)))
+ sprintf (abescape, "\\%03o", BUCHAR (*zCuvar_escape));
+ else
+ {
+@@ -1302,7 +1324,7 @@ uculist_vars ()
+ {
+ int cchar;
+
+- if (! isprint (*z))
++ if (! isprint (BUCHAR (*z)))
+ {
+ sprintf (abchar, "\\%03o", BUCHAR (*z));
+ cchar = 4;
+@@ -1415,7 +1437,7 @@ icuunrecogfn (puuconf, argc, argv, pvar,
+ {
+ char abescape[5];
+
+- if (! isprint (*zCuvar_escape))
++ if (! isprint (BUCHAR (*zCuvar_escape)))
+ sprintf (abescape, "\\%03o", BUCHAR (*zCuvar_escape));
+ else
+ {
+@@ -2049,7 +2071,7 @@ fcusend_buf (qconn, zbufarg, cbufarg)
+ fnl = FALSE;
+ for (i = 0, zget = zbuf; i < csend; i++, zget++)
+ {
+- if (isprint (*zget)
++ if (isprint (BUCHAR (*zget))
+ || *zget == '\t')
+ *zput++ = *zget;
+ else if (*zget == '\n')
+@@ -2082,8 +2104,10 @@ fcusend_buf (qconn, zbufarg, cbufarg)
+ mode. Echo checking of a newline is different from checking
+ of normal characters; when we send a newline we look for
+ *zCuvar_echonl. */
++ /* Don't check for newlines unless "echocheck" is on or "binary mode"
++ is off. From NetBSD PR bin/6834 by Frederick Bruckman. */
+ if ((fCuvar_echocheck && ! fCuvar_binary)
+- || (fnl && *zCuvar_echonl != '\0'))
++ && (fnl && *zCuvar_echonl != '\0'))
+ {
+ long iend;
+
+@@ -2101,7 +2125,7 @@ fcusend_buf (qconn, zbufarg, cbufarg)
+ }
+ else
+ {
+- if (! fCuvar_echocheck || ! isprint (*zget))
++ if (! fCuvar_echocheck || ! isprint (BUCHAR (*zget)))
+ continue;
+ bwant = *zget;
+ }
diff --git a/net/uucp/patches/patch-ae b/net/uucp/patches/patch-ae
new file mode 100644
index 00000000000..07a1449b123
--- /dev/null
+++ b/net/uucp/patches/patch-ae
@@ -0,0 +1,15 @@
+$NetBSD: patch-ae,v 1.1 2006/10/30 03:33:59 jlam Exp $
+
+--- log.c.orig 2003-05-29 02:08:45.000000000 -0400
++++ log.c
+@@ -373,8 +373,8 @@ ulog (ttype, zmsg, a, b, c, d, f, g, h,
+ uucico with an upper case argv[0]. We work around
+ that by forcing the filename to lower case here. */
+ for (zlower = zbase; *zlower != '\0'; zlower++)
+- if (isupper (*zlower))
+- *zlower = tolower (*zlower);
++ if (isupper (BUCHAR (*zlower)))
++ *zlower = tolower (BUCHAR (*zlower));
+
+ zfile = zbufalc (strlen (zLogfile)
+ + strlen (zbase)
diff --git a/net/uucp/patches/patch-af b/net/uucp/patches/patch-af
new file mode 100644
index 00000000000..6377c6d60d7
--- /dev/null
+++ b/net/uucp/patches/patch-af
@@ -0,0 +1,164 @@
+$NetBSD: patch-af,v 1.1 2006/10/30 03:33:59 jlam Exp $
+
+--- policy.h.orig 2003-05-29 02:08:45.000000000 -0400
++++ policy.h
+@@ -30,6 +30,9 @@
+
+ /* System characteristics. */
+
++/* Local system configuration */
++#include "policy_local.h"
++
+ /* This code tries to use several ANSI C features, including
+ prototypes, stdarg.h, the const qualifier and the types void
+ (including void * pointers) and unsigned char. By default it will
+@@ -202,7 +205,9 @@
+ HAVE_SAVED_SETUID to 1, but your system does not have saved set
+ user ID, uucp will fail with an error message whenever anybody
+ other than the uucp user uses it. */
++#ifndef HAVE_SAVED_SETUID
+ #define HAVE_SAVED_SETUID 1
++#endif
+
+ /* On some systems, such as 4.4BSD-Lite, NetBSD, the DG Aviion and,
+ possibly, the RS/6000, the setreuid function is broken. It should
+@@ -212,7 +217,9 @@
+ such a system you must set HAVE_BROKEN_SETREUID to 1; if you do
+ not, you will get error messages from setreuid. Systems on which
+ setreuid exists but is broken pretty much always have saved setuid. */
++#ifndef HAVE_BROKEN_SETREUID
+ #define HAVE_BROKEN_SETREUID 0
++#endif
+
+ /* On a few systems, such as NextStep 3.3, the POSIX macro F_SETLKW is
+ defined, but does not work. On such systems, you must set
+@@ -240,8 +247,10 @@
+ the sendmail choice below. Otherwise, select one of the other
+ choices as appropriate. */
+ #if 1
++#ifndef MAIL_PROGRAM
+ #define MAIL_PROGRAM "/usr/lib/sendmail -t"
+ /* #define MAIL_PROGRAM "/usr/sbin/sendmail -t" */
++#endif
+ #define MAIL_PROGRAM_TO_BODY 1
+ #define MAIL_PROGRAM_SUBJECT_BODY 1
+ #endif
+@@ -466,8 +475,8 @@
+ When looking something up (a system, a port, etc.) the new style
+ configuration files will be read first, followed by the V2
+ configuration files, followed by the HDB configuration files. */
+-#define HAVE_V2_CONFIG 0
+-#define HAVE_HDB_CONFIG 0
++#define HAVE_V2_CONFIG 1
++#define HAVE_HDB_CONFIG 1
+
+ /* Exactly one of the following macros must be set to 1. The exact
+ format of the spool directories is explained in unix/spool.c.
+@@ -572,16 +581,20 @@
+ /* The name of the default spool directory. If HAVE_TAYLOR_CONFIG is
+ set to 1, this may be overridden by the ``spool'' command in the
+ configuration file. */
++#ifndef SPOOLDIR
+ #define SPOOLDIR "/usr/spool/uucp"
+ /* #define SPOOLDIR "/var/spool/uucp" */
++#endif
+
+ /* The name of the default public directory. If HAVE_TAYLOR_CONFIG is
+ set to 1, this may be overridden by the ``pubdir'' command in the
+ configuration file. Also, a particular system may be given a
+ specific public directory by using the ``pubdir'' command in the
+ system file. */
++#ifndef PUBDIR
+ #define PUBDIR "/usr/spool/uucppublic"
+ /* #define PUBDIR "/var/spool/uucppublic" */
++#endif
+
+ /* The default command path. This is a space separated list of
+ directories. Remote command executions requested by uux are looked
+@@ -589,7 +602,9 @@
+ command path may be overridden for a particular system. For most
+ systems, you should just make sure that the programs rmail and
+ rnews can be found using this path. */
++#ifndef CMDPATH
+ #define CMDPATH "/bin /usr/bin /usr/local/bin"
++#endif
+
+ /* The default amount of free space to require for systems that do not
+ specify an amount with the ``free-space'' command. This is only
+@@ -644,23 +659,29 @@
+ /* The default log file when using HAVE_TAYLOR_LOGGING. When using
+ HAVE_TAYLOR_CONFIG, this may be overridden by the ``logfile''
+ command in the configuration file. */
++#ifndef LOGFILE
+ #define LOGFILE "/usr/spool/uucp/Log"
+ /* #define LOGFILE "/var/spool/uucp/Log" */
+ /* #define LOGFILE "/var/log/uucp/Log" */
++#endif
+
+ /* The default statistics file when using HAVE_TAYLOR_LOGGING. When
+ using HAVE_TAYLOR_CONFIG, this may be overridden by the
+ ``statfile'' command in the configuration file. */
++#ifndef STATFILE
+ #define STATFILE "/usr/spool/uucp/Stats"
+ /* #define STATFILE "/var/spool/uucp/Stats" */
+ /* #define STATFILE "/var/log/uucp/Stats" */
++#endif
+
+ /* The default debugging file when using HAVE_TAYLOR_LOGGING. When
+ using HAVE_TAYLOR_CONFIG, this may be overridden by the
+ ``debugfile'' command in the configuration file. */
++#ifndef DEBUGFILE
+ #define DEBUGFILE "/usr/spool/uucp/Debug"
+ /* #define DEBUGFILE "/var/spool/uucp/Debug" */
+ /* #define DEBUGFILE "/var/log/uucp/Debug" */
++#endif
+
+ #endif /* HAVE_TAYLOR_LOGGING */
+
+@@ -669,17 +690,23 @@
+ /* The default log file when using HAVE_V2_LOGGING. When using
+ HAVE_TAYLOR_CONFIG, this may be overridden by the ``logfile''
+ command in the configuration file. */
++#ifndef LOGFILE
+ #define LOGFILE "/usr/spool/uucp/LOGFILE"
++#endif
+
+ /* The default statistics file when using HAVE_V2_LOGGING. When using
+ HAVE_TAYLOR_CONFIG, this may be overridden by the ``statfile''
+ command in the configuration file. */
++#ifndef STATFILE
+ #define STATFILE "/usr/spool/uucp/SYSLOG"
++#endif
+
+ /* The default debugging file when using HAVE_V2_LOGGING. When using
+ HAVE_TAYLOR_CONFIG, this may be overridden by the ``debugfile''
+ command in the configuration file. */
++#ifndef DEBUGFILE
+ #define DEBUGFILE "/usr/spool/uucp/DEBUG"
++#endif
+
+ #endif /* HAVE_V2_LOGGING */
+
+@@ -692,16 +719,22 @@
+ be replaced by the system name (if there is no appropriate system,
+ "ANY" will be used). No other '%' character may appear in the
+ string. */
++#ifndef LOGFILE
+ #define LOGFILE "/usr/spool/uucp/.Log/%s/%s"
++#endif
+
+ /* The default statistics file when using HAVE_HDB_LOGGING. When using
+ HAVE_TAYLOR_CONFIG, this may be overridden by the ``statfile''
+ command in the configuration file. */
++#ifndef STATFILE
+ #define STATFILE "/usr/spool/uucp/.Admin/xferstats"
++#endif
+
+ /* The default debugging file when using HAVE_HDB_LOGGING. When using
+ HAVE_TAYLOR_CONFIG, this may be overridden by the ``debugfile''
+ command in the configuration file. */
++#ifndef DEBUGFILE
+ #define DEBUGFILE "/usr/spool/uucp/.Admin/audit.local"
++#endif
+
+ #endif /* HAVE_HDB_LOGGING */
diff --git a/net/uucp/patches/patch-ag b/net/uucp/patches/patch-ag
new file mode 100644
index 00000000000..98c12711343
--- /dev/null
+++ b/net/uucp/patches/patch-ag
@@ -0,0 +1,30 @@
+$NetBSD: patch-ag,v 1.1 2006/10/30 03:33:59 jlam Exp $
+
+--- protf.c.orig 2003-05-29 02:08:45.000000000 -0400
++++ protf.c
+@@ -506,8 +506,8 @@ ffprocess_data (qdaemon, pfexit, pcneed)
+ if (zto != zstart)
+ {
+ DEBUG_MESSAGE1 (DEBUG_PROTO,
+- "ffprocess_data: Got %d bytes",
+- zto - zstart);
++ "ffprocess_data: Got %ld bytes",
++ (long) (zto - zstart));
+
+ cFrec_data += zto - zstart;
+ if (! fgot_data (qdaemon, zstart, (size_t) (zto - zstart),
+@@ -748,10 +748,10 @@ ffawait_cksum (qtrans, qdaemon, zdata, c
+
+ qtrans->precfn = NULL;
+
+- if (! isxdigit (zdata[0])
+- || ! isxdigit (zdata[1])
+- || ! isxdigit (zdata[2])
+- || ! isxdigit (zdata[3])
++ if (! isxdigit (BUCHAR (zdata[0]))
++ || ! isxdigit (BUCHAR (zdata[1]))
++ || ! isxdigit (BUCHAR (zdata[2]))
++ || ! isxdigit (BUCHAR (zdata[3]))
+ || zdata[4] != '\0')
+ {
+ ulog (LOG_ERROR, "Bad checksum format");
diff --git a/net/uucp/patches/patch-ah b/net/uucp/patches/patch-ah
new file mode 100644
index 00000000000..208df8c2cfc
--- /dev/null
+++ b/net/uucp/patches/patch-ah
@@ -0,0 +1,15 @@
+$NetBSD: patch-ah,v 1.1 2006/10/30 03:33:59 jlam Exp $
+
+--- protg.c.orig 2003-05-29 02:08:45.000000000 -0400
++++ protg.c
+@@ -1007,8 +1007,8 @@ fgsenddata (qdaemon, zdata, cdata, iloca
+ }
+
+ DEBUG_MESSAGE2 (DEBUG_PROTO,
+- "fgsenddata: Sending packet %d (%d bytes)",
+- CONTROL_XXX (z[IFRAME_CONTROL]), cdata);
++ "fgsenddata: Sending packet %d (%ld bytes)",
++ CONTROL_XXX (z[IFRAME_CONTROL]), (long) cdata);
+
+ return fsend_data (qdaemon->qconn, z, CFRAMELEN + csize, TRUE);
+ }
diff --git a/net/uucp/patches/patch-ai b/net/uucp/patches/patch-ai
new file mode 100644
index 00000000000..963d056fcab
--- /dev/null
+++ b/net/uucp/patches/patch-ai
@@ -0,0 +1,24 @@
+$NetBSD: patch-ai,v 1.1 2006/10/30 03:33:59 jlam Exp $
+
+--- protz.c.orig 2003-05-29 02:08:46.000000000 -0400
++++ protz.c
+@@ -743,7 +743,7 @@ int ilocal ATTRIBUTE_UNUSED;
+ int iremote ATTRIBUTE_UNUSED;
+ long ipos ATTRIBUTE_UNUSED;
+ {
+- DEBUG_MESSAGE1 (DEBUG_PROTO, "fzsenddata: %d bytes", cdata);
++ DEBUG_MESSAGE1 (DEBUG_PROTO, "fzsenddata: %ld bytes", (long) cdata);
+
+ if (! fzsend_data (qdaemon, zdata, cdata, cdata == 0))
+ return FALSE;
+@@ -819,8 +819,8 @@ boolean fendofmessage;
+ default : type = "UNKNOWN!!!"; break;
+ }
+ DEBUG_MESSAGE3 (DEBUG_PROTO,
+- "fzsend_data: %s, pos 0x%lx, %d bytes",
+- type, wpZtxpos, n);
++ "fzsend_data: %s, pos 0x%lx, %ld bytes",
++ type, wpZtxpos, (long) n);
+ }
+ #endif
+
diff --git a/net/uucp/patches/patch-aj b/net/uucp/patches/patch-aj
new file mode 100644
index 00000000000..088e296e413
--- /dev/null
+++ b/net/uucp/patches/patch-aj
@@ -0,0 +1,13 @@
+$NetBSD: patch-aj,v 1.1 2006/10/30 03:33:59 jlam Exp $
+
+--- unix/cohtty.c.orig 2003-05-29 02:08:48.000000000 -0400
++++ unix/cohtty.c
+@@ -99,7 +99,7 @@ char enable_device[16]; /* this will h
+ */
+
+ for(z = strlen(sought_tty.tty_device) ; z > 0 ; z--){
+- if(isdigit(sought_tty.tty_device[z])){
++ if(isdigit(BUCHAR(sought_tty.tty_device[z]))){
+ break;
+ }
+ }
diff --git a/net/uucp/patches/patch-ak b/net/uucp/patches/patch-ak
new file mode 100644
index 00000000000..e020b5dd9ac
--- /dev/null
+++ b/net/uucp/patches/patch-ak
@@ -0,0 +1,16 @@
+$NetBSD: patch-ak,v 1.1 2006/10/30 03:33:59 jlam Exp $
+
+--- unix/mkdirs.c.orig 2003-05-29 02:08:49.000000000 -0400
++++ unix/mkdirs.c
+@@ -53,6 +53,11 @@ fsysdep_make_dirs (zfile, fpublic)
+ }
+ }
+ *z = '/';
++ /* Some versions of uuto will send a double slash. Some
++ systems will fail to create a directory ending in a
++ slash. From NetBSD PR bin/2970 by D'Arcy J.M. Cain. */
++ while (z[1] == '/')
++ z++;
+ }
+ }
+
diff --git a/net/uucp/patches/patch-al b/net/uucp/patches/patch-al
new file mode 100644
index 00000000000..ca2e4e400d9
--- /dev/null
+++ b/net/uucp/patches/patch-al
@@ -0,0 +1,26 @@
+$NetBSD: patch-al,v 1.1 2006/10/30 03:33:59 jlam Exp $
+
+--- unix/pipe.c.orig 2003-05-29 02:08:49.000000000 -0400
++++ unix/pipe.c
+@@ -199,6 +199,7 @@ fspipe_dial (qconn, puuconf, qsys, zphon
+ struct ssysdep_conn *q;
+ int aidescs[3];
+ const char **pzprog;
++ const char **p;
+
+ q = (struct ssysdep_conn *) qconn->psysdep;
+
+@@ -212,6 +213,13 @@ fspipe_dial (qconn, puuconf, qsys, zphon
+ return FALSE;
+ }
+
++ /* Look for a string \H and substitute the address given for this
++ system. This is useful, e.g. for generic UUCP over SSH or SSL.
++ Idea and part of the patch by Joerg Durchain. */
++ for (p=pzprog; *p; p++)
++ if (!strcmp(*p, "\\H"))
++ *p = zphone;
++
+ aidescs[0] = SPAWN_WRITE_PIPE;
+ aidescs[1] = SPAWN_READ_PIPE;
+ aidescs[2] = SPAWN_NULL;
diff --git a/net/uucp/patches/patch-am b/net/uucp/patches/patch-am
new file mode 100644
index 00000000000..bc666edcb3a
--- /dev/null
+++ b/net/uucp/patches/patch-am
@@ -0,0 +1,13 @@
+$NetBSD: patch-am,v 1.1 2006/10/30 03:33:59 jlam Exp $
+
+--- unix/portnm.c.orig 2003-05-29 02:08:49.000000000 -0400
++++ unix/portnm.c
+@@ -32,7 +32,7 @@ zsysdep_port_name (ftcp_port)
+
+ #if HAVE_TCP
+ {
+- size_t clen;
++ socklen_t clen;
+ struct sockaddr s;
+
+ clen = sizeof (struct sockaddr);
diff --git a/net/uucp/patches/patch-an b/net/uucp/patches/patch-an
new file mode 100644
index 00000000000..36bf576bf7c
--- /dev/null
+++ b/net/uucp/patches/patch-an
@@ -0,0 +1,44 @@
+$NetBSD: patch-an,v 1.1 2006/10/30 03:33:59 jlam Exp $
+
+--- unix/serial.c.orig 2003-05-29 02:08:49.000000000 -0400
++++ unix/serial.c
+@@ -638,8 +638,8 @@ fsserial_lockfile (flok, qconn)
+ char *zl;
+
+ zl = zalc + sizeof LCK_TEMPLATE + clen - 2;
+- if (isupper (*zl))
+- *zl = tolower (*zl);
++ if (isupper (BUCHAR (*zl)))
++ *zl = tolower (BUCHAR (*zl));
+ }
+ #endif
+ z = zalc;
+@@ -2540,7 +2540,7 @@ fsysdep_conn_read (qconn, zbuf, pclen, c
+ else
+ csleepchars = MAX_INPUT - 10;
+
+- isleep = (int) (((long) csleepchars * 10000L) / q->ibaud);
++ isleep = (int) (((long) csleepchars * 10000L) / (q->ibaud + 1));
+ isleep -= 10;
+
+ if (isleep > 10)
+@@ -2956,8 +2956,8 @@ fsysdep_conn_io (qconn, zwrite, pcwrite,
+ cwait = 1024;
+ if (cwait > cread)
+ cwait = cread;
+- stime.tv_sec = (cwait * 10) / q->ibaud;
+- stime.tv_usec = ((((cwait * 1000000) / q->ibaud) * 10)
++ stime.tv_sec = (cwait * 10) / (q->ibaud + 1);
++ stime.tv_usec = ((((cwait * 1000000) / (q->ibaud + 1)) * 10)
+ % 1000000);
+ }
+ else
+@@ -3048,7 +3048,7 @@ fsysdep_conn_io (qconn, zwrite, pcwrite,
+ that HAVE_RESTARTABLE_SYSCALLS is 0. */
+ usset_signal (SIGALRM, usalarm, TRUE, (boolean *) NULL);
+ if (q->fterminal)
+- alarm ((int) ((long) 10240 / q->ibaud) + 1);
++ alarm ((int) ((long) 10240 / (q->ibaud + 1)) + 1);
+ else
+ alarm (1);
+
diff --git a/net/uucp/patches/patch-ao b/net/uucp/patches/patch-ao
new file mode 100644
index 00000000000..ce3c7ae2c0d
--- /dev/null
+++ b/net/uucp/patches/patch-ao
@@ -0,0 +1,22 @@
+$NetBSD: patch-ao,v 1.1 2006/10/30 03:33:59 jlam Exp $
+
+--- unix/tcp.c.orig 2003-05-29 02:08:49.000000000 -0400
++++ unix/tcp.c
+@@ -395,7 +395,7 @@ ftcp_open (qconn, ibaud, fwait, fuser)
+ while (! FGOT_SIGNAL ())
+ {
+ sockaddr_storage speer;
+- size_t clen;
++ socklen_t clen;
+ int onew;
+ pid_t ipid;
+
+@@ -613,7 +613,7 @@ ftcp_dial (qconn, puuconf, qsys, zphone,
+
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = inet_addr ((char *) zhost);
+- if ((long) sin.sin_addr.s_addr == (long) -1)
++ if (sin.sin_addr.s_addr == INADDR_NONE)
+ {
+ ulog (LOG_ERROR, "%s: unknown host name", zhost);
+ return FALSE;
diff --git a/net/uucp/patches/patch-ap b/net/uucp/patches/patch-ap
new file mode 100644
index 00000000000..7f5c5d3700a
--- /dev/null
+++ b/net/uucp/patches/patch-ap
@@ -0,0 +1,22 @@
+$NetBSD: patch-ap,v 1.1 2006/10/30 03:33:59 jlam Exp $
+
+--- uucico.c.orig 2003-05-29 02:08:46.000000000 -0400
++++ uucico.c
+@@ -1478,7 +1478,7 @@ fdo_call (qdaemon, qstat, qdialer, pfcal
+ char *zend;
+
+ b = *zopt++;
+- if (isspace (b) || b != '-')
++ if (isspace (BUCHAR (b)) || b != '-')
+ continue;
+ switch (*zopt)
+ {
+@@ -1494,7 +1494,7 @@ fdo_call (qdaemon, qstat, qdialer, pfcal
+ zopt = zend;
+ break;
+ }
+- while (*zopt != '\0' && ! isspace (*zopt))
++ while (*zopt != '\0' && ! isspace (BUCHAR (*zopt)))
+ ++zopt;
+ }
+ }
diff --git a/net/uucp/patches/patch-aq b/net/uucp/patches/patch-aq
new file mode 100644
index 00000000000..a692e67a479
--- /dev/null
+++ b/net/uucp/patches/patch-aq
@@ -0,0 +1,13 @@
+$NetBSD: patch-aq,v 1.1 2006/10/30 03:33:59 jlam Exp $
+
+--- uuconf/tsinfo.c.orig 2003-05-29 02:08:50.000000000 -0400
++++ uuconf/tsinfo.c
+@@ -498,6 +498,8 @@ iitime (pglobal, argc, argv, pvar, pinfo
+ aznew[2] = argv[1];
+ if (argc > 2)
+ aznew[3] = argv[2];
++ else
++ aznew[3] = NULL;
+
+ return iitimegrade (pglobal, argc + 1, aznew, pvar, pinfo);
+ }