Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
94cde4e1
Commit
94cde4e1
authored
Jan 25, 2006
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preprocessor directives for different Berkeley DB versions
parent
5d9fbef6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
5 deletions
+25
-5
wb/lib/wb/src/wb_db.cpp
wb/lib/wb/src/wb_db.cpp
+14
-3
xtt/lib/xtt/src/xtt_hist.cpp
xtt/lib/xtt/src/xtt_hist.cpp
+11
-2
No files found.
wb/lib/wb/src/wb_db.cpp
View file @
94cde4e1
/*
* Proview $Id: wb_db.cpp,v 1.2
8 2005-12-14 11:20:50
claes Exp $
* Proview $Id: wb_db.cpp,v 1.2
9 2006-01-25 14:25:07
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -356,6 +356,7 @@ wb_db_ohead::wb_db_ohead(wb_db *db, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
m_o
.
body
[
0
].
size
=
rbSize
;
m_o
.
body
[
1
].
time
=
dbTime
;
m_o
.
body
[
1
].
size
=
dbSize
;
}
...
...
@@ -900,7 +901,7 @@ static void printstat(DbEnv *ep, char *s)
printf
(
"DbEnv loc statistics, %s:
\n
"
,
s
);
ep
->
lock_stat
(
&
lp
,
0
);
printf
(
" lastid.......: %d
\n
"
,
lp
->
st_
last
id
);
printf
(
" lastid.......: %d
\n
"
,
lp
->
st_id
);
printf
(
" nmodes.......: %d
\n
"
,
lp
->
st_nmodes
);
printf
(
" maxlocks:....: %d
\n
"
,
lp
->
st_maxlocks
);
printf
(
" maxlockers...: %d
\n
"
,
lp
->
st_maxlockers
);
...
...
@@ -975,7 +976,16 @@ void wb_db::openDb(bool useTxn)
m_t_class
=
new
Db
(
m_env
,
0
);
m_t_name
=
new
Db
(
m_env
,
0
);
m_t_info
=
new
Db
(
m_env
,
0
);
#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0
m_t_ohead
->
open
(
NULL
,
"ohead"
,
NULL
,
DB_BTREE
,
DB_CREATE
|
DB_AUTO_COMMIT
,
0
/* S_IRUSR | S_IWUSR */
);
m_t_rbody
->
open
(
NULL
,
"rbody"
,
NULL
,
DB_BTREE
,
DB_CREATE
|
DB_AUTO_COMMIT
,
0
/* S_IRUSR | S_IWUSR */
);
m_t_dbody
->
open
(
NULL
,
"dbody"
,
NULL
,
DB_BTREE
,
DB_CREATE
|
DB_AUTO_COMMIT
,
0
/* S_IRUSR | S_IWUSR */
);
// m_t_dbody->open(NULL, "dbody", NULL, DB_BTREE, DB_CREATE | DB_AUTO_COMMIT, 0 /* S_IRUSR | S_IWUSR */);
m_t_class
->
open
(
NULL
,
"class"
,
NULL
,
DB_BTREE
,
DB_CREATE
|
DB_AUTO_COMMIT
,
0
/* S_IRUSR | S_IWUSR */
);
m_t_name
->
open
(
NULL
,
"name"
,
NULL
,
DB_BTREE
,
DB_CREATE
|
DB_AUTO_COMMIT
,
0
/* S_IRUSR | S_IWUSR */
);
m_t_info
->
open
(
NULL
,
"info"
,
NULL
,
DB_BTREE
,
DB_CREATE
|
DB_AUTO_COMMIT
,
0
/* S_IRUSR | S_IWUSR */
);
#else
m_t_ohead
->
open
(
"ohead"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
0
/* S_IRUSR | S_IWUSR */
);
m_t_rbody
->
open
(
"rbody"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
0
/* S_IRUSR | S_IWUSR */
);
m_t_dbody
->
open
(
"dbody"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
0
/* S_IRUSR | S_IWUSR */
);
...
...
@@ -983,6 +993,7 @@ void wb_db::openDb(bool useTxn)
m_t_class
->
open
(
"class"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
0
/* S_IRUSR | S_IWUSR */
);
m_t_name
->
open
(
"name"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
0
/* S_IRUSR | S_IWUSR */
);
m_t_info
->
open
(
"info"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
0
/* S_IRUSR | S_IWUSR */
);
#endif
printstat
(
m_env
,
"after open databases"
);
}
...
...
xtt/lib/xtt/src/xtt_hist.cpp
View file @
94cde4e1
/*
* Proview $Id: xtt_hist.cpp,v 1.1
1 2005-12-14 12:40:10
claes Exp $
* Proview $Id: xtt_hist.cpp,v 1.1
2 2006-01-25 14:22:42
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -880,7 +880,16 @@ void Hist::get_hist_list()
printf
(
" Fel vid skapande av databashandtag avslutar
\n
"
);
return
;
}
if
((
ret
=
dataBaseP
->
open
(
dataBaseP
,
dbName
,
NULL
,
DATABASETYPE
,
DB_RDONLY
,
0
))
!=
0
)
#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0
// int (*open) __P((DB *, DB_TXN *,
// const char *, const char *, DBTYPE, u_int32_t, int));
ret
=
dataBaseP
->
open
(
dataBaseP
,
NULL
,
dbName
,
NULL
,
DATABASETYPE
,
DB_RDONLY
,
0
);
#else
ret
=
dataBaseP
->
open
(
dataBaseP
,
dbName
,
NULL
,
DATABASETYPE
,
DB_RDONLY
,
0
);
#endif
if
(
ret
!=
0
)
{
/*error opening/creating db send the mess to errh, then exit*/
printf
(
"error db_open: %s
\n
"
,
db_strerror
(
ret
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment