Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
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
nexedi
MariaDB
Commits
ccbebab6
Commit
ccbebab6
authored
Sep 05, 2007
by
Bradley C. Kuszmaul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get DBT to work
git-svn-id:
file:///svn/tokudb@251
c7de825b-a66e-492c-adef-691d508d4ae1
parent
529ca328
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
buildheader/make_db_h.c
buildheader/make_db_h.c
+10
-5
No files found.
buildheader/make_db_h.c
View file @
ccbebab6
...
...
@@ -25,15 +25,14 @@ struct fieldinfo {
#include "sample_offsets_32.h"
#include "sample_offsets_64.h"
void
print_
db_struct
(
void
)
{
void
print_
struct
(
const
char
*
structname
,
struct
fieldinfo
*
fields32
,
struct
fieldinfo
*
fields64
,
unsigned
int
N
)
{
unsigned
int
i
;
unsigned
int
current_32
=
0
;
unsigned
int
current_64
=
0
;
int
dummy_counter
=
0
;
// int did_toku_internal=0;
printf
(
"struct __toku_db {
\n
"
);
assert
(
sizeof
(
fields32
)
==
sizeof
(
fields64
));
for
(
i
=
0
;
i
<
sizeof
(
fields32
)
/
sizeof
(
fields32
[
0
]);
i
++
)
{
printf
(
"struct __toku_%s {
\n
"
,
structname
);
for
(
i
=
0
;
i
<
N
;
i
++
)
{
unsigned
int
this_32
=
fields32
[
i
].
off
;
unsigned
int
this_64
=
fields64
[
i
].
off
;
assert
(
strcmp
(
fields32
[
i
].
decl
,
fields64
[
i
].
decl
)
==
0
);
...
...
@@ -79,7 +78,13 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__un
printf
(
"#if defined(__cplusplus)
\n
extern
\"
C
\"
{
\n
#endif
\n
"
);
printf
(
"typedef struct __toku_db DB;
\n
"
);
print_dbtype
();
print_db_struct
();
assert
(
sizeof
(
db_fields32
)
==
sizeof
(
db_fields64
));
print_struct
(
"db"
,
db_fields32
,
db_fields64
,
sizeof
(
db_fields32
)
/
sizeof
(
db_fields32
[
0
]));
assert
(
sizeof
(
dbt_fields32
)
==
sizeof
(
dbt_fields64
));
print_struct
(
"dbt"
,
dbt_fields32
,
dbt_fields64
,
sizeof
(
dbt_fields32
)
/
sizeof
(
dbt_fields32
[
0
]));
printf
(
"#if defined(__cplusplus)
\n
}
\n
#endif
\n
"
);
printf
(
"#endif
\n
"
);
return
0
;
...
...
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