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