From: Kern Sibbald Date: Mon, 3 Jan 2005 21:16:54 +0000 (+0000) Subject: Minor doc changes X-Git-Tag: Release-7.0.0~9006 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c85fbc6db180073a3096a49efe8f58f6a6900755;p=bacula%2Fbacula Minor doc changes git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1785 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/cats/cats.h b/bacula/src/cats/cats.h index 4b98d9094b..3a5d3756de 100644 --- a/bacula/src/cats/cats.h +++ b/bacula/src/cats/cats.h @@ -48,6 +48,16 @@ typedef int (DB_RESULT_HANDLER)(void *, int, char **); #ifdef HAVE_SQLITE +#ifdef HAVE_SQLITE3 +#define sqlite_last_insert_rowid sqlite3_last_insert_rowid +#define sqlite_open sqlite3_open +#define sqlite_close sqlite3_close +#define sqlite_result sqlite3_result +#define sqlite_exec sqlite3_exec +#define sqlite_get_table sqlite3_get_table +#define sqlite_free_table sqlite3_free_table +#endif + #define BDB_VERSION 8 #include @@ -122,12 +132,17 @@ typedef struct s_db { #define sql_free_result(x) my_sqlite_free_table(x) #define sql_fetch_row(x) my_sqlite_fetch_row(x) #define sql_query(x, y) my_sqlite_query((x), (y)) +#ifdef HAVE_SQLITE3 +#define sql_insert_id(x,y) sqlite3_last_insert_rowid((x)->db) +#define sql_close(x) sqlite3_close((x)->db) +#else +#define sql_insert_id(x,y) sqlite_last_insert_rowid((x)->db) #define sql_close(x) sqlite_close((x)->db) +#endif #define sql_strerror(x) (x)->sqlite_errmsg?(x)->sqlite_errmsg:"unknown" #define sql_num_rows(x) (x)->nrow #define sql_data_seek(x, i) (x)->row = (i) #define sql_affected_rows(x) 1 -#define sql_insert_id(x,y) sqlite_last_insert_rowid((x)->db) #define sql_field_seek(x, y) my_sqlite_field_seek((x), (y)) #define sql_fetch_field(x) my_sqlite_fetch_field(x) #define sql_num_fields(x) ((x)->ncolumn) @@ -221,10 +236,10 @@ typedef struct s_db { typedef char **POSTGRESQL_ROW; typedef struct pg_field { - char *name; - int max_length; - unsigned int type; - unsigned int flags; // 1 == not null + char *name; + int max_length; + unsigned int type; + unsigned int flags; // 1 == not null } POSTGRESQL_FIELD;