Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Mar 2003 23:56:51 +0100
From:      des@ofug.org (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=)
To:        arch@freebsd.org
Subject:   OpenBSD compatibility in cvs
Message-ID:  <xzpwuiw1dxo.fsf@flood.ping.uio.no>

next in thread | raw e-mail | index | archive | help
--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

The attached patch implements the OpenBSD tag, umask and dlimit cvs
configuration keywords so our cvs(1) can operate on an OpenBSD repo
without warnings.  The file it affects is on the vendor branch; should
we submit this patch to the vendor or just take the file off the
branch?

DES
--=20
Dag-Erling Sm=F8rgrav - des@ofug.org


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=cvs.diff

Index: contrib/cvs/src/parseinfo.c
===================================================================
RCS file: /home/ncvs/src/contrib/cvs/src/parseinfo.c,v
retrieving revision 1.1.1.11
diff -u -r1.1.1.11 parseinfo.c
--- contrib/cvs/src/parseinfo.c	21 Jan 2003 21:53:02 -0000	1.1.1.11
+++ contrib/cvs/src/parseinfo.c	18 Mar 2003 22:53:26 -0000
@@ -340,6 +340,25 @@
 		goto error_return;
 	    }
 	}
+	else if (strcmp (line, "tag") == 0) {
+		RCS_setlocalid(p);
+	}
+	else if (strcmp (line, "umask") == 0) {
+	    cvsumask = (mode_t)(strtol(p, NULL, 8) & 0777);
+	}
+        else if (strcmp (line, "dlimit") == 0) {
+#ifdef BSD
+#include <sys/resource.h>
+	    struct rlimit rl;
+
+	    if (getrlimit(RLIMIT_DATA, &rl) != -1) {
+		rl.rlim_cur = atoi(p);
+		rl.rlim_cur *= 1024;
+
+		(void) setrlimit(RLIMIT_DATA, &rl);
+	    }
+#endif /* BSD */
+	}
 	else if (strcmp (line, "PreservePermissions") == 0)
 	{
 	    if (strcmp (p, "no") == 0)

--=-=-=--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpwuiw1dxo.fsf>