xref: /illumos-gate/usr/src/lib/smbsrv/libsmb/common/smb_sqlite.h (revision dd72704bd9e794056c558153663c739e2012d721)
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 sqlite *
42 sqlite_open(const char *filename __unused, int mode __unused,
43     char **errmsg __unused)
44 {
45 	return (NULL);
46 }
47 
48 void
49 sqlite_close(sqlite *db __unused)
50 {
51 }
52 
53 char *
54 sqlite_mprintf(const char *fmt __unused, ...)
55 {
56 	return (NULL);
57 }
58 
59 void
60 sqlite_freemem(void *p __unused)
61 {
62 }
63 
64 int
65 sqlite_compile(sqlite *db __unused, const char *zSql __unused,
66     const char **pzTail __unused, sqlite_vm **ppVm __unused,
67     char **pzErrmsg __unused)
68 {
69 	return (SQLITE_ERROR);
70 }
71 
72 void
73 sqlite_free_table(char **res __unused)
74 {
75 }
76 
77 int
78 sqlite_last_insert_rowid(sqlite *db __unused)
79 {
80 	return (-1);
81 }
82 
83 void
84 sqlite_busy_timeout(sqlite *db __unused, int ms __unused)
85 {
86 }
87 
88 int
89 sqlite_get_table(sqlite *db __unused, const char *zSql __unused,
90     char ***pazResult __unused, int *pnRow __unused,
91     int *pnColumn __unused, char **pzErrMsg __unused)
92 {
93 	return (SQLITE_ERROR);
94 }
95 
96 int
97 sqlite_step(sqlite_vm *pVm __unused, int *pN __unused,
98     const char ***pazValue __unused, const char ***pazColName __unused)
99 {
100 	return (SQLITE_ERROR);
101 }
102 
103 int
104 sqlite_exec(sqlite *db __unused, const char *zSql __unused,
105     sqlite_callback xCallback __unused, void *pArg __unused,
106     char **pzErrMsg __unused)
107 {
108 	return (SQLITE_ERROR);
109 }
110 
111 int
112 sqlite_finalize(sqlite_vm *pVm __unused, char **pzErrMsg __unused)
113 {
114 	return (SQLITE_ERROR);
115 }
116 #endif /* _LP64 */
117 
118 #ifdef	__cplusplus
119 }
120 #endif
121 
122 #endif	/* _SMB_SQLITE_H */
123