[Glibc-bsd-commits] r3378 - in trunk/freebsd-moused/debian: . patches

Guillem Jover guillem at alioth.debian.org
Tue May 31 02:45:02 UTC 2011


Author: guillem
Date: 2011-05-31 02:45:02 +0000 (Tue, 31 May 2011)
New Revision: 3378

Added:
   trunk/freebsd-moused/debian/patches/000_libbsd.patch
Modified:
   trunk/freebsd-moused/debian/changelog
   trunk/freebsd-moused/debian/control
   trunk/freebsd-moused/debian/patches/001_glibc.diff
   trunk/freebsd-moused/debian/patches/002_retry.diff
   trunk/freebsd-moused/debian/patches/series
Log:
Use libbsd-dev instead of local copy of strlcpy()


Modified: trunk/freebsd-moused/debian/changelog
===================================================================
--- trunk/freebsd-moused/debian/changelog	2011-05-31 02:25:06 UTC (rev 3377)
+++ trunk/freebsd-moused/debian/changelog	2011-05-31 02:45:02 UTC (rev 3378)
@@ -7,6 +7,7 @@
   * Now using Standards-Version 3.9.2 (no changes needed).
   * Refactor source and tar name into SOURCE and TARNAME in debian/rules.
   * Line-wrap PMAKE variable in debian/rules.
+  * Use libbsd-dev instead of local copy of strlcpy().
 
  -- Guillem Jover <guillem at debian.org>  Thu, 30 Apr 2009 20:57:46 +0200
 

Modified: trunk/freebsd-moused/debian/control
===================================================================
--- trunk/freebsd-moused/debian/control	2011-05-31 02:25:06 UTC (rev 3377)
+++ trunk/freebsd-moused/debian/control	2011-05-31 02:45:02 UTC (rev 3378)
@@ -2,7 +2,7 @@
 Section: utils
 Priority: optional
 Maintainer: Robert Millan <rmh at debian.org>
-Build-Depends: debhelper (>= 7), freebsd-buildutils
+Build-Depends: debhelper (>= 7), freebsd-buildutils, libbsd-dev
 Standards-Version: 3.9.2
 
 Package: moused

Added: trunk/freebsd-moused/debian/patches/000_libbsd.patch
===================================================================
--- trunk/freebsd-moused/debian/patches/000_libbsd.patch	                        (rev 0)
+++ trunk/freebsd-moused/debian/patches/000_libbsd.patch	2011-05-31 02:45:02 UTC (rev 3378)
@@ -0,0 +1,25 @@
+---
+ usr.sbin/moused/Makefile |    1 +
+ usr.sbin/moused/moused.c |    1 +
+ 2 files changed, 2 insertions(+)
+
+--- a/usr.sbin/moused/Makefile
++++ b/usr.sbin/moused/Makefile
+@@ -2,6 +2,7 @@
+ 
+ PROG=	moused
+ MAN=	moused.8
++LDADD=	-lbsd
+ 
+ #BINMODE=4555
+ #INSTALLFLAGS=-fschg
+--- a/usr.sbin/moused/moused.c
++++ b/usr.sbin/moused/moused.c
+@@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$");
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <bsd/string.h>
+ #include <syslog.h>
+ #include <termios.h>
+ #include <unistd.h>

Modified: trunk/freebsd-moused/debian/patches/001_glibc.diff
===================================================================
--- trunk/freebsd-moused/debian/patches/001_glibc.diff	2011-05-31 02:25:06 UTC (rev 3377)
+++ trunk/freebsd-moused/debian/patches/001_glibc.diff	2011-05-31 02:45:02 UTC (rev 3378)
@@ -1,7 +1,6 @@
 ---
- usr.sbin/moused/moused.c  |    7 ++--
- usr.sbin/moused/strlcat.c |   70 ++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 74 insertions(+), 3 deletions(-)
+ usr.sbin/moused/moused.c |    5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
 
 --- a/usr.sbin/moused/moused.c
 +++ b/usr.sbin/moused/moused.c
@@ -13,17 +12,15 @@
  
  #include <sys/param.h>
  #include <sys/consio.h>
