1# @(#)README 5.3 (Berkeley) 04/30/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(3) or mkstemp(3) on your system, add 12 "mktemp.o" to the MISC list. 13 14 If you don't have snprintf(3) on your system, add snprintf.o 15 to the MISC list. 16 17 If you don't have memmove(3), add memmove.o to the MISC list. 18 19In include/compat.h: 20 Before attempting to build this library, you should skim through 21 the compat.h file, and adjust it as necessary for your system. 22 It's possible to use the #ifndef construct to figure out if a 23 #ifdef has been set, but C provides no similar method to figure 24 out if a typedef has been done. All of the typedef's are grouped 25 at the top of compat.h, your compile errors will tell you which 26 ones you need. 27 28 Particularly subtle problems can occur if you don't have the 29 BYTE_ORDER set right or if the realloc define is wrong. 30 31Some other problems: 32 You may see warning messages about illegal pointer combinations. 33 It's because systems prototype malloc, calloc and realloc in 34 different places. If you want to stop the warnings, find out 35 where your system prototypes them, and include it in compat.h, 36 or, just prototype them yourself. 37 38To install: 39 Programs using the dbopen(3) interface have to include db.h. 40 To install the library, you'll need to put db.h (found in the 41 directory PORT/include) and the library libdb.a in some place 42 accesible to your program. 43 44Hints: 45 SunOS 4.1.2 works with ``MISC=realloc.o snprintf.o memmove.o'' 46 and the include/compat.h realloc ``#if 0'' changed to ``#if 1''. 47 SunOS gives a bunch of warning messages on the malloc family 48 routines. 49 50 Ultrix 4.2A works with ``MISC=realloc.o snprintf.o memmove.o'' 51 and the include/compat.h realloc ``#if 0'' changed to ``#if 1'' 52 and BYTE_ORDER changed from BIG_ENDIAN to LITTLE_ENDIAN. 53 Ultrix does not give warning messages on the malloc family 54 routines. 55 56 The recno routines require the mmap(2) call. It wouldn't be 57 difficult to port this package to a system without mmap. Change 58 rec_open.c to do slightly different initialization and to write 59 two new routines for rec_get.c that handle regular files using 60 reads and writes. 61