xref: /csrg-svn/lib/libc/db/PORT/README (revision 57984)
1*57984Sbostic#	@(#)README	5.2 (Berkeley) 02/14/93
257978Sbostic
3*57984SbosticThis is the directory to use for creating a library of the dbopen(3)
4*57984Sbosticroutines.  The Makefile builds the base system.  By changing it and
5*57984Sbosticthe compat.h file, you should be able to pick and choose the various
6*57984Sbosticthings your system needs to make libdb run.
7*57984Sbostic
8*57984SbosticThe knobs that you may have to turn:
9*57984Sbostic
10*57984SbosticIn the Makefile:
11*57984Sbostic	If you don't have mktemp or mkstemp on your system, add
12*57984Sbostic	"mktemp.o" to the COMP list.
13*57984Sbostic
14*57984SbosticIn include/compat.h:
15*57984Sbostic	Before attempting to build this library, you should skim through
16*57984Sbostic	the compat.h file, and adjust it as necessary for your system.
17*57984Sbostic	It's possible to use the #ifndef construct to figure out if a
18*57984Sbostic	#ifdef has been set, but C provides no similar method to figure
19*57984Sbostic	out if a typedef has been done.  All of the typedef's are grouped
20*57984Sbostic	at the top of compat.h, your compile errors will tell you which
21*57984Sbostic	ones you need.
22*57984Sbostic
23*57984SbosticSome other problems:
24*57984Sbostic	You may see warning messages about illegal pointer combinations.
25*57984Sbostic	It's because systems prototype malloc, calloc and realloc in
26*57984Sbostic	different places.  If you want to stop the warnings, find out
27*57984Sbostic	where your system prototypes them, and include it in compat.h,
28*57984Sbostic	or, just prototype them yourself.
29*57984Sbostic
30*57984Sbostic	The dbopen(3) routines also use the snprintf(3) function.  If
31*57984Sbostic	you don't have this function, change the snprintf() call in
32*57984Sbostic	btree/bt_open.c:tmp() from snprintf() to sprintf(), making sure
33*57984Sbostic	to delete the SECOND argument, the size of the buffer.
34*57984Sbostic
35*57984SbosticTo install:
36*57984Sbostic	Programs using the dbopen(3) interface have to include db.h.
37*57984Sbostic	To install the library, you'll need to put db.h (found in the
38*57984Sbostic	directory PORT/include) and the library libdb.a in some place
39*57984Sbostic	accesible to your program.
40