xref: /titanic_50/usr/src/lib/smbsrv/libsmb/common/smb_sqlite.h (revision 5d0e1406420f52cc4d3d0543044034c4894b5865)
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 #ifdef	__cplusplus
30 extern "C" {
31 #endif
32 
33 #include <sqlite-sys/sqlite.h>
34 
35 #ifdef _LP64
36 /*
37  * We cannot make 64-bit version of libsqlite because the code
38  * has some problems.
39  */
40 
41 /*ARGSUSED*/
42 sqlite *
43 sqlite_open(const char *filename, int mode, char **errmsg)
44 {
45 	return (NULL);
46 }
47 
48 /*ARGSUSED*/
49 void
50 sqlite_close(sqlite *db)
51 {
52 }
53 
54 /*ARGSUSED*/
55 char *
56 sqlite_mprintf(const char *fmt, ...)
57 {
58 	return (NULL);
59 }
60 
61 /*ARGSUSED*/
62 void
63 sqlite_freemem(void *p)
64 {
65 }
66 
67 /*ARGSUSED*/
68 int
69 sqlite_compile(sqlite *db, const char *zSql, const char **pzTail,
70     sqlite_vm **ppVm, char **pzErrmsg)
71 {
72 	return (SQLITE_ERROR);
73 }
74 
75 /*ARGSUSED*/
76 void
77 sqlite_free_table(char **res)
78 {
79 }
80 
81 /*ARGSUSED*/
82 int
83 sqlite_last_insert_rowid(sqlite *db)
84 {
85 	return (-1);
86 }
87 
88 /*ARGSUSED*/
89 void
90 sqlite_busy_timeout(sqlite *db, int ms)
91 {
92 }
93 
94 /*ARGSUSED*/
95 int
96 sqlite_get_table(sqlite *db, const char *zSql, char ***pazResult, int *pnRow,
97     int *pnColumn, char **pzErrMsg)
98 {
99 	return (SQLITE_ERROR);
100 }
101 
102 /*ARGSUSED*/
103 int
104 sqlite_step(sqlite_vm *pVm, int *pN, const char ***pazValue,
105     const char ***pazColName)
106 {
107 	return (SQLITE_ERROR);
108 }
109 
110 /*ARGSUSED*/
111 int
112 sqlite_exec(sqlite *db, const char *zSql, sqlite_callback xCallback, void *pArg,
113     char **pzErrMsg)
114 {
115 	return (SQLITE_ERROR);
116 }
117 
118 /*ARGSUSED*/
119 int
120 sqlite_finalize(sqlite_vm *pVm, char **pzErrMsg)
121 {
122 	return (SQLITE_ERROR);
123 }
124 #endif /* _LP64 */
125 
126 #ifdef	__cplusplus
127 }
128 #endif
129 
130 #endif	/* _SMB_SQLITE_H */
131