-@@ -71,6 +70,9 @@ __FBSDID("$FreeBSD$");
+@@ -72,6 +71,7 @@ __FBSDID("$FreeBSD$");
  #include <syslog.h>
  #include <termios.h>
  #include <unistd.h>
 +#include <sys/ttycom.h>
-+
-+#include "strlcat.c"
  
  #define MAX_CLICKTHRESHOLD	2000	/* 2 seconds */
  #define MAX_BUTTON2TIMEOUT	2000	/* 2 seconds */
-@@ -465,8 +467,7 @@ static void	moused(void);
+@@ -466,8 +466,7 @@ static void	moused(void);
  static void	hup(int sig);
  static void	cleanup(int sig);
  static void	usage(void);
@@ -33,76 +30,3 @@
  
  static int	r_identify(void);
  static char	*r_if(int type);
---- /dev/null
-+++ b/usr.sbin/moused/strlcat.c
-@@ -0,0 +1,70 @@
-+/*	$OpenBSD: strlcat.c,v 1.2 1999/06/17 16:28:58 millert Exp $	*/
-+
-+/*
-+ * Copyright (c) 1998 Todd C. Miller <Todd.Miller at courtesan.com>
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ *    notice, this list of conditions and the following disclaimer.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ *    notice, this list of conditions and the following disclaimer in the
-+ *    documentation and/or other materials provided with the distribution.
-+ * 3. The name of the author may not be used to endorse or promote products
-+ *    derived from this software without specific prior written permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
-+ * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#include <sys/cdefs.h>
-+#include <sys/types.h>
-+#include <string.h>
-+
-+/*
-+ * Appends src to string dst of size siz (unlike strncat, siz is the
-+ * full size of dst, not space left).  At most siz-1 characters
-+ * will be copied.  Always NUL terminates (unless siz <= strlen(dst)).
-+ * Returns strlen(src) + MIN(siz, strlen(initial dst)).
-+ * If retval >= siz, truncation occurred.
-+ */
-+size_t
-+strlcat(dst, src, siz)
-+	char *dst;
-+	const char *src;
-+	size_t siz;
-+{
-+	char *d = dst;
-+	const char *s = src;
-+	size_t n = siz;
-+	size_t dlen;
-+
-+	/* Find the end of dst and adjust bytes left but don't go past end */
-+	while (n-- != 0 && *d != '\0')
-+		d++;
-+	dlen = d - dst;
-+	n = siz - dlen;
-+
-+	if (n == 0)
-+		return(dlen + strlen(s));
-+	while (*s != '\0') {
-+		if (n != 1) {
-+			*d++ = *s;
-+			n--;
-+		}
-+		s++;
-+	}
-+	*d = '\0';
-+
-+	return(dlen + (s - src));	/* count does not include NUL */
-+}

Modified: trunk/freebsd-moused/debian/patches/002_retry.diff
===================================================================
--- trunk/freebsd-moused/debian/patches/002_retry.diff	2011-05-31 02:25:06 UTC (rev 3377)
+++ trunk/freebsd-moused/debian/patches/002_retry.diff	2011-05-31 02:45:02 UTC (rev 3378)
@@ -9,7 +9,7 @@
 
 --- a/usr.sbin/moused/moused.c
 +++ b/usr.sbin/moused/moused.c
-@@ -756,9 +756,9 @@ main(int argc, char *argv[])
+@@ -755,9 +755,9 @@ main(int argc, char *argv[])
  	usage();
      }
  
@@ -21,7 +21,7 @@
  	    retry = 5;
      }
  
-@@ -768,7 +768,7 @@ main(int argc, char *argv[])
+@@ -767,7 +767,7 @@ main(int argc, char *argv[])
  	    signal(SIGINT , cleanup);
  	    signal(SIGQUIT, cleanup);
  	    signal(SIGTERM, cleanup);

Modified: trunk/freebsd-moused/debian/patches/series
===================================================================
--- trunk/freebsd-moused/debian/patches/series	2011-05-31 02:25:06 UTC (rev 3377)
+++ trunk/freebsd-moused/debian/patches/series	2011-05-31 02:45:02 UTC (rev 3378)
@@ -1,2 +1,3 @@
+000_libbsd.patch
 001_glibc.diff
 002_retry.diff




More information about the Glibc-bsd-commits mailing list