head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.58 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.56 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.54 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.52 pkgsrc-2011Q2-base:1.3 pkgsrc-2009Q4:1.3.0.50 pkgsrc-2009Q4-base:1.3 pkgsrc-2008Q4:1.3.0.48 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.46 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.44 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.42 pkgsrc-2008Q2-base:1.3 cwrapper:1.3.0.40 cwrapper-base:1.3 pkg_install-renovation:1.3.0.38 pkg_install-renovation-base:1.3 pkgsrc-2008Q1:1.3.0.36 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.34 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.32 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.30 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.28 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.26 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.24 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.22 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.20 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.18 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.16 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.14 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.12 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.10 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.8 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.6 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.3.0.4 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.3.0.2 pkgsrc-2003Q4-base:1.3 buildlink2-base:1.2 buildlink2:1.2.0.2 netbsd-1-6:1.2.0.4 netbsd-1-6-RELEASE-base:1.2; locks; strict; comment @# @; 1.3 date 2002.12.20.18.15.55; author schmonz; state dead; branches; next 1.2; 1.2 date 2002.08.06.11.51.02; author wiz; state Exp; branches 1.2.2.1; next 1.1; 1.1 date 2002.08.01.14.43.39; author schmonz; state Exp; branches; next ; 1.2.2.1 date 2002.08.06.11.51.02; author jlam; state dead; branches; next 1.2.2.2; 1.2.2.2 date 2002.08.23.05.09.18; author jlam; state Exp; branches; next ; desc @@ 1.3 log @As the sources are now in ${FILESDIR}, there's no distfile to fetch, and the "do-extract" target copies the sources into ${WRKSRC}. We automagically determine VERSION by inspecting ${FILESDIR}/lib/version.h. Thanks to autoconf, all the patches and almost all of the cruftulent ${OPSYS}-specific stuff in the Makefile are gone. @ text @$NetBSD: patch-ai,v 1.2 2002/08/06 11:51:02 wiz Exp $ --- lib/strlcpy.c.orig Mon Aug 5 18:09:56 2002 +++ lib/strlcpy.c @@@@ -0,0 +1,66 @@@@ +/* + * Copyright (c) 1998 Todd C. Miller + * 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 +#include +#include + +size_t strlcpy(char *, const char *, size_t); + +/* + * Copy src to string dst of size siz. At most siz-1 characters + * will be copied. Always NUL terminates (unless siz == 0). + * Returns strlen(src); if retval >= siz, truncation occurred. + */ +size_t +strlcpy(dst, src, siz) + char *dst; + const char *src; + size_t siz; +{ + char *d = dst; + const char *s = src; + size_t n = siz; + + /* Copy as many bytes as will fit */ + if (n != 0 && --n != 0) { + do { + if ((*d++ = *s++) == 0) + break; + } while (--n != 0); + } + + /* Not enough room in dst, add NUL and traverse rest of src */ + if (n == 0) { + if (siz != 0) + *d = '\0'; /* NUL-terminate dst */ + while (*s++) + ; + } + + return(s - src - 1); /* count does not include NUL */ +} @ 1.2 log @Make it build on 1.4-1.4.2. @ text @d1 1 a1 1 $NetBSD$ @ 1.2.2.1 log @file patch-ai was added on branch buildlink2 on 2002-08-23 05:09:18 +0000 @ text @d1 71 @ 1.2.2.2 log @Merge changes from HEAD of pkgsrc/pkgtools to buildlink2 branch. @ text @a0 71 $NetBSD: patch-ai,v 1.2.2.1 2002/08/23 05:09:18 jlam Exp $ --- lib/strlcpy.c.orig Mon Aug 5 18:09:56 2002 +++ lib/strlcpy.c @@@@ -0,0 +1,66 @@@@ +/* + * Copyright (c) 1998 Todd C. Miller + * 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 +#include +#include + +size_t strlcpy(char *, const char *, size_t); + +/* + * Copy src to string dst of size siz. At most siz-1 characters + * will be copied. Always NUL terminates (unless siz == 0). + * Returns strlen(src); if retval >= siz, truncation occurred. + */ +size_t +strlcpy(dst, src, siz) + char *dst; + const char *src; + size_t siz; +{ + char *d = dst; + const char *s = src; + size_t n = siz; + + /* Copy as many bytes as will fit */ + if (n != 0 && --n != 0) { + do { + if ((*d++ = *s++) == 0) + break; + } while (--n != 0); + } + + /* Not enough room in dst, add NUL and traverse rest of src */ + if (n == 0) { + if (siz != 0) + *d = '\0'; /* NUL-terminate dst */ + while (*s++) + ; + } + + return(s - src - 1); /* count does not include NUL */ +} @ 1.1 log @The 20020723 pkg_install tools use strlcpy(), which Darwin lacks. Provide a strlcpy() implementation (from -r1.12 of basesrc/lib/libc/string/strlcpy.c), and use it on Darwin. @ text @d3 1 a3 1 --- lib/strlcpy.c.orig Thu Aug 1 10:21:56 2002 d5 1 a5 1 @@@@ -0,0 +1,64 @@@@ d36 2 @