pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc Update pkgtools/libnbcompat to 20040911. Changes from...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c08c5e5f3bd4
branches:  trunk
changeset: 480504:c08c5e5f3bd4
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat Sep 11 19:01:36 2004 +0000

description:
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:

 doc/CHANGES                                 |   3 +-
 pkgtools/libnbcompat/Makefile               |   4 +-
 pkgtools/libnbcompat/files/README           |  18 ++----------
 pkgtools/libnbcompat/files/configure        |  18 ++++++------
 pkgtools/libnbcompat/files/configure.ac     |   4 +-
 pkgtools/libnbcompat/files/fgetln.c         |  43 +++++-----------------------
 pkgtools/libnbcompat/files/nbcompat/cdefs.h |  14 ++++++++-
 7 files changed, 39 insertions(+), 65 deletions(-)

diffs (256 lines):

diff -r b22f103afd54 -r c08c5e5f3bd4 doc/CHANGES
--- a/doc/CHANGES       Sat Sep 11 17:54:04 2004 +0000
+++ b/doc/CHANGES       Sat Sep 11 19:01:36 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.7139 2004/09/11 14:56:32 jmmv Exp $
+$NetBSD: CHANGES,v 1.7140 2004/09/11 19:01:36 jlam Exp $
 
 Changes to the packages collection and infrastructure in 2004:
 
@@ -4236,3 +4236,4 @@
        Updated teixsl-fo to 3.3 [minskim 2004-09-11]
        Updated pixieplus to 0.5.4nb5 [markd 2004-09-11]
        Removed cmdline [jmmv 2004-09-11]
+       Updated libnbcompat to 20040911 [jlam 2004-09-11]
diff -r b22f103afd54 -r c08c5e5f3bd4 pkgtools/libnbcompat/Makefile
--- a/pkgtools/libnbcompat/Makefile     Sat Sep 11 17:54:04 2004 +0000
+++ b/pkgtools/libnbcompat/Makefile     Sat Sep 11 19:01:36 2004 +0000
@@ -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 -r b22f103afd54 -r c08c5e5f3bd4 pkgtools/libnbcompat/files/README
--- a/pkgtools/libnbcompat/files/README Sat Sep 11 17:54:04 2004 +0000
+++ b/pkgtools/libnbcompat/files/README Sat Sep 11 19:01:36 2004 +0000
@@ -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 @@
 *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@localhost>
-       FreeBSD-5.1/alpha               <grant%NetBSD.org@localhost>
-       IRIX 6.5                        <schmonz%NetBSD.org@localhost>
-       MacOS X 10.2.8                  <jlam%NetBSD.org@localhost>
-       MacOS X 10.3.5                  <schmonz%NetBSD.org@localhost>
-       MS Interix 3.5                  <schmonz%NetBSD.org@localhost>
-       NetBSD-1.5/i386                 <cgd%NetBSD.org@localhost>
        NetBSD-1.6.2/i386               <jlam%NetBSD.org@localhost>
-       NetBSD-2.0_BETA/i386            <schmonz%NetBSD.org@localhost>
-       Red Hat Linux 6.0/i386          <cgd%NetBSD.org@localhost>
-       Red Hat Linux 7.2/i386          <cgd%NetBSD.org@localhost>
-       Red Hat Linux 7.3/i386          <cgd%NetBSD.org@localhost>
-       Solaris 2.6/sparc               <cgd%NetBSD.org@localhost>
-       Solaris 8/sparc                 <cgd%NetBSD.org@localhost>
-       Solaris 9/sparc                 <grant%NetBSD.org@localhost>
+       Solaris 9/sparc                 <salo%NetBSD.org@localhost>
 
 
  3 Usage
diff -r b22f103afd54 -r c08c5e5f3bd4 pkgtools/libnbcompat/files/configure
--- a/pkgtools/libnbcompat/files/configure      Sat Sep 11 17:54:04 2004 +0000
+++ b/pkgtools/libnbcompat/files/configure      Sat Sep 11 19:01:36 2004 +0000
@@ -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@localhost>.
 #
@@ -269,8 +269,8 @@
 # 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@localhost'
 
 # Factoring default headers for most tests.
@@ -779,7 +779,7 @@
   # 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 @@
 
 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 @@
 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 @@
 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 @@
 } >&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 @@
 
 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 -r b22f103afd54 -r c08c5e5f3bd4 pkgtools/libnbcompat/files/configure.ac
--- a/pkgtools/libnbcompat/files/configure.ac   Sat Sep 11 17:54:04 2004 +0000
+++ b/pkgtools/libnbcompat/files/configure.ac   Sat Sep 11 19:01:36 2004 +0000
@@ -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@localhost])
+AC_INIT([libnbcompat], [20040911], [grant%NetBSD.org@localhost])
 AC_CONFIG_HEADER(nbcompat/config.h)
 AC_ARG_PROGRAM
 
diff -r b22f103afd54 -r c08c5e5f3bd4 pkgtools/libnbcompat/files/fgetln.c
--- a/pkgtools/libnbcompat/files/fgetln.c       Sat Sep 11 17:54:04 2004 +0000
+++ b/pkgtools/libnbcompat/files/fgetln.c       Sat Sep 11 19:01:36 2004 +0000
@@ -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 @@
        static size_t bufsiz = 0;
        char *ptr;
 
-
        if (buf == NULL) {
                bufsiz = BUFSIZ;
                if ((buf = malloc(bufsiz)) == NULL)
@@ -103,8 +72,12 @@
                } 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 -r b22f103afd54 -r c08c5e5f3bd4 pkgtools/libnbcompat/files/nbcompat/cdefs.h
--- a/pkgtools/libnbcompat/files/nbcompat/cdefs.h       Sat Sep 11 17:54:04 2004 +0000
+++ b/pkgtools/libnbcompat/files/nbcompat/cdefs.h       Sat Sep 11 19:01:36 2004 +0000
@@ -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_ */



Home | Main Index | Thread Index | Old Index