aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2001-11-21 02:21:11 +0000
committerdrh <drh@noemail.net>2001-11-21 02:21:11 +0000
commit5a2c2c20afafc116dbdc7f52ab07c95a69d582ba (patch)
tree4d92328993f521de9ffaa5ba57056a30a04abb14 /src/sqliteInt.h
parentbc1bd58acfab7d7f700226d229e1f732a58991b1 (diff)
downloadsqlite-5a2c2c20afafc116dbdc7f52ab07c95a69d582ba.tar.gz
sqlite-5a2c2c20afafc116dbdc7f52ab07c95a69d582ba.zip
Attempting to add support for 64-bit platforms. (CVS 314)
FossilOrigin-Name: 03673adbfe0c8a92d79f86ddf1136736594208ad
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r--src/sqliteInt.h35
1 files changed, 29 insertions, 6 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 8f5481edc..2a9235302 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
-** @(#) $Id: sqliteInt.h,v 1.69 2001/11/08 00:45:21 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.70 2001/11/21 02:21:12 drh Exp $
*/
#include "sqlite.h"
#include "hash.h"
@@ -31,12 +31,35 @@
#define TEMP_PAGES 25
/*
-** Integers of known sizes. These typedefs much change for architectures
-** where the sizes very.
+** Integers of known sizes. These typedefs might change for architectures
+** where the sizes very. Preprocessor macros are available so that the
+** types can be conveniently redefined at compile-type. Like this:
+**
+** cc '-DUINTPTR_TYPE=long long int' ...
+*/
+#ifndef UINT32_TYPE
+# define UINT32_TYPE unsigned int
+#endif
+#ifndef UINT16_TYPE
+# define UINT16_TYPE unsigned short int
+#endif
+#ifndef UINT8_TYPE
+# define UINT8_TYPE unsigned char
+#endif
+#ifndef INTPTR_TYPE
+# define INTPTR_TYPE int
+#endif
+typedef UINT32_TYPE u32; /* 4-byte unsigned integer */
+typedef UINT16_TYPE u16; /* 2-byte unsigned integer */
+typedef UINT8_TYPE u8; /* 1-byte unsigned integer */
+typedef INTPTR_TYPE ptr; /* Big enough to hold a pointer */
+typedef unsigned INTPTR_TYPE uptr; /* Big enough to hold a pointer */
+
+/*
+** This macro casts a pointer to an integer. Useful for doing
+** pointer arithmetic.
*/
-typedef unsigned int u32; /* 4-byte unsigned integer */
-typedef unsigned short int u16; /* 2-byte unsigned integer */
-typedef unsigned char u8; /* 1-byte unsigned integer */
+#define Addr(X) ((uptr)X)
/*
** The maximum number of bytes of data that can be put into a single