mirror of
https://github.com/php/php-src.git
synced 2025-08-20 01:14:28 +02:00
Upgraded bundled libsqlite to 2.8.11 (fixed critical bug of *NIX systems).
This commit is contained in:
parent
49b698c67e
commit
6e350b553b
20 changed files with 655 additions and 355 deletions
|
|
@ -252,7 +252,7 @@ char *sqliteStrNDup_(const char *z, int n, char *zFile, int line){
|
|||
void *sqliteMalloc(int n){
|
||||
void *p;
|
||||
if( (p = malloc(n))==0 ){
|
||||
sqlite_malloc_failed++;
|
||||
if( n>0 ) sqlite_malloc_failed++;
|
||||
}else{
|
||||
memset(p, 0, n);
|
||||
}
|
||||
|
|
@ -266,7 +266,7 @@ void *sqliteMalloc(int n){
|
|||
void *sqliteMallocRaw(int n){
|
||||
void *p;
|
||||
if( (p = malloc(n))==0 ){
|
||||
sqlite_malloc_failed++;
|
||||
if( n>0 ) sqlite_malloc_failed++;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
|
@ -664,7 +664,7 @@ int sqliteIsNumber(const char *z){
|
|||
*/
|
||||
double sqliteAtoF(const char *z){
|
||||
int sign = 1;
|
||||
double v1 = 0.0;
|
||||
LONGDOUBLE_TYPE v1 = 0.0;
|
||||
if( *z=='-' ){
|
||||
sign = -1;
|
||||
z++;
|
||||
|
|
@ -676,7 +676,7 @@ double sqliteAtoF(const char *z){
|
|||
z++;
|
||||
}
|
||||
if( *z=='.' ){
|
||||
double divisor = 1.0;
|
||||
LONGDOUBLE_TYPE divisor = 1.0;
|
||||
z++;
|
||||
while( isdigit(*z) ){
|
||||
v1 = v1*10.0 + (*z - '0');
|
||||
|
|
@ -688,7 +688,7 @@ double sqliteAtoF(const char *z){
|
|||
if( *z=='e' || *z=='E' ){
|
||||
int esign = 1;
|
||||
int eval = 0;
|
||||
double scale = 1.0;
|
||||
LONGDOUBLE_TYPE scale = 1.0;
|
||||
z++;
|
||||
if( *z=='-' ){
|
||||
esign = -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue