ELF4T4 (44PPPPPPPPtPPhPdd /usr/lib/ld.so.1;HQ;9  "#$&*,-.0123457 !%'()+/68 %0 Fp R_k%x`+ $S4lv xRDt  R"(R2;B SZ b+hPqy   +t+/$   -S6PP>XR!FdT_f zPP$ S`RT4=XR  Ddb_codegenfsr.scrti.svalues-Xa.ccrtstuff.c__do_global_dtors_auxframe_dummydb_codegen.ccode_capi.ccode_parse.c__do_global_ctors_auxcrtn.s_endstrchr__fsr__deregister_frame_info_bases___Argv__config_splitfprintf__db_rpath___errnoapi_c__longdouble_used_get_exit_frame_monitor_edatadb_strerrorfwrite__fsr_init_valueoptind_mcount_init_DYNAMIC__ctypestrcmp__1cG__CrunMdo_exit_code6F_v_atexit_PROCEDURE_LINKAGE_TABLE_main_finiputsdb_version__os_calloc_lib_version__fpstart_start__ioboptarg__register_frame_info_basesenv_tree_etext_environ__db_getulongstrcasecmpgetopt_Jv_RegisterClassesfopen64_GLOBAL_OFFSET_TABLE_fgetsprogname__environ_lock__os_strdupfclose_exitparse_inputfreopen64libc.so.1SUNW_1.1SUNW_0.7SYSVABI_1.3SUNWprivate_1.1libdb-4.7.solibresolv.so.2libsocket.so.1libpthread.so.1/usr/local/BerkeleyDB.4.7/lib'= (= 7qN  '0 (D!)-<"6?4>lPRRtP%|P,PPP#P$\P`P!dP4hP7pPxP%PP+PP8P PP*PPPP-P/PPP2P)PP P3PP 5TP%XP%\Ph%`Ph%dPh%hPh%pPh %xPh(%Ph0%Ph8p%Ph@`%PhHP%PhP@%PhX0%Ph` %Phh%Php%Phx%Ph%Ph%Ph%Ph%Ph%Ph%Ph%Php%Ph`%PhP%Ph@jjPt R/h+"|RtRt PEXRu TXRRU xRRP#R$D$D$$URQ R tX<$уR $t$$у`tƒ 3f$$f $tf$$f $,$YZ]ÐÐUVSV>u]lh)9s h9r拃t$ƃ[^]US\=$t$D$\$ D$$pt,t p$Ѓ[]Ë$ÐUWVSb=Du 0@$a8<D$4D$<D$8D$0E|$t$$%V v88D$\D$D $D[^_]ft&<D$4fDT$8D$D$$Z$T$8D$8D$ DD$D$B $^\D$0D$,T$,4D$$tD$<6D$D$,$ND$<T$,:D$$(>D$D$,$ D$<mD$D$$$D1[^_]Ë&dU;?D4$A ¸N00  #include #include #include #include #ifdef _WIN32 #include #define mkdir(dir, perm) _mkdir(dir) #endif #include "db.h" /* Global environment and database handles for use by the application */ DB_ENV *%s_dbenv; /* Database environment handle */ DB *%s; /* Database handle */ DB *%s_%s; /* Database handle */ /* Public functions for use by the application */ int bdb_startup(void); int bdb_shutdown(void); static int bdb_%s_callback(DB *secondary, const DBT *key, const DBT *data , DBT *result) { secondary->errx(secondary, "%s: missing callback comparison function"); return (DB_DONOTINDEX); } Warning: you must write a comparison function for the %s database result->data = &((u_int8_t *)data->data)[%d]; result->size = %d; return (0); } static int bdb_%s_compare(DB *, const DBT *, const DBT *); static int bdb_%s_compare(DB *dbp, const DBT *a, const DBT *b) { %s ai, bi; memcpy(&ai, a->data, sizeof(ai)); memcpy(&bi, b->data, sizeof(bi)); return (ai < bi ? -1 : (ai > bi ? 1 : 0)); } /* DB_ENV initialization structures */ typedef struct { DB_ENV **envpp; char *home; u_int32_t gbytes; u_int32_t bytes; u_int32_t ncache; int private; int transaction; } env_list_t; static env_list_t env_list[] = { %s { &%s_dbenv, "%s", %lu, %lu, %lu, %d, %d/* DB initialization structures */ typedef struct db_list_t { DB_ENV **envpp; DB **dbpp; char *name; DBTYPE type; u_int32_t extentsize; u_int32_t pagesize; u_int32_t re_len; int (*key_compare)(DB *, const DBT *, const DBT *); DB **primaryp; int (*secondary_callback)(DB *, const DBT *, const DBT *, DBT *); int dupsort; int recnum; int transaction; } db_list_t; static db_list_t db_list[] = { %s { %s%s%s, &%s%s%s, "%s", %s, %lu, %lu, %lu, %s%s%s, %s%s%s%s, %s%s%s, %d, %d, %d#ifdef BUILD_STANDALONE int main() { return (bdb_startup() && bdb_shutdown() ? EXIT_FAILURE : EXIT_SUCCESS); } #endif static int bdb_env_startup(env_list_t *); static int bdb_env_shutdown(env_list_t *); static int bdb_db_startup(db_list_t *); static int bdb_db_shutdown(db_list_t *); /* * bdb_startup -- * Start up the environments and databases. */ int bdb_startup() { u_int i; /* Open environments. */ for (i = 0; i < sizeof(env_list) / sizeof(env_list[0]); ++i) if (bdb_env_startup(&env_list[i])) return (1); /* Open primary databases. */ for (i = 0; i < sizeof(db_list) / sizeof(db_list[0]); ++i) if (db_list[i].primaryp == NULL && bdb_db_startup(&db_list[i])) return (1); /* Open secondary databases. */ for (i = 0; i < sizeof(db_list) / sizeof(db_list[0]); ++i) if (db_list[i].primaryp != NULL && bdb_db_startup(&db_list[i])) return (1); return (0); } /* * bdb_shutdown -- * Shut down the environments and databases. */ int bdb_shutdown() { u_int i; /* Close secondary databases. */ for (i = 0; i < sizeof(db_list) / sizeof(db_list[0]); ++i) if (db_list[i].primaryp != NULL && bdb_db_shutdown(&db_list[i])) return (1); /* Close primary databases. */ for (i = 0; i < sizeof(db_list) / sizeof(db_list[0]); ++i) if (db_list[i].primaryp == NULL && bdb_db_shutdown(&db_list[i])) return (1); /* Close environments. */ for (i = 0; i < sizeof(env_list) / sizeof(env_list[0]); ++i) if (bdb_env_shutdown(&env_list[i])) return (1); return (0); } static int bdb_env_startup(env_list_t *ep) { struct stat sb; DB_ENV *dbenv; u_int32_t open_flags; int ret; /* * If the directory doesn't exist, create it with permissions limited * to the owner. Assume errors caused by the directory not existing; * we'd like to avoid interpreting system errors and it won't hurt to * attempt to create an existing directory. * * !!! * We use octal for the permissions, nothing else is portable. */ if (stat(ep->home, &sb) != 0) (void)mkdir(ep->home, 0700); /* * If the environment is not transactional, remove and re-create it. */ if (!ep->transaction) { if ((ret = db_env_create(&dbenv, 0)) != 0) { fprintf(stderr, "db_env_create: %%s", db_strerror(ret)); return (1); } if ((ret = dbenv->remove(dbenv, ep->home, DB_FORCE)) != 0) { dbenv->err(dbenv, ret, "DB_ENV->remove: %%s", ep->home); goto err; } } /* * Create the DB_ENV handle and initialize error reporting. */ if ((ret = db_env_create(&dbenv, 0)) != 0) { fprintf(stderr, "db_env_create: %%s", db_strerror(ret)); return (1); } dbenv->set_errpfx(dbenv, ep->home); dbenv->set_errfile(dbenv, stderr); /* Configure the cache size. */ if ((ep->gbytes != 0 || ep->bytes != 0) && (ret = dbenv->set_cachesize(dbenv, ep->gbytes, ep->bytes, ep->ncache)) != 0) { dbenv->err(dbenv, ret, "DB_ENV->set_cachesize"); goto err; } /* * Open the environment. */ open_flags = DB_CREATE | DB_INIT_MPOOL | DB_THREAD; if (ep->private) open_flags |= DB_PRIVATE; if (ep->transaction) open_flags |= DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_TXN | DB_RECOVER; if ((ret = dbenv->open(dbenv, ep->home, open_flags, 0)) != 0) { dbenv->err(dbenv, ret, "DB_ENV->open: %%s", ep->home); goto err; } *ep->envpp = dbenv; return (0); err: (void)dbenv->close(dbenv, 0); return (1); } static int bdb_db_startup(db_list_t *dp) { DB_ENV *dbenv; DB *dbp; int ret; dbenv = dp->envpp == NULL ? NULL : *dp->envpp; /* * If the database is not transactional, remove it and re-create it. */ if (!dp->transaction) { if ((ret = db_create(&dbp, dbenv, 0)) != 0) { if (dbenv == NULL) fprintf(stderr, "db_create: %%s\n", db_strerror(ret)); else dbenv->err(dbenv, ret, "db_create"); return (1); } if ((ret = dbp->remove( dbp, dp->name, NULL, 0)) != 0 && ret != ENOENT) { if (dbenv == NULL) fprintf(stderr, "DB->remove: %%s: %%s\n", dp->name, db_strerror(ret)); else dbenv->err( dbenv, ret, "DB->remove: %%s", dp->name); return (1); } } if ((ret = db_create(&dbp, dbenv, 0)) != 0) { if (dbenv == NULL) fprintf(stderr, "db_create: %%s\n", db_strerror(ret)); else dbenv->err(dbenv, ret, "db_create"); return (1); } if (dbenv == NULL) { dbp->set_errpfx(dbp, dp->name); dbp->set_errfile(dbp, stderr); } if (dp->dupsort && (ret = dbp->set_flags(dbp, DB_DUPSORT)) != 0) { dbp->err(dbp, ret, "DB->set_flags: DB_DUPSORT: %%s", dp->name); goto err; } if (dp->recnum && (ret = dbp->set_flags(dbp, DB_RECNUM)) != 0) { dbp->err(dbp, ret, "DB->set_flags: DB_RECNUM: %%s", dp->name); goto err; } if (dp->extentsize != 0 && (ret = dbp->set_q_extentsize(dbp, dp->extentsize)) != 0) { dbp->err(dbp, ret, "DB->set_q_extentsize: %%lu: %%s", (u_long)dp->extentsize, dp->name); goto err; } if (dp->pagesize != 0 && (ret = dbp->set_pagesize(dbp, dp->pagesize)) != 0) { dbp->err(dbp, ret, "DB->set_pagesize: %%lu: %%s", (u_long)dp->pagesize, dp->name); goto err; } if (dp->re_len != 0 && (ret = dbp->set_re_len(dbp, dp->re_len)) != 0) { dbp->err(dbp, ret, "DB->set_re_len: %%lu: %%s", (u_long)dp->re_len, dp->name); goto err; } if (dp->key_compare != NULL && (ret = dbp->set_bt_compare(dbp, dp->key_compare)) != 0) { dbp->err(dbp, ret, "DB->set_bt_compare"); goto err; } if ((ret = dbp->open(dbp, NULL, dp->name, NULL, dp->type, (dp->transaction ? DB_AUTO_COMMIT : 0) | DB_CREATE | DB_THREAD, 0)) != 0) { dbp->err(dbp, ret, "DB->open: %%s", dp->name); goto err; } if (dp->primaryp != NULL && (ret = dbp->associate(*dp->primaryp, NULL, dbp, dp->secondary_callback, DB_CREATE)) != 0) { dbp->err(dbp, ret, "DB->associate: %%s", dp->name); goto err; } *dp->dbpp = dbp; return (0); err: (void)dbp->close(dbp, 0); return (1); } static int bdb_env_shutdown(env_list_t *ep) { DB_ENV *dbenv; int ret; dbenv = ep->envpp == NULL ? NULL : *ep->envpp; ret = 0; if (dbenv != NULL && (ret = dbenv->close(dbenv, 0)) != 0) fprintf(stderr, "DB_ENV->close: %%s: %%s\n", ep->home, db_strerror(ret)); return (ret == 0 ? 0 : 1); } static int bdb_db_shutdown(db_list_t *dp) { DB_ENV *dbenv; DB *dbp; int ret; dbenv = dp->envpp == NULL ? NULL : *dp->envpp; dbp = *dp->dbpp; ret = 0; /* * If the database is transactionally protected, close without writing; * dirty pages; otherwise, flush dirty pages to disk. */ if (dbp != NULL && (ret = dbp->close(dbp, dp->transaction ? DB_NOSYNC : 0)) != 0) { if (dbenv == NULL) fprintf(stderr, "DB->close: %%s: %%s\n", dp->name, db_strerror(ret)); else dbenv->err(dbenv, ret, "DB->close: %%s", dp->name); } return (ret == 0 ? 0 : 1); } %s: line %d: %s: invalid input P*:JZjSz S *:JZjz*9H + +XX\ v ``p`` `LoW!o o,  o``>PPGCC: (GNU) 4.5.2ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.2432.interp.eh_frame_hdr.hash.SUNW_ldynsym.dynsym.dynstr.SUNW_version.SUNW_versym.SUNW_dynsymsort.SUNW_reloc.rel.plt.text.init.fini.rodata.rodata.str1.1.rodata.str1.4.got.dynamic.eh_frame.data.ctors.dtors.jcr.bss.comment.shstrtab  o+ 3"\\v;o  PIo$ $ rVo  Lg   Hs B,,w|++++++2`,`,I2--"PPPPPPhTRTRXRXRXRRRRRRRRT0RX S