update for Eric and sendmail
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 15 Feb 1993 07:45:27 +0000 (23:45 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 15 Feb 1993 07:45:27 +0000 (23:45 -0800)
SCCS-vsn: lib/libc/db/PORT/README 5.2
SCCS-vsn: lib/libc/db/PORT/Makefile 5.5

usr/src/lib/libc/db/PORT/Makefile
usr/src/lib/libc/db/PORT/README

index d6379c0..6d2ea80 100644 (file)
@@ -1,5 +1,6 @@
-#      @(#)Makefile    5.4 (Berkeley) %G%
+#      @(#)Makefile    5.5 (Berkeley) %G%
 
 
+LIBDB= libdb.a
 OBJ1=  bt_close.o bt_conv.o bt_debug.o bt_delete.o bt_get.o bt_open.o \
        bt_overflow.o bt_page.o bt_put.o bt_search.o bt_seq.o bt_split.o \
        bt_stack.o bt_utils.o
 OBJ1=  bt_close.o bt_conv.o bt_debug.o bt_delete.o bt_get.o bt_open.o \
        bt_overflow.o bt_page.o bt_put.o bt_search.o bt_seq.o bt_split.o \
        bt_stack.o bt_utils.o
@@ -9,26 +10,28 @@ OBJ3=        hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.o \
 OBJ4=  mpool.o
 OBJ5=  rec_close.o rec_delete.o rec_get.o rec_open.o rec_put.o rec_search.o \
        rec_seq.o rec_utils.o
 OBJ4=  mpool.o
 OBJ5=  rec_close.o rec_delete.o rec_get.o rec_open.o rec_put.o rec_search.o \
        rec_seq.o rec_utils.o
-# If you need compatibility routines
-COMP=  bcopy.o mktemp.o
 
 
-db.a: ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${COMP}
+# If you need mktemp or mkstemp, add "mktemp.o" to the COMP list.
+COMP=
+
+${LIBDB}: ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${COMP}
        ar cq $@ \
            `lorder ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${COMP} | tsort`
        ranlib $@
 
 ${OBJ1}:
        ar cq $@ \
            `lorder ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${COMP} | tsort`
        ranlib $@
 
 ${OBJ1}:
-       ${CC} -c -O -I. -I../btree -I../include ../btree/*.c
+       ${CC} -c -O -I. -Iinclude -I../btree ../btree/*.c
 ${OBJ2}:
 ${OBJ2}:
-       ${CC} -c -O -I. -I../db -I../include ../db/*.c
+       ${CC} -c -O -I. -Iinclude -I../db ../db/*.c
 ${OBJ3}:
 ${OBJ3}:
-       ${CC} -c -O -I. -I../hash -I../include ../hash/*.c
+       ${CC} -c -O -I. -Iinclude -I../hash ../hash/*.c
 ${OBJ4}:
 ${OBJ4}:
-       ${CC} -c -O -I. -I../mpool -I../include ../mpool/*.c
+       ${CC} -c -O -I. -Iinclude -I../mpool ../mpool/*.c
 ${OBJ5}:
 ${OBJ5}:
-       ${CC} -c -O -I. -I../recno -I../include ../recno/*.c
-${COMP} X:
-       ${CC} -c -O -I. -I../port -I../include ../port/*.c
+       ${CC} -c -O -I. -Iinclude -I../recno ../recno/*.c
+
+mktemp.o:
+       ${CC} -c -O -I. -Iinclude ../clib/mktemp.c
 
 clean:
 
 clean:
-       rm -f db.a ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${COMP}
+       rm -f ${LIBDB} ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${COMP}
index 5c8253e..0dccde9 100644 (file)
@@ -1,46 +1,39 @@
-/*-
- * Copyright (c) 1991 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *     @(#)README      5.2 (Berkeley) 9/26/91
- */
+#      @(#)README      5.2 (Berkeley) %G%
 
 
-The files are:
-       README          This file.
-       bcopy.c         A source file that can be compiled into memmove,
-                       memcpy or bcopy.  It handles overlapping copies,
-                       So if your system's doesn't, use it.
-       cdefs.h         Function prototype #defines.
-       compat.h        Compatibility header file for lots of things;
-                       necessary if your system isn't POSIX 1003.1 and
-                       ANSI C compliant.  You'll have to pick and choose
-                       for some of them!
-       mktemp.c        Mktemp(3) and mkstemp(3) for systems lacking them.
+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.