xref: /titanic_41/usr/src/lib/smbsrv/libsmb/common/smb_sqlite.h (revision 0bb073995ac5a95bd35f2dd790df1ea3d8c2d507)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_SMB_SQLITE_H
27 #define	_SMB_SQLITE_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 #ifdef	__cplusplus
32 extern "C" {
33 #endif
34 
35 #include <sqlite/sqlite.h>
36 
37 #ifdef _LP64
38 /*
39  * We cannot make 64-bit version of libsqlite because the code
40  * has some problems.
41  */
42 
43 /*ARGSUSED*/
44 sqlite *
45 sqlite_open(const char *filename, int mode, char **errmsg)
46 {
47 	return (NULL);
48 }
49 
50 /*ARGSUSED*/
51 void
52 sqlite_close(sqlite *db)
53 {
54 }
55 
56 /*ARGSUSED*/
57 char *
58 sqlite_mprintf(const char *fmt, ...)
59 {
60 	return (NULL);
61 }
62 
63 /*ARGSUSED*/
64 void
65 sqlite_freemem(void *p)
66 {
67 }
68 
69 /*ARGSUSED*/
70 int
71 sqlite_compile(sqlite *db, const char *zSql, const char **pzTail,
72     sqlite_vm **ppVm, char **pzErrmsg)
73 {
74 	return (SQLITE_ERROR);
75 }
76 
77 /*ARGSUSED*/
78 void
79 sqlite_free_table(char **res)
80 {
81 }
82 
83 /*ARGSUSED*/
84 int
85 sqlite_last_insert_rowid(sqlite *db)
86 {
87 	return (-1);
88 }
89 
90 /*ARGSUSED*/
91 void
92 sqlite_busy_timeout(sqlite *db, int ms)
93 {
94 }
95 
96 /*ARGSUSED*/
97 int
98 sqlite_get_table(sqlite *db, const char *zSql, char ***pazResult, int *pnRow,
99     int *pnColumn, char **pzErrMsg)
100 {
101 	return (SQLITE_ERROR);
102 }
103 
104 /*ARGSUSED*/
105 int
106 sqlite_step(sqlite_vm *pVm, int *pN, const char ***pazValue,
107     const char ***pazColName)
108 {
109 	return (SQLITE_ERROR);
110 }
111 
112 /*ARGSUSED*/
113 int
114 sqlite_exec(sqlite *db, const char *zSql, sqlite_callback xCallback, void *pArg,
115     char **pzErrMsg)
116 {
117 	return (SQLITE_ERROR);
118 }
119 
120 /*ARGSUSED*/
121 int
122 sqlite_finalize(sqlite_vm *pVm, char **pzErrMsg)
123 {
124 	return (SQLITE_ERROR);
125 }
126 #endif /* _LP64 */
127 
128 #ifdef	__cplusplus
129 }
130 #endif
131 
132 #endif	/* _SMB_SQLITE_H */
133