diff options
author | jlam <jlam@pkgsrc.org> | 2004-09-11 19:01:36 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-09-11 19:01:36 +0000 |
commit | 436503fdba4797b8f6eb597bd2a57b679eedd5c2 (patch) | |
tree | fe2e571656ea41cf39dae4a941edc18dd2b76845 /pkgtools | |
parent | 3b7e4ba26298bd0388bc9f61bbe84170390e5a45 (diff) | |
download | pkgsrc-436503fdba4797b8f6eb597bd2a57b679eedd5c2.tar.gz |
Update pkgtools/libnbcompat to 20040911. Changes from version 20040822
include fixing fgetln() to account for \0 characters due to implementing
it using fgets() (analysis provided by Urban Boquist). Also add a
definition for __restrict if not present since it is used in the regex
implementation code from src HEAD.
This has been tested to work correctly on:
FreeBSD-4.8/i386
NetBSD-1.6.2/i386
Solaris 9
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/libnbcompat/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/README | 18 | ||||
-rwxr-xr-x | pkgtools/libnbcompat/files/configure | 18 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/configure.ac | 4 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/fgetln.c | 43 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/nbcompat/cdefs.h | 14 |
6 files changed, 37 insertions, 64 deletions
diff --git a/pkgtools/libnbcompat/Makefile b/pkgtools/libnbcompat/Makefile index cc605f0701b..a834cd060ab 100644 --- a/pkgtools/libnbcompat/Makefile +++ b/pkgtools/libnbcompat/Makefile @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.40 2004/08/23 03:32:12 jlam Exp $ +# $NetBSD: Makefile,v 1.41 2004/09/11 19:01:40 jlam Exp $ # # NOTE: If you update this package, it is *mandatory* that you update # pkgsrc/pkgtools/libnbcompat/files/README to reflect the actual # list of tested and supported platforms. # -DISTNAME= libnbcompat-20040822 +DISTNAME= libnbcompat-20040911 CATEGORIES= pkgtools MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/libnbcompat/files/README b/pkgtools/libnbcompat/files/README index b342f61a7dc..a62564152ba 100644 --- a/pkgtools/libnbcompat/files/README +++ b/pkgtools/libnbcompat/files/README @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.10 2004/08/23 03:32:12 jlam Exp $ +$NetBSD: README,v 1.11 2004/09/11 19:01:40 jlam Exp $ 0 Introduction ============== @@ -44,24 +44,12 @@ breakage seep in. Proper methodology for updating this package is: *NOTE* the most recent libnbcompat. *NOTE* -libnbcompat-20040822 has been tested to build and install correctly +libnbcompat-20040911 has been tested to build and install correctly on the following operating systems: FreeBSD-4.8/i386 <jlam@NetBSD.org> - FreeBSD-5.1/alpha <grant@NetBSD.org> - IRIX 6.5 <schmonz@NetBSD.org> - MacOS X 10.2.8 <jlam@NetBSD.org> - MacOS X 10.3.5 <schmonz@NetBSD.org> - MS Interix 3.5 <schmonz@NetBSD.org> - NetBSD-1.5/i386 <cgd@NetBSD.org> NetBSD-1.6.2/i386 <jlam@NetBSD.org> - NetBSD-2.0_BETA/i386 <schmonz@NetBSD.org> - Red Hat Linux 6.0/i386 <cgd@NetBSD.org> - Red Hat Linux 7.2/i386 <cgd@NetBSD.org> - Red Hat Linux 7.3/i386 <cgd@NetBSD.org> - Solaris 2.6/sparc <cgd@NetBSD.org> - Solaris 8/sparc <cgd@NetBSD.org> - Solaris 9/sparc <grant@NetBSD.org> + Solaris 9/sparc <salo@NetBSD.org> 3 Usage diff --git a/pkgtools/libnbcompat/files/configure b/pkgtools/libnbcompat/files/configure index 46a05806fbd..11b3812e4af 100755 --- a/pkgtools/libnbcompat/files/configure +++ b/pkgtools/libnbcompat/files/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for libnbcompat 20040822. +# Generated by GNU Autoconf 2.59 for libnbcompat 20040911. # # Report bugs to <grant@NetBSD.org>. # @@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='libnbcompat' PACKAGE_TARNAME='libnbcompat' -PACKAGE_VERSION='20040822' -PACKAGE_STRING='libnbcompat 20040822' +PACKAGE_VERSION='20040911' +PACKAGE_STRING='libnbcompat 20040911' PACKAGE_BUGREPORT='grant@NetBSD.org' # Factoring default headers for most tests. @@ -779,7 +779,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libnbcompat 20040822 to adapt to many kinds of systems. +\`configure' configures libnbcompat 20040911 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -845,7 +845,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libnbcompat 20040822:";; + short | recursive ) echo "Configuration of libnbcompat 20040911:";; esac cat <<\_ACEOF @@ -957,7 +957,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -libnbcompat configure 20040822 +libnbcompat configure 20040911 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -971,7 +971,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libnbcompat $as_me 20040822, which was +It was created by libnbcompat $as_me 20040911, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -11236,7 +11236,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by libnbcompat $as_me 20040822, which was +This file was extended by libnbcompat $as_me 20040911, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -11296,7 +11296,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -libnbcompat config.status 20040822 +libnbcompat config.status 20040911 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff --git a/pkgtools/libnbcompat/files/configure.ac b/pkgtools/libnbcompat/files/configure.ac index a46be8299a8..af03faff8f9 100644 --- a/pkgtools/libnbcompat/files/configure.ac +++ b/pkgtools/libnbcompat/files/configure.ac @@ -1,8 +1,8 @@ -dnl $NetBSD: configure.ac,v 1.49 2004/08/23 03:32:12 jlam Exp $ +dnl $NetBSD: configure.ac,v 1.50 2004/09/11 19:01:40 jlam Exp $ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.52) -AC_INIT([libnbcompat], [20040822], [grant@NetBSD.org]) +AC_INIT([libnbcompat], [20040911], [grant@NetBSD.org]) AC_CONFIG_HEADER(nbcompat/config.h) AC_ARG_PROGRAM diff --git a/pkgtools/libnbcompat/files/fgetln.c b/pkgtools/libnbcompat/files/fgetln.c index df829dd46ac..d5a465f1208 100644 --- a/pkgtools/libnbcompat/files/fgetln.c +++ b/pkgtools/libnbcompat/files/fgetln.c @@ -1,4 +1,4 @@ -/* $NetBSD: fgetln.c,v 1.2 2004/08/23 03:32:12 jlam Exp $ */ +/* $NetBSD: fgetln.c,v 1.3 2004/09/11 19:01:40 jlam Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -37,39 +37,9 @@ */ #include <nbcompat.h> -#include <nbcompat/cdefs.h> -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)fgetline.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: fgetln.c,v 1.2 2004/08/23 03:32:12 jlam Exp $"); -#endif -#endif /* LIBC_SCCS and not lint */ - -#if 0 -#include "namespace.h" -#endif - #include <nbcompat/stdio.h> +#include <nbcompat/stdlib.h> -#if 0 -#include "reentrant.h" -#include "local.h" -#endif - -#if 0 -#ifdef __weak_alias -__weak_alias(fgetln,_fgetln) -#endif -#endif - -/* - * Get an input line. The returned pointer often (but not always) - * points into a stdio buffer. Fgetline does not alter the text of - * the returned line (which is thus not a C string because it will - * not necessarily end with '\0'), but does allow callers to modify - * it if they wish. Thus, we set __SMOD in case the caller does. - */ char * fgetln(fp, len) FILE *fp; @@ -79,7 +49,6 @@ fgetln(fp, len) static size_t bufsiz = 0; char *ptr; - if (buf == NULL) { bufsiz = BUFSIZ; if ((buf = malloc(bufsiz)) == NULL) @@ -103,8 +72,12 @@ fgetln(fp, len) } else buf = nbuf; - *len = bufsiz; - if (fgets(&buf[bufsiz], BUFSIZ, fp) == NULL) + /* + * We need to overwrite the '\0' written by the last call + * to fgets(). + */ + *len = bufsiz - 1; + if (fgets(&buf[bufsiz - 1], BUFSIZ + 1, fp) == NULL) return buf; bufsiz = nbufsiz; diff --git a/pkgtools/libnbcompat/files/nbcompat/cdefs.h b/pkgtools/libnbcompat/files/nbcompat/cdefs.h index 0149af8667d..e40ee70c1f3 100644 --- a/pkgtools/libnbcompat/files/nbcompat/cdefs.h +++ b/pkgtools/libnbcompat/files/nbcompat/cdefs.h @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs.h,v 1.1 2004/08/23 03:32:13 jlam Exp $ */ +/* $NetBSD: cdefs.h,v 1.2 2004/09/11 19:01:40 jlam Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -92,4 +92,16 @@ # endif #endif +#ifndef __restrict +/* + * C99 defines the restrict type qualifier keyword, which was made available + * in GCC 2.92. + */ +# if __STDC_VERSION__ >= 199901L +# define __restrict restrict +# else +# define __restrict /* delete __restrict when not supported */ +# endif +#endif + #endif /* !_NBCOMPAT_SYS_CDEFS_H_ */ |