mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
We compile and link on Linux now, except for runTests
Add sqlite3 library Compile/link database code Don't use itoa Don't use stricmp
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
#include "SqliteDatabase.h"
|
#include "SqliteDatabase.h"
|
||||||
#include "sqlite3.h"
|
#include "sqlite3.h"
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@@ -154,7 +156,7 @@ void SqliteDatabase::escape(const unsigned char* start,int size,std::string& ret
|
|||||||
retStr.append("X'");
|
retStr.append("X'");
|
||||||
for(int n=0; n<size; n++)
|
for(int n=0; n<size; n++)
|
||||||
{
|
{
|
||||||
itoa(start[n],buf,16);
|
sprintf(buf, "%x", start[n]);
|
||||||
if(buf[1]==0)
|
if(buf[1]==0)
|
||||||
{
|
{
|
||||||
retStr.append("0");
|
retStr.append("0");
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <strings.h>
|
||||||
|
|
||||||
|
|
||||||
Database::Database(const char* host,const char* user,const char* pass) : mNumCol(0)
|
Database::Database(const char* host,const char* user,const char* pass) : mNumCol(0)
|
||||||
@@ -81,7 +82,7 @@ bool Database::getColNumber(const char* colName,int* retIndex)
|
|||||||
{
|
{
|
||||||
for(unsigned int n=0; n<mColNameTable.size(); n++)
|
for(unsigned int n=0; n<mColNameTable.size(); n++)
|
||||||
{
|
{
|
||||||
if(stricmp(colName,mColNameTable[n].c_str())==0)
|
if(strcasecmp(colName,mColNameTable[n].c_str())==0)
|
||||||
{
|
{
|
||||||
*retIndex=n;
|
*retIndex=n;
|
||||||
return(true);
|
return(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user