diff options
author | 2015-09-05 11:28:35 +0000 | |
---|---|---|
committer | 2015-09-05 11:28:35 +0000 | |
commit | 181ba704e22032b316f753be6b4064819e72ce76 (patch) | |
tree | d6da835085cc7c351446cdbcc5e9fc0239551f32 /lib/libc | |
parent | Use new framework for wrapping cat{open,gets,close}(), eliminating (diff) | |
download | wireguard-openbsd-181ba704e22032b316f753be6b4064819e72ce76.tar.xz wireguard-openbsd-181ba704e22032b316f753be6b4064819e72ce76.zip |
Use new framework for wrapping dbopen()
Move internal declarations from <db.h> to libc's hidden/db.h
ok kettenis@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/db/db/db.c | 3 | ||||
-rw-r--r-- | lib/libc/hidden/db.h | 33 |
2 files changed, 35 insertions, 1 deletions
diff --git a/lib/libc/db/db/db.c b/lib/libc/db/db/db.c index 8f54ccf451d..116f7bd4c3f 100644 --- a/lib/libc/db/db/db.c +++ b/lib/libc/db/db/db.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db.c,v 1.12 2015/05/11 06:31:17 guenther Exp $ */ +/* $OpenBSD: db.c,v 1.13 2015/09/05 11:28:35 guenther Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -66,6 +66,7 @@ dbopen(const char *fname, int flags, int mode, DBTYPE type, errno = EINVAL; return (NULL); } +DEF_WEAK(dbopen); static int __dberr(void) diff --git a/lib/libc/hidden/db.h b/lib/libc/hidden/db.h new file mode 100644 index 00000000000..ba3d1e72d54 --- /dev/null +++ b/lib/libc/hidden/db.h @@ -0,0 +1,33 @@ +/* $OpenBSD: db.h,v 1.1 2015/09/05 11:28:35 guenther Exp $ */ +/* + * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _LIBC_DB_H_ +#define _LIBC_DB_H_ + +#include_next <db.h> +#include "namespace.h" + +__BEGIN_HIDDEN_DECLS +DB *__bt_open(const char *, int, int, const BTREEINFO *, int); +DB *__hash_open(const char *, int, int, const HASHINFO *, int); +DB *__rec_open(const char *, int, int, const RECNOINFO *, int); +void __dbpanic(DB *dbp); +__END_HIDDEN_DECLS + +PROTO_NORMAL(dbopen); + +#endif /* !_LIBC_DB_H_ */ |