sd: remove 'ssd' driver support
[unleashed/tickless.git] / usr / src / lib / libnisdb / yptol / shim_hooks.h
blobe04610b2a94efb6a6666c132f659cfe3bf1b3c6e
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef __SHIM_HOOKS_H
28 #define __SHIM_HOOKS_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
37 * DESCRIPTION: This file implements the hooks between old style DBM calls and
38 * the shim version of the same calls. By including this file a
39 * C files calls are diverted to the shim versions.
41 * Do NOT include this in the shim code itself or you will be
42 * unable to make real dbm calls.
44 * Do NOT include this in the client side NIS files.
46 * One day it may be possible to implement a more elegant version
47 * of this based on the linkers 'interposition' mechanism.
51 * Extern defs for new calls. Must have identical args to traditional version.
53 extern void shim_dbm_close(DBM *db);
54 extern int shim_dbm_delete(DBM *db, datum key);
55 extern datum shim_dbm_fetch(DBM *db, datum key);
56 extern datum shim_dbm_fetch_noupdate(DBM *db, datum key);
57 extern datum shim_dbm_firstkey(DBM *db);
58 extern datum shim_dbm_nextkey(DBM *db);
59 extern datum shim_dbm_do_nextkey(DBM *db, datum inkey);
60 extern DBM *shim_dbm_open(const char *file, int open_flags,
61 mode_t file_mode);
62 extern int shim_dbm_store(DBM *db, datum key, datum content,
63 int store_mode);
64 void shim_exit(int code);
67 * Externs for other function related to maps
69 extern char *get_map_name(DBM *);
72 * Hooks. Alias standard dbm call names to new calls
75 #define dbm_close shim_dbm_close
76 #define dbm_delete shim_dbm_delete
77 #define dbm_fetch shim_dbm_fetch
78 #define dbm_firstkey shim_dbm_firstkey
79 #define dbm_nextkey shim_dbm_nextkey
80 #define dbm_do_nextkey shim_dbm_do_nextkey
81 #define dbm_open shim_dbm_open
82 #define dbm_store shim_dbm_store
83 #define exit shim_exit
85 #ifdef __cplusplus
87 #endif
89 #endif /* __SHIM_HOOKS_H */