Move rb.c from sys/lib/libkern to common so it can be in both libc and libkern.

This commit is contained in:
matt 2008-06-30 19:03:59 +00:00
parent af39897a83
commit 48717a981d
5 changed files with 37 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rb.c,v 1.20 2008/06/30 16:36:18 matt Exp $ */
/* $NetBSD: rb.c,v 1.1 2008/06/30 19:04:00 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -31,6 +31,7 @@
#if !defined(_KERNEL) && !defined(_STANDALONE)
#include <sys/types.h>
#include <sys/types.h>
#include <stddef.h>
#include <assert.h>
#include <stdbool.h>
@ -42,6 +43,33 @@
#else
#include <lib/libkern/libkern.h>
#endif
#ifdef _LIBC
__weak_alias(rb_tree_init, _rb_tree_init)
__weak_alias(rb_tree_find_node, _rb_tree_find_node)
__weak_alias(rb_tree_find_node_geq, _rb_tree_find_node_geq)
__weak_alias(rb_tree_find_node_leq, _rb_tree_find_node_leq)
__weak_alias(rb_tree_insert_node, _rb_tree_insert_node)
__weak_alias(rb_tree_remove_node, _rb_tree_remove_node)
__weak_alias(rb_tree_iterate, _rb_tree_iterate)
#ifdef RBDEBUG
__weak_alias(rb_tree_check, _rb_tree_check)
__weak_alias(rb_tree_depths, _rb_tree_depths)
#endif
#define rb_tree_init _rb_tree_init
#define rb_tree_find_node _rb_tree_find_node
#define rb_tree_find_node_geq _rb_tree_find_node_geq
#define rb_tree_find_node_leq _rb_tree_find_node_leq
#define rb_tree_insert_node _rb_tree_insert_node
#define rb_tree_remove_node _rb_tree_remove_node
#define rb_tree_iterate _rb_tree_iterate
#ifdef RBDEBUG
#define rb_tree_check _rb_tree_check
#define rb_tree_depths _rb_tree_depths
#endif
#endif
#ifdef RBTEST
#include "rb.h"
#else

View File

@ -1,4 +1,4 @@
# $NetBSD: shl.mi,v 1.439 2008/06/25 11:12:01 ad Exp $
# $NetBSD: shl.mi,v 1.440 2008/06/30 19:04:00 matt Exp $
#
# Note: Don't delete entries from here - mark them as "obsolete" instead,
# unless otherwise stated below.
@ -13,7 +13,7 @@
#
# Note: libtermcap and libtermlib are hardlinked and share the same version.
#
./lib/libc.so.12.161 base-sys-shlib
./lib/libc.so.12.162 base-sys-shlib
./lib/libcrypt.so.0.2 base-sys-shlib
./lib/libcrypto.so.4.1 base-crypto-shlib crypto
./lib/libedit.so.2.11 base-sys-shlib
@ -58,7 +58,7 @@
./usr/lib/libbluetooth.so.3.0 base-sys-shlib
./usr/lib/libbsdmalloc.so.0.0 base-sys-shlib
./usr/lib/libbz2.so.1.1 base-sys-shlib
./usr/lib/libc.so.12.161 base-sys-shlib
./usr/lib/libc.so.12.162 base-sys-shlib
./usr/lib/libcom_err.so.5.0 base-krb5-shlib kerberos
./usr/lib/libcrypt.so.0.2 base-sys-shlib
./usr/lib/libcrypto.so.4.1 base-crypto-shlib crypto

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.161 2008/06/17 00:10:54 he Exp $
# $NetBSD: Makefile.inc,v 1.162 2008/06/30 19:04:00 matt Exp $
# from: @(#)Makefile.inc 8.6 (Berkeley) 5/4/95
# gen sources
@ -20,7 +20,7 @@ SRCS+= _errno.c alarm.c alphasort.c arc4random.c assert.c basename.c clock.c \
nice.c nlist.c nlist_aout.c \
nlist_coff.c nlist_ecoff.c nlist_elf32.c nlist_elf64.c opendir.c \
pause.c popen.c psignal.c pthread_atfork.c pwcache.c \
pw_scan.c raise.c randomid.c readdir.c rewinddir.c \
pw_scan.c raise.c randomid.c rb.c readdir.c rewinddir.c \
scandir.c seekdir.c setdomainname.c \
sethostname.c setjmperr.c setmode.c setproctitle.c setprogname.c \
shquote.c shquotev.c sighold.c sigignore.c siginterrupt.c \

View File

@ -1,4 +1,4 @@
# $NetBSD: shlib_version,v 1.202 2008/06/25 11:12:01 ad Exp $
# $NetBSD: shlib_version,v 1.203 2008/06/30 19:04:00 matt Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
# things we wish to do on next major version bump:
@ -26,4 +26,4 @@
# - remove frexp, ldexp, modf: they belong to libm.
# - make sure we can support thread local [on arm don't use r9 for example]
major=12
minor=161
minor=162

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.88 2008/06/15 20:34:18 christos Exp $
# $NetBSD: Makefile,v 1.89 2008/06/30 19:03:59 matt Exp $
LIB= kern
NOPIC= # defined
@ -56,7 +56,6 @@ SRCS+= strtoll.c strtoull.c strtoumax.c
SRCS+= xlat_mbr_fstype.c
SRCS+= rb.c
COPTS.rb.c+= -Wno-missing-field-initializers
# Files to clean up
CLEANFILES+= lib${LIB}.o lib${LIB}.po