40 lines
1.6 KiB
Plaintext
40 lines
1.6 KiB
Plaintext
|
# @(#)README 5.2 (Berkeley) 2/14/93
|
||
|
|
||
|
This is the directory to use for creating a library of the dbopen(3)
|
||
|
routines. The Makefile builds the base system. By changing it and
|
||
|
the compat.h file, you should be able to pick and choose the various
|
||
|
things your system needs to make libdb run.
|
||
|
|
||
|
The knobs that you may have to turn:
|
||
|
|
||
|
In the Makefile:
|
||
|
If you don't have mktemp or mkstemp on your system, add
|
||
|
"mktemp.o" to the COMP list.
|
||
|
|
||
|
In include/compat.h:
|
||
|
Before attempting to build this library, you should skim through
|
||
|
the compat.h file, and adjust it as necessary for your system.
|
||
|
It's possible to use the #ifndef construct to figure out if a
|
||
|
#ifdef has been set, but C provides no similar method to figure
|
||
|
out if a typedef has been done. All of the typedef's are grouped
|
||
|
at the top of compat.h, your compile errors will tell you which
|
||
|
ones you need.
|
||
|
|
||
|
Some other problems:
|
||
|
You may see warning messages about illegal pointer combinations.
|
||
|
It's because systems prototype malloc, calloc and realloc in
|
||
|
different places. If you want to stop the warnings, find out
|
||
|
where your system prototypes them, and include it in compat.h,
|
||
|
or, just prototype them yourself.
|
||
|
|
||
|
The dbopen(3) routines also use the snprintf(3) function. If
|
||
|
you don't have this function, change the snprintf() call in
|
||
|
btree/bt_open.c:tmp() from snprintf() to sprintf(), making sure
|
||
|
to delete the SECOND argument, the size of the buffer.
|
||
|
|
||
|
To install:
|
||
|
Programs using the dbopen(3) interface have to include db.h.
|
||
|
To install the library, you'll need to put db.h (found in the
|
||
|
directory PORT/include) and the library libdb.a in some place
|
||
|
accesible to your program.
|