diff --git a/buildheader/sample_offsets.c b/buildheader/sample_offsets.c index e0c04a6612ed393699b91e22a281cbc24597c311..28f344c670ce6c294f8814d066dced04df247070 100644 --- a/buildheader/sample_offsets.c +++ b/buildheader/sample_offsets.c @@ -88,12 +88,37 @@ void sample_db_txn_offsets (void) { void sample_dbc_offsets (void) { field_counter=0; - STRUCT_SETUP(DBC, c_get, "int (*%s) (DBC *, DBT *, DBT *, u_int32_t)"); STRUCT_SETUP(DBC, c_close, "int (*%s) (DBC *)"); STRUCT_SETUP(DBC, c_del, "int (*%s) (DBC *, u_int32_t)"); + STRUCT_SETUP(DBC, c_get, "int (*%s) (DBC *, DBT *, DBT *, u_int32_t)"); sort_and_dump_fields("dbc", sizeof(DBC)); } +void sample_db_env_offsets (void) { + field_counter=0; + STRUCT_SETUP(DB_ENV, close, "int (*%s) (DB_ENV *, u_int32_t)"); + STRUCT_SETUP(DB_ENV, err, "void (*%s) (const DB_ENV *, int, const char *, ...)"); + STRUCT_SETUP(DB_ENV, log_archive, "int (*%s) (DB_ENV *, char **[], u_int32_t)"); + STRUCT_SETUP(DB_ENV, log_flush, "int (*%s) (DB_ENV *, const DB_LSN *)"); + STRUCT_SETUP(DB_ENV, open, "int (*%s) (DB_ENV *, const char *, u_int32_t, int)"); + STRUCT_SETUP(DB_ENV, set_cachesize, "int (*%s) (DB_ENV *, u_int32_t, u_int32_t, int)"); + STRUCT_SETUP(DB_ENV, set_data_dir, "int (*%s) (DB_ENV *, const char *)"); + STRUCT_SETUP(DB_ENV, set_errcall, "void (*%s) (DB_ENV *, void (*)(const char *, char *))"); + STRUCT_SETUP(DB_ENV, set_errpfx, "void (*%s) (DB_ENV *, const char *)"); + STRUCT_SETUP(DB_ENV, set_flags, "int (*%s) (DB_ENV *, u_int32_t, int)"); + STRUCT_SETUP(DB_ENV, set_lg_bsize, "int (*%s) (DB_ENV *, u_int32_t)"); + STRUCT_SETUP(DB_ENV, set_lg_dir, "int (*%s) (DB_ENV *, const char *)"); + STRUCT_SETUP(DB_ENV, set_lg_max, "int (*%s) (DB_ENV *, u_int32_t)"); + STRUCT_SETUP(DB_ENV, set_lk_detect, "int (*%s) (DB_ENV *, u_int32_t)"); + STRUCT_SETUP(DB_ENV, set_lk_max, "int (*%s) (DB_ENV *, u_int32_t)"); + STRUCT_SETUP(DB_ENV, set_noticecall, "void (*%s) (DB_ENV *, void (*)(DB_ENV *, db_notices))"); + STRUCT_SETUP(DB_ENV, set_tmp_dir, "int (*%s) (DB_ENV *, const char *)"); + STRUCT_SETUP(DB_ENV, set_verbose, "int (*%s) (DB_ENV *, u_int32_t, int)"); + STRUCT_SETUP(DB_ENV, txn_checkpoint, "int (*%s) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)"); + STRUCT_SETUP(DB_ENV, txn_stat, "int (*%s) (DB_ENV *, DB_TXN_STAT **, u_int32_t)"); + sort_and_dump_fields("db_env", sizeof(DB_ENV)); +} + int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__unused__))) { @@ -103,5 +128,6 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__un sample_dbt_offsets(); sample_db_txn_offsets(); sample_dbc_offsets(); + sample_db_env_offsets(); return 0; } diff --git a/buildheader/sample_offsets_32.h b/buildheader/sample_offsets_32.h index 83f72a2b461f203223c25e90ac6a9efe4077d35e..1a5951018835f0b988d02b022b57dd9a2d2554a4 100644 --- a/buildheader/sample_offsets_32.h +++ b/buildheader/sample_offsets_32.h @@ -34,3 +34,26 @@ struct fieldinfo dbc_fields32[] = { {"int (*c_get) (DBC *, DBT *, DBT *, u_int32_t)", 220, 4}, {0, 0, 268} /* size of whole struct */ }; +struct fieldinfo db_env_fields32[] = { + {"int (*close) (DB_ENV *, u_int32_t)", 248, 4}, + {"void (*err) (const DB_ENV *, int, const char *, ...)", 260, 4}, + {"int (*open) (DB_ENV *, const char *, u_int32_t, int)", 268, 4}, + {"int (*set_data_dir) (DB_ENV *, const char *)", 276, 4}, + {"void (*set_errcall) (DB_ENV *, void (*)(const char *, char *))", 292, 4}, + {"void (*set_errpfx) (DB_ENV *, const char *)", 300, 4}, + {"int (*set_flags) (DB_ENV *, u_int32_t, int)", 308, 4}, + {"void (*set_noticecall) (DB_ENV *, void (*)(DB_ENV *, db_notices))", 312, 4}, + {"int (*set_tmp_dir) (DB_ENV *, const char *)", 332, 4}, + {"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 336, 4}, + {"int (*set_lg_bsize) (DB_ENV *, u_int32_t)", 344, 4}, + {"int (*set_lg_dir) (DB_ENV *, const char *)", 348, 4}, + {"int (*set_lg_max) (DB_ENV *, u_int32_t)", 352, 4}, + {"int (*log_archive) (DB_ENV *, char **[], u_int32_t)", 360, 4}, + {"int (*log_flush) (DB_ENV *, const DB_LSN *)", 372, 4}, + {"int (*set_lk_detect) (DB_ENV *, u_int32_t)", 392, 4}, + {"int (*set_lk_max) (DB_ENV *, u_int32_t)", 396, 4}, + {"int (*set_cachesize) (DB_ENV *, u_int32_t, u_int32_t, int)", 460, 4}, + {"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 552, 4}, + {"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 564, 4}, + {0, 0, 584} /* size of whole struct */ +};