mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Patch around compilers that do not support "long long int". (CVS 1656)
FossilOrigin-Name: d98b1502e2947d24ab9f4a5d2e5b9a95dde92faf
This commit is contained in:
24
manifest
24
manifest
@@ -1,5 +1,5 @@
|
||||
C Add\sos_test.c.\sNot\sactivated\syet.\s(CVS\s1655)
|
||||
D 2004-06-22T11:29:02
|
||||
C Patch\saround\scompilers\sthat\sdo\snot\ssupport\s"long\slong\sint".\s(CVS\s1656)
|
||||
D 2004-06-22T12:13:55
|
||||
F Makefile.in 0a3d7aaefa50717bd550b0cf568a51072c4c103c
|
||||
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
||||
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
|
||||
@@ -38,7 +38,7 @@ F src/hash.c 440c2f8cb373ee1b4e13a0988489c7cd95d55b6f
|
||||
F src/hash.h 762d95f1e567664d1eafc1687de755626be962fb
|
||||
F src/insert.c d99ffe87e1e1397f4233afcd06841d52d6b17b18
|
||||
F src/legacy.c ad23746f15f67e34577621b1875f639c94839e1f
|
||||
F src/main.c 5bf387a22ff6e17c8e60d2fbb940e98a78f5d501
|
||||
F src/main.c 2a4f3fe32ee6357b5b914ab5e2bd0979202570f4
|
||||
F src/md5.c 7ae1c39044b95de2f62e066f47bb1deb880a1070
|
||||
F src/os.h 2f5ea879b784bc82aac8022a3e8fe00b73c83d67
|
||||
F src/os_common.h ba1b7306e16e2091718f2c48db0fe6c1d7a31bb8
|
||||
@@ -54,12 +54,12 @@ F src/pager.c d9d3f577319ebac6670d3f44eca46060b78ee6b2
|
||||
F src/pager.h bc58d32a9dee464f7268fb68652c130a4216e438
|
||||
F src/parse.y 097438674976355a10cf177bd97326c548820b86
|
||||
F src/pragma.c 0750e1c360647dbe0a991f16133b0fe5e42e5039
|
||||
F src/printf.c 823b6a5cbedb6971a9e62f5d83204fe9b0be7c1b
|
||||
F src/printf.c afe30ac12d12afad294b4bceebc07316ed8ee171
|
||||
F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
|
||||
F src/select.c f02a65af34231031896e8442161cb5251e191e75
|
||||
F src/shell.c 24b641700c9d90f361fcfa4f432c5b4aff704e6d
|
||||
F src/sqlite.h.in a3d593016d1a1a514d7a26c8a353b58caf62e798
|
||||
F src/sqliteInt.h 0aa0b24208eeb46290baf8b6ae5ca36fed8a58d3
|
||||
F src/sqlite.h.in 1f400a561fca3b1df73677d2d97046425d47cae4
|
||||
F src/sqliteInt.h dd796b6abc6d50505fe33c54f0143d7000681a41
|
||||
F src/table.c af14284fa36c8d41f6829e3f2819dce07d3e2de2
|
||||
F src/tclsqlite.c 8d093146332b2f0cbf2a8ebe8597d481619308a3
|
||||
F src/test1.c ee426e026ad9223483e7a84bb68849fc6e9f542e
|
||||
@@ -75,8 +75,8 @@ F src/util.c e31e35d3d76cab7a02045095064897eca49cbce3
|
||||
F src/vacuum.c fcb930215a3f6c50087300782555f61ad11dd80c
|
||||
F src/vdbe.c 5da73f61016b1874d935b522bab6ca8b5aa15216
|
||||
F src/vdbe.h 2d87155e31e84bb00cdc48cc1ce6987a3a484250
|
||||
F src/vdbeInt.h c0740932621a8d4aac20e0c4235ce44eb5e8dce6
|
||||
F src/vdbeapi.c 8a9421341e09b506a934132c9015f26362ae8c0e
|
||||
F src/vdbeInt.h 0b8eda5e0a1331d23b38d7888f187119a3491b40
|
||||
F src/vdbeapi.c d3659f3f2982e79c06ab8e338604a39e0ea0d2d3
|
||||
F src/vdbeaux.c 9fe01087f2ddc410827b6e124fc423d429e6f5a1
|
||||
F src/vdbemem.c 9359c53386e070fea9f5403cab0c6f0cfe36496b
|
||||
F src/where.c 6507074d8ce3f78e7a4cd33f667f11e62020553e
|
||||
@@ -227,7 +227,7 @@ F www/tclsqlite.tcl 19191cf2a1010eaeff74c51d83fd5f5a4d899075
|
||||
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
|
||||
F www/version3.tcl af528563442e3039928f9018327a18157e53a44f
|
||||
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
|
||||
P 819a5973d15bf619182e47abd9b9dca2a560d8ff
|
||||
R 9995119681c1ca663fd04d3e87f63e78
|
||||
U danielk1977
|
||||
Z 48006eb9b98a86dcff4611e010a83567
|
||||
P d16b863849d1aa887fe403e25153b1e9df6b837e
|
||||
R 85dc3ae43867f14feba3557419001a96
|
||||
U drh
|
||||
Z bbfe7d28a769302b653c6e45868a429e
|
||||
|
@@ -1 +1 @@
|
||||
d16b863849d1aa887fe403e25153b1e9df6b837e
|
||||
d98b1502e2947d24ab9f4a5d2e5b9a95dde92faf
|
@@ -14,7 +14,7 @@
|
||||
** other files are for internal use by SQLite and should not be
|
||||
** accessed by users of the library.
|
||||
**
|
||||
** $Id: main.c,v 1.232 2004/06/21 08:18:52 danielk1977 Exp $
|
||||
** $Id: main.c,v 1.233 2004/06/22 12:13:55 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -436,7 +436,7 @@ static int nocaseCollatingFunc(
|
||||
/*
|
||||
** Return the ROWID of the most recent insert
|
||||
*/
|
||||
long long int sqlite3_last_insert_rowid(sqlite *db){
|
||||
sqlite_int64 sqlite3_last_insert_rowid(sqlite *db){
|
||||
return db->lastRowid;
|
||||
}
|
||||
|
||||
|
@@ -345,7 +345,7 @@ static int vxprintf(
|
||||
*/
|
||||
switch( xtype ){
|
||||
case etRADIX:
|
||||
if( flag_longlong ) longvalue = va_arg(ap,INT64_TYPE);
|
||||
if( flag_longlong ) longvalue = va_arg(ap,sqlite_int64);
|
||||
else if( flag_long ) longvalue = va_arg(ap,long int);
|
||||
else longvalue = va_arg(ap,int);
|
||||
#if 1
|
||||
|
@@ -12,7 +12,7 @@
|
||||
** This header file defines the interface that the SQLite library
|
||||
** presents to client programs.
|
||||
**
|
||||
** @(#) $Id: sqlite.h.in,v 1.105 2004/06/21 06:50:28 danielk1977 Exp $
|
||||
** @(#) $Id: sqlite.h.in,v 1.106 2004/06/22 12:13:55 drh Exp $
|
||||
*/
|
||||
#ifndef _SQLITE_H_
|
||||
#define _SQLITE_H_
|
||||
@@ -44,6 +44,18 @@ extern const char sqlite3_version[];
|
||||
typedef struct sqlite sqlite3;
|
||||
|
||||
|
||||
/*
|
||||
** Some compilers do not support the "long long" datatype. So we have
|
||||
** to do a typedef that for 64-bit integers that depends on what compiler
|
||||
** is being used.
|
||||
*/
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
typedef __int64 sqlite_int64;
|
||||
#else
|
||||
typedef long long int sqlite_int64;
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
** A function to close the database.
|
||||
**
|
||||
@@ -152,7 +164,7 @@ int sqlite3_exec(
|
||||
**
|
||||
** This function is similar to the mysql_insert_id() function from MySQL.
|
||||
*/
|
||||
long long int sqlite3_last_insert_rowid(sqlite3*);
|
||||
sqlite_int64 sqlite3_last_insert_rowid(sqlite3*);
|
||||
|
||||
/*
|
||||
** This function returns the number of database rows that were changed
|
||||
@@ -623,7 +635,7 @@ typedef struct Mem sqlite3_value;
|
||||
int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
|
||||
int sqlite3_bind_double(sqlite3_stmt*, int, double);
|
||||
int sqlite3_bind_int(sqlite3_stmt*, int, int);
|
||||
int sqlite3_bind_int64(sqlite3_stmt*, int, long long int);
|
||||
int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite_int64);
|
||||
int sqlite3_bind_null(sqlite3_stmt*, int);
|
||||
int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*));
|
||||
int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
|
||||
@@ -802,7 +814,7 @@ int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
|
||||
int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
|
||||
double sqlite3_column_double(sqlite3_stmt*, int iCol);
|
||||
int sqlite3_column_int(sqlite3_stmt*, int iCol);
|
||||
long long int sqlite3_column_int64(sqlite3_stmt*, int iCol);
|
||||
sqlite_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
|
||||
const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
|
||||
const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
|
||||
int sqlite3_column_type(sqlite3_stmt*, int iCol);
|
||||
@@ -908,7 +920,7 @@ int sqlite3_value_bytes(sqlite3_value*);
|
||||
int sqlite3_value_bytes16(sqlite3_value*);
|
||||
double sqlite3_value_double(sqlite3_value*);
|
||||
int sqlite3_value_int(sqlite3_value*);
|
||||
long long int sqlite3_value_int64(sqlite3_value*);
|
||||
sqlite_int64 sqlite3_value_int64(sqlite3_value*);
|
||||
const unsigned char *sqlite3_value_text(sqlite3_value*);
|
||||
const void *sqlite3_value_text16(sqlite3_value*);
|
||||
const void *sqlite3_value_text16le(sqlite3_value*);
|
||||
@@ -986,7 +998,7 @@ void sqlite3_result_double(sqlite3_context*, double);
|
||||
void sqlite3_result_error(sqlite3_context*, const char*, int);
|
||||
void sqlite3_result_error16(sqlite3_context*, const void*, int);
|
||||
void sqlite3_result_int(sqlite3_context*, int);
|
||||
void sqlite3_result_int64(sqlite3_context*, long long int);
|
||||
void sqlite3_result_int64(sqlite3_context*, sqlite_int64);
|
||||
void sqlite3_result_null(sqlite3_context*);
|
||||
void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
|
||||
void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
|
||||
|
@@ -11,7 +11,7 @@
|
||||
*************************************************************************
|
||||
** Internal interface definitions for SQLite.
|
||||
**
|
||||
** @(#) $Id: sqliteInt.h,v 1.298 2004/06/22 11:29:02 danielk1977 Exp $
|
||||
** @(#) $Id: sqliteInt.h,v 1.299 2004/06/22 12:13:55 drh Exp $
|
||||
*/
|
||||
#ifndef _SQLITEINT_H_
|
||||
#define _SQLITEINT_H_
|
||||
@@ -99,12 +99,13 @@
|
||||
**
|
||||
** cc '-DUINTPTR_TYPE=long long int' ...
|
||||
*/
|
||||
#ifndef INT64_TYPE
|
||||
# define INT64_TYPE long long int
|
||||
#endif
|
||||
#ifndef UINT64_TYPE
|
||||
# if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
# define UINT64_TYPE unsigned __int64
|
||||
# else
|
||||
# define UINT64_TYPE unsigned long long int
|
||||
# endif
|
||||
#endif
|
||||
#ifndef UINT32_TYPE
|
||||
# define UINT32_TYPE unsigned int
|
||||
#endif
|
||||
@@ -117,14 +118,17 @@
|
||||
#ifndef INT8_TYPE
|
||||
# define INT8_TYPE signed char
|
||||
#endif
|
||||
#ifndef LONGDOUBLE_TYPE
|
||||
# define LONGDOUBLE_TYPE long double
|
||||
#endif
|
||||
#ifndef INTPTR_TYPE
|
||||
# if SQLITE_PTR_SZ==4
|
||||
# define INTPTR_TYPE int
|
||||
# else
|
||||
# define INTPTR_TYPE long long
|
||||
# define INTPTR_TYPE sqlite_int64
|
||||
# endif
|
||||
#endif
|
||||
typedef INT64_TYPE i64; /* 8-byte signed integer */
|
||||
typedef sqlite_int64 i64; /* 8-byte signed integer */
|
||||
typedef UINT64_TYPE u64; /* 8-byte unsigned integer */
|
||||
typedef UINT32_TYPE u32; /* 4-byte unsigned integer */
|
||||
typedef UINT16_TYPE u16; /* 2-byte unsigned integer */
|
||||
@@ -149,15 +153,6 @@ typedef struct sqlite sqlite;
|
||||
#include "vdbe.h"
|
||||
#include "btree.h"
|
||||
|
||||
/*
|
||||
** Most C compilers these days recognize "long double", don't they?
|
||||
** Just in case we encounter one that does not, we will create a macro
|
||||
** for long double so that it can be easily changed to just "double".
|
||||
*/
|
||||
#ifndef LONGDOUBLE_TYPE
|
||||
# define LONGDOUBLE_TYPE long double
|
||||
#endif
|
||||
|
||||
/*
|
||||
** This macro casts a pointer to an integer. Useful for doing
|
||||
** pointer arithmetic.
|
||||
|
@@ -385,7 +385,7 @@ int sqlite3VdbeMemCopy(Mem*, const Mem*);
|
||||
int sqlite3VdbeMemMove(Mem*, Mem*);
|
||||
int sqlite3VdbeMemNulTerminate(Mem*);
|
||||
int sqlite3VdbeMemSetStr(Mem*, const char*, int, u8, void(*)(void*));
|
||||
void sqlite3VdbeMemSetInt64(Mem*, long long int);
|
||||
void sqlite3VdbeMemSetInt64(Mem*, i64);
|
||||
void sqlite3VdbeMemSetDouble(Mem*, double);
|
||||
void sqlite3VdbeMemSetNull(Mem*);
|
||||
int sqlite3VdbeMemMakeWriteable(Mem*);
|
||||
|
@@ -52,7 +52,7 @@ int sqlite3_value_int(sqlite3_value *pVal){
|
||||
sqlite3VdbeMemIntegerify(pMem);
|
||||
return (int)pVal->i;
|
||||
}
|
||||
long long int sqlite3_value_int64(sqlite3_value *pVal){
|
||||
sqlite_int64 sqlite3_value_int64(sqlite3_value *pVal){
|
||||
Mem *pMem = (Mem *)pVal;
|
||||
sqlite3VdbeMemIntegerify(pMem);
|
||||
return pVal->i;
|
||||
@@ -324,7 +324,7 @@ double sqlite3_column_double(sqlite3_stmt *pStmt, int i){
|
||||
int sqlite3_column_int(sqlite3_stmt *pStmt, int i){
|
||||
return sqlite3_value_int( columnMem(pStmt,i) );
|
||||
}
|
||||
long long int sqlite3_column_int64(sqlite3_stmt *pStmt, int i){
|
||||
sqlite_int64 sqlite3_column_int64(sqlite3_stmt *pStmt, int i){
|
||||
return sqlite3_value_int64( columnMem(pStmt,i) );
|
||||
}
|
||||
const unsigned char *sqlite3_column_text(sqlite3_stmt *pStmt, int i){
|
||||
@@ -468,9 +468,9 @@ int sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){
|
||||
return SQLITE_OK;
|
||||
}
|
||||
int sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){
|
||||
return sqlite3_bind_int64(p, i, (long long int)iValue);
|
||||
return sqlite3_bind_int64(p, i, (i64)iValue);
|
||||
}
|
||||
int sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, long long int iValue){
|
||||
int sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){
|
||||
int rc;
|
||||
Vdbe *p = (Vdbe *)pStmt;
|
||||
rc = vdbeUnbind(p, i);
|
||||
|
Reference in New Issue
Block a user