aboutsummaryrefslogtreecommitdiff
path: root/ext/misc/json1.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-10-10 14:00:37 +0000
committerdrh <drh@noemail.net>2015-10-10 14:00:37 +0000
commit9a4718ff7385123d85caf8b6bbe219f182da6bd0 (patch)
tree201a1db927bf5aade62951668c5d32bda076016b /ext/misc/json1.c
parenta0882fad7c02f183292998f2a99a72af2327c807 (diff)
downloadsqlite-9a4718ff7385123d85caf8b6bbe219f182da6bd0.tar.gz
sqlite-9a4718ff7385123d85caf8b6bbe219f182da6bd0.zip
Add some #ifdef-ery to json1.c to avoid a duplicate typedef when used in the
amalgamation, since some compilers become upset over duplicate typedefs. FossilOrigin-Name: de28acd42f29693341feb884b7223cd3d2b96730
Diffstat (limited to 'ext/misc/json1.c')
-rw-r--r--ext/misc/json1.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ext/misc/json1.c b/ext/misc/json1.c
index fa36419cf..c968011ee 100644
--- a/ext/misc/json1.c
+++ b/ext/misc/json1.c
@@ -71,10 +71,13 @@ static const char jsonIsSpace[] = {
};
#define safe_isspace(x) (jsonIsSpace[(unsigned char)x])
-/* Unsigned integer types */
-typedef sqlite3_uint64 u64;
-typedef unsigned int u32;
-typedef unsigned char u8;
+#ifndef SQLITE_AMALGAMATION
+ /* Unsigned integer types. These are already defined in the sqliteInt.h,
+ ** but the definitions need to be repeated for separate compilation. */
+ typedef sqlite3_uint64 u64;
+ typedef unsigned int u32;
+ typedef unsigned char u8;
+#endif
/* Objects */
typedef struct JsonString JsonString;