1*59564Sbostic# @(#)README 5.3 (Berkeley) 04/30/93 257978Sbostic 357984SbosticThis is the directory to use for creating a library of the dbopen(3) 457984Sbosticroutines. The Makefile builds the base system. By changing it and 557984Sbosticthe compat.h file, you should be able to pick and choose the various 657984Sbosticthings your system needs to make libdb run. 757984Sbostic 857984SbosticThe knobs that you may have to turn: 957984Sbostic 1057984SbosticIn the Makefile: 11*59564Sbostic If you don't have mktemp(3) or mkstemp(3) on your system, add 12*59564Sbostic "mktemp.o" to the MISC list. 1357984Sbostic 14*59564Sbostic If you don't have snprintf(3) on your system, add snprintf.o 15*59564Sbostic to the MISC list. 16*59564Sbostic 17*59564Sbostic If you don't have memmove(3), add memmove.o to the MISC list. 18*59564Sbostic 1957984SbosticIn include/compat.h: 2057984Sbostic Before attempting to build this library, you should skim through 2157984Sbostic the compat.h file, and adjust it as necessary for your system. 2257984Sbostic It's possible to use the #ifndef construct to figure out if a 2357984Sbostic #ifdef has been set, but C provides no similar method to figure 2457984Sbostic out if a typedef has been done. All of the typedef's are grouped 2557984Sbostic at the top of compat.h, your compile errors will tell you which 2657984Sbostic ones you need. 2757984Sbostic 28*59564Sbostic Particularly subtle problems can occur if you don't have the 29*59564Sbostic BYTE_ORDER set right or if the realloc define is wrong. 30*59564Sbostic 3157984SbosticSome other problems: 3257984Sbostic You may see warning messages about illegal pointer combinations. 3357984Sbostic It's because systems prototype malloc, calloc and realloc in 3457984Sbostic different places. If you want to stop the warnings, find out 3557984Sbostic where your system prototypes them, and include it in compat.h, 3657984Sbostic or, just prototype them yourself. 3757984Sbostic 3857984SbosticTo install: 3957984Sbostic Programs using the dbopen(3) interface have to include db.h. 4057984Sbostic To install the library, you'll need to put db.h (found in the 4157984Sbostic directory PORT/include) and the library libdb.a in some place 4257984Sbostic accesible to your program. 43*59564Sbostic 44*59564SbosticHints: 45*59564Sbostic SunOS 4.1.2 works with ``MISC=realloc.o snprintf.o memmove.o'' 46*59564Sbostic and the include/compat.h realloc ``#if 0'' changed to ``#if 1''. 47*59564Sbostic SunOS gives a bunch of warning messages on the malloc family 48*59564Sbostic routines. 49*59564Sbostic 50*59564Sbostic Ultrix 4.2A works with ``MISC=realloc.o snprintf.o memmove.o'' 51*59564Sbostic and the include/compat.h realloc ``#if 0'' changed to ``#if 1'' 52*59564Sbostic and BYTE_ORDER changed from BIG_ENDIAN to LITTLE_ENDIAN. 53*59564Sbostic Ultrix does not give warning messages on the malloc family 54*59564Sbostic routines. 55*59564Sbostic 56*59564Sbostic The recno routines require the mmap(2) call. It wouldn't be 57*59564Sbostic difficult to port this package to a system without mmap. Change 58*59564Sbostic rec_open.c to do slightly different initialization and to write 59*59564Sbostic two new routines for rec_get.c that handle regular files using 60*59564Sbostic reads and writes. 61