Source-Changes-HG archive

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

[src/trunk]: src/lib/libc Add hooks for reachover builds from src/tools/compat.



details:   https://anonhg.NetBSD.org/src/rev/e77101364e1c
branches:  trunk
changeset: 521010:e77101364e1c
user:      tv <tv%NetBSD.org@localhost>
date:      Mon Jan 21 21:33:42 2002 +0000

description:
Add hooks for reachover builds from src/tools/compat.

diffstat:

 lib/libc/db/btree/btree.h |   6 +++++-
 lib/libc/db/hash/hash.h   |   6 +++++-
 lib/libc/gen/basename.c   |  12 +++++++++---
 lib/libc/gen/dirname.c    |  12 +++++++++---
 lib/libc/gen/vis.c        |  20 +++++++++++++-------
 lib/libc/string/strlcat.c |  10 ++++++++--
 lib/libc/string/strlcpy.c |  10 ++++++++--
 7 files changed, 57 insertions(+), 19 deletions(-)

diffs (249 lines):

diff -r bf1e32955014 -r e77101364e1c lib/libc/db/btree/btree.h
--- a/lib/libc/db/btree/btree.h Mon Jan 21 20:59:40 2002 +0000
+++ b/lib/libc/db/btree/btree.h Mon Jan 21 21:33:42 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: btree.h,v 1.11 1998/12/09 12:42:47 christos Exp $      */
+/*     $NetBSD: btree.h,v 1.12 2002/01/21 21:33:42 tv Exp $    */
 
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -38,6 +38,10 @@
  *     @(#)btree.h     8.11 (Berkeley) 8/17/94
  */
 
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 /* Macros to set/clear/test flags. */
 #define        F_SET(p, f)     (p)->flags |= (f)
 #define        F_CLR(p, f)     (p)->flags &= ~(f)
diff -r bf1e32955014 -r e77101364e1c lib/libc/db/hash/hash.h
--- a/lib/libc/db/hash/hash.h   Mon Jan 21 20:59:40 2002 +0000
+++ b/lib/libc/db/hash/hash.h   Mon Jan 21 21:33:42 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hash.h,v 1.9 2001/06/11 01:50:50 wiz Exp $     */
+/*     $NetBSD: hash.h,v 1.10 2002/01/21 21:33:42 tv Exp $     */
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -38,6 +38,10 @@
  *     @(#)hash.h      8.3 (Berkeley) 5/31/94
  */
 
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 /* Operations */
 typedef enum {
        HASH_GET, HASH_PUT, HASH_PUTNEW, HASH_DELETE, HASH_FIRST, HASH_NEXT
diff -r bf1e32955014 -r e77101364e1c lib/libc/gen/basename.c
--- a/lib/libc/gen/basename.c   Mon Jan 21 20:59:40 2002 +0000
+++ b/lib/libc/gen/basename.c   Mon Jan 21 21:33:42 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: basename.c,v 1.2 2000/01/22 22:19:09 mycroft Exp $     */
+/*     $NetBSD: basename.c,v 1.3 2002/01/21 21:33:42 tv Exp $  */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -36,20 +36,25 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_CONFIG_H
+#include "config.h"
+#else
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: basename.c,v 1.2 2000/01/22 22:19:09 mycroft Exp $");
+__RCSID("$NetBSD: basename.c,v 1.3 2002/01/21 21:33:42 tv Exp $");
 #endif /* !LIBC_SCCS && !lint */
 
 #include "namespace.h"
 #include <libgen.h>
-#include <string.h>
 
 #ifdef __weak_alias
 __weak_alias(basename,_basename)
 #endif
+#endif
 
+#include <string.h>
 
+#if !HAVE_BASENAME
 char *
 basename(path)
        char *path;
@@ -75,3 +80,4 @@
        else
                return (p + 1);
 }
+#endif
diff -r bf1e32955014 -r e77101364e1c lib/libc/gen/dirname.c
--- a/lib/libc/gen/dirname.c    Mon Jan 21 20:59:40 2002 +0000
+++ b/lib/libc/gen/dirname.c    Mon Jan 21 21:33:42 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dirname.c,v 1.3 2001/09/15 15:43:40 simonb Exp $       */
+/*     $NetBSD: dirname.c,v 1.4 2002/01/21 21:33:42 tv Exp $   */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -36,20 +36,25 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_CONFIG_H
+#include "config.h"
+#else
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: dirname.c,v 1.3 2001/09/15 15:43:40 simonb Exp $");
+__RCSID("$NetBSD: dirname.c,v 1.4 2002/01/21 21:33:42 tv Exp $");
 #endif /* !LIBC_SCCS && !lint */
 
 #include "namespace.h"
 #include <libgen.h>
-#include <string.h>
 
 #ifdef __weak_alias
 __weak_alias(dirname,_dirname)
 #endif
+#endif
 
+#include <string.h>
 
+#if !HAVE_DIRNAME
 char *
 dirname(path)
        char *path;
@@ -75,3 +80,4 @@
 
        return (path);
 }
+#endif
diff -r bf1e32955014 -r e77101364e1c lib/libc/gen/vis.c
--- a/lib/libc/gen/vis.c        Mon Jan 21 20:59:40 2002 +0000
+++ b/lib/libc/gen/vis.c        Mon Jan 21 21:33:42 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vis.c,v 1.19 2000/01/22 22:42:45 mycroft Exp $ */
+/*     $NetBSD: vis.c,v 1.20 2002/01/21 21:33:42 tv Exp $      */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -34,20 +34,18 @@
  * SUCH DAMAGE.
  */
 
-
+#if HAVE_CONFIG_H
+#include "config.h"
+#else
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: vis.c,v 1.19 2000/01/22 22:42:45 mycroft Exp $");
+__RCSID("$NetBSD: vis.c,v 1.20 2002/01/21 21:33:42 tv Exp $");
 #endif /* not lint */
 
 #include "namespace.h"
 #include <sys/types.h>
 
 #include <assert.h>
-#include <ctype.h>
-#include <limits.h>
-#include <stdio.h>
-#include <string.h>
 #include <vis.h>
 
 #ifdef __weak_alias
@@ -58,6 +56,13 @@
 __weak_alias(svis,_svis)
 __weak_alias(vis,_vis)
 #endif
+#endif
+
+#if !HAVE_VIS_H
+#include <ctype.h>
+#include <limits.h>
+#include <stdio.h>
+#include <string.h>
 
 #undef BELL
 #if defined(__STDC__)
@@ -294,3 +299,4 @@
        MAKEEXTRALIST(flag, extra);
        return (strsvisx(dst, src, len, flag, extra));
 }
