summaryrefslogtreecommitdiff
path: root/ext/sqlite/libsqlite/src/sqlite.h.in
diff options
context:
space:
mode:
Diffstat (limited to 'ext/sqlite/libsqlite/src/sqlite.h.in')
-rw-r--r--ext/sqlite/libsqlite/src/sqlite.h.in22
1 files changed, 20 insertions, 2 deletions
diff --git a/ext/sqlite/libsqlite/src/sqlite.h.in b/ext/sqlite/libsqlite/src/sqlite.h.in
index 11edb43489..a823f5b2e6 100644
--- a/ext/sqlite/libsqlite/src/sqlite.h.in
+++ b/ext/sqlite/libsqlite/src/sqlite.h.in
@@ -28,7 +28,11 @@ extern "C" {
/*
** The version of the SQLite library.
*/
-#define SQLITE_VERSION "--VERS--"
+#ifdef SQLITE_VERSION
+# undef SQLITE_VERSION
+#else
+# define SQLITE_VERSION "--VERS--"
+#endif
/*
** The version string is also compiled into the library so that a program
@@ -479,10 +483,24 @@ int sqlite_function_type(
int datatype /* The datatype for this function */
);
#define SQLITE_NUMERIC (-1)
-#define SQLITE_TEXT (-2)
+/* #define SQLITE_TEXT (-2) // See below */
#define SQLITE_ARGS (-3)
/*
+** SQLite version 3 defines SQLITE_TEXT differently. To allow both
+** version 2 and version 3 to be included, undefine them both if a
+** conflict is seen. Define SQLITE2_TEXT to be the version 2 value.
+*/
+#ifdef SQLITE_TEXT
+# undef SQLITE_TEXT
+#else
+# define SQLITE_TEXT (-2)
+#endif
+#define SQLITE2_TEXT (-2)
+
+
+
+/*
** The user function implementations call one of the following four routines
** in order to return their results. The first parameter to each of these
** routines is a copy of the first argument to xFunc() or xFinialize().