1 ?RCS: $Id: i_db.U,v 3.0.1.3 1995/07/25 14:10:22 ram Exp $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
11 ?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
13 ?RCS: $Log: i_db.U,v $
14 ?RCS: Revision 3.0.1.3 1995/07/25 14:10:22 ram
15 ?RCS: patch56: conditionally use const in test programs (ADO)
17 ?RCS: Revision 3.0.1.2 1995/05/12 12:14:42 ram
18 ?RCS: patch54: extended for more intimate DB probing (ADO)
20 ?RCS: Revision 3.0.1.1 1994/08/29 16:21:50 ram
21 ?RCS: patch32: created by ADO
23 ?MAKE:i_db db_hashtype db_prefixtype: Inhdr +cc +ccflags rm contains cat \
25 ?MAKE: -pick add $@ %<
27 ?S: This variable conditionally defines the I_DB symbol, and indicates
28 ?S: whether a C program may include Berkeley's DB include file <db.h>.
31 ?S: This variable contains the type of the hash structure element
32 ?S: in the <db.h> header file. In older versions of DB, it was
33 ?S: int, while in newer ones it is u_int32_t.
36 ?S: This variable contains the type of the prefix structure element
37 ?S: in the <db.h> header file. In older versions of DB, it was
38 ?S: int, while in newer ones it is size_t.
41 ?C: This symbol, if defined, indicates to the C program that it should
42 ?C: include Berkeley's DB include file <db.h>.
45 ?C: This symbol contains the type of the prefix structure element
46 ?C: in the <db.h> header file. In older versions of DB, it was
47 ?C: int, while in newer ones it is u_int32_t.
50 ?C: This symbol contains the type of the prefix structure element
51 ?C: in the <db.h> header file. In older versions of DB, it was
52 ?C: int, while in newer ones it is size_t.
55 ?H:#define DB_Hash_t $db_hashtype /**/
56 ?H:#define DB_Prefix_t $db_prefixtype /**/
59 : see if this is a db.h system
66 : Check the return type needed for hash
68 echo "Checking return type needed for hash for Berkeley DB ..." >&4
74 #include <sys/types.h>
76 u_int32_t hash_cb (ptr, size)
87 if $cc $ccflags -c try.c >try.out 2>&1 ; then
88 if $contains warning try.out >>/dev/null 2>&1 ; then
91 db_hashtype='u_int32_t'
94 echo "I can't seem to compile the test program." >&4
98 echo "Your version of Berkeley DB uses $db_hashtype for hash."
108 : Check the return type needed for prefix
110 echo "Checking return type needed for prefix for Berkeley DB ..." >&4
116 #include <sys/types.h>
118 size_t prefix_cb (key1, key2)
126 info.prefix = prefix_cb;
129 if $cc $ccflags -c try.c >try.out 2>&1 ; then
130 if $contains warning try.out >>/dev/null 2>&1 ; then
133 db_prefixtype='size_t'
136 echo "I can't seem to compile the test program." >&4
140 echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
142 *) db_prefixtype='int'