+#endif
diff -r bf1e32955014 -r e77101364e1c lib/libc/string/strlcat.c
--- a/lib/libc/string/strlcat.c Mon Jan 21 20:59:40 2002 +0000
+++ b/lib/libc/string/strlcat.c Mon Jan 21 21:33:42 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strlcat.c,v 1.9 2001/11/16 04:17:25 itojun Exp $       */
+/*     $NetBSD: strlcat.c,v 1.10 2002/01/21 21:33:42 tv Exp $  */
 /*     $OpenBSD: strlcat.c,v 1.4 2001/01/12 22:55:23 millert Exp $     */
 
 /*
@@ -28,15 +28,20 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_CONFIG_H
+#include "config.h"
+#else
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: strlcat.c,v 1.9 2001/11/16 04:17:25 itojun Exp $");
+__RCSID("$NetBSD: strlcat.c,v 1.10 2002/01/21 21:33:42 tv Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <assert.h>
 #include <string.h>
+#endif
 
+#if !HAVE_STRLCAT
 /*
  * 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
@@ -77,3 +82,4 @@
 
        return(dlen + (s - src));       /* count does not include NUL */
 }
+#endif
diff -r bf1e32955014 -r e77101364e1c lib/libc/string/strlcpy.c
--- a/lib/libc/string/strlcpy.c Mon Jan 21 20:59:40 2002 +0000
+++ b/lib/libc/string/strlcpy.c Mon Jan 21 21:33:42 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strlcpy.c,v 1.7 2001/01/13 04:19:54 itojun Exp $       */
+/*     $NetBSD: strlcpy.c,v 1.8 2002/01/21 21:33:42 tv Exp $   */
 /*     $OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp $     */
 
 /*
@@ -28,15 +28,20 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_CONFIG_H 
+#include "config.h"
+#else
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: strlcpy.c,v 1.7 2001/01/13 04:19:54 itojun Exp $");
+__RCSID("$NetBSD: strlcpy.c,v 1.8 2002/01/21 21:33:42 tv Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <assert.h>
 #include <string.h>
+#endif
 
+#if !HAVE_STRLCPY
 /*
  * Copy src to string dst of size siz.  At most siz-1 characters
  * will be copied.  Always NUL terminates (unless siz == 0).
@@ -73,3 +78,4 @@
 
        return(s - src - 1);    /* count does not include NUL */
 }
+#endif



Home | Main Index | Thread Index | Old Index