PORT: Remove the PORT directory.

None of these port directories work anymore, with the move to the new
include/berkeley-db directory layout for header files.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2024-03-15 18:53:12 +11:00
parent 7eff5dd76e
commit b352d0b955
145 changed files with 1 additions and 5951 deletions

View file

@ -1,102 +0,0 @@
# @(#)Makefile 8.9 (Berkeley) 7/14/94
LIBDB= libdb.a
OBJ1= hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.o \
hsearch.o ndbm.o
OBJ2= 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_utils.o
OBJ3= db.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
MISC=
${LIBDB}: ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
rm -f $@
ar cq $@ \
`lorder ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC} | tsort`
ranlib $@
clean:
rm -f ${LIBDB} ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
OORG= -O
CL= ${CC} -c -D__DBINTERFACE_PRIVATE ${OORG} -I. -Iinclude
hash.o: ../../hash/hash.c
${CL} -I../../hash ../../hash/hash.c
hash_bigkey.o: ../../hash/hash_bigkey.c
${CL} -I../../hash ../../hash/hash_bigkey.c
hash_buf.o: ../../hash/hash_buf.c
${CL} -I../../hash ../../hash/hash_buf.c
hash_func.o: ../../hash/hash_func.c
${CL} -I../../hash ../../hash/hash_func.c
hash_log2.o: ../../hash/hash_log2.c
${CL} -I../../hash ../../hash/hash_log2.c
hash_page.o: ../../hash/hash_page.c
${CL} -I../../hash ../../hash/hash_page.c
hsearch.o: ../../hash/hsearch.c
${CL} -I../../hash ../../hash/hsearch.c
ndbm.o: ../../hash/ndbm.c
${CL} -I../../hash ../../hash/ndbm.c
bt_close.o: ../../btree/bt_close.c
${CL} -I../../btree ../../btree/bt_close.c
bt_conv.o: ../../btree/bt_conv.c
${CL} -I../../btree ../../btree/bt_conv.c
bt_debug.o: ../../btree/bt_debug.c
${CL} -I../../btree ../../btree/bt_debug.c
bt_delete.o: ../../btree/bt_delete.c
${CL} -I../../btree ../../btree/bt_delete.c
bt_get.o: ../../btree/bt_get.c
${CL} -I../../btree ../../btree/bt_get.c
bt_open.o: ../../btree/bt_open.c
${CL} -I../../btree ../../btree/bt_open.c
bt_overflow.o: ../../btree/bt_overflow.c
${CL} -I../../btree ../../btree/bt_overflow.c
bt_page.o: ../../btree/bt_page.c
${CL} -I../../btree ../../btree/bt_page.c
bt_put.o: ../../btree/bt_put.c
${CL} -I../../btree ../../btree/bt_put.c
bt_search.o: ../../btree/bt_search.c
${CL} -I../../btree ../../btree/bt_search.c
bt_seq.o: ../../btree/bt_seq.c
${CL} -I../../btree ../../btree/bt_seq.c
bt_split.o: ../../btree/bt_split.c
${CL} -I../../btree ../../btree/bt_split.c
bt_stack.o: ../../btree/bt_stack.c
${CL} -I../../btree ../../btree/bt_stack.c
bt_utils.o: ../../btree/bt_utils.c
${CL} -I../../btree ../../btree/bt_utils.c
db.o: ../../db/db.c
${CL} ../../db/db.c
mpool.o: ../../mpool/mpool.c
${CL} -I../../mpool ../../mpool/mpool.c
rec_close.o: ../../recno/rec_close.c
${CL} -I../../recno ../../recno/rec_close.c
rec_delete.o: ../../recno/rec_delete.c
${CL} -I../../recno ../../recno/rec_delete.c
rec_get.o: ../../recno/rec_get.c
${CL} -I../../recno ../../recno/rec_get.c
rec_open.o: ../../recno/rec_open.c
${CL} -I../../recno ../../recno/rec_open.c
rec_put.o: ../../recno/rec_put.c
${CL} -I../../recno ../../recno/rec_put.c
rec_search.o: ../../recno/rec_search.c
${CL} -I../../recno ../../recno/rec_search.c
rec_seq.o: ../../recno/rec_seq.c
${CL} -I../../recno ../../recno/rec_seq.c
rec_utils.o: ../../recno/rec_utils.c
${CL} -I../../recno ../../recno/rec_utils.c
memmove.o:
${CC} -DMEMMOVE -c -O -I. -Iinclude clib/memmove.c
mktemp.o:
${CC} -c -O -I. -Iinclude clib/mktemp.c
snprintf.o:
${CC} -c -O -I. -Iinclude clib/snprintf.c

View file

@ -1,131 +0,0 @@
# @(#)README 8.6 (Berkeley) 6/20/94
This is the area for building the libdb library. There are a number
of porting directories, for various architecture/OS combinations. Pick
the one that's closest to yours and try "make". For the rest of this
file, I'll use "MACH" as a fake architecture/OS name.
To PORT to a new system, create the following subdirectories and
symbolic links.
mkdir MACH (for example: mkdir sunos.4.0)
cd MACH
cp ../Makefile .
chmod 664 Makefile
ln -s ../clib .
mkdir include
ln -s include sys
cd include
ln -s ../../include/*.h .
rm compat.h
cp ../../include/compat.h .
chmod 664 compat.h
cd ..
The basic idea is that you now have a local area that you can modify.
In particular, you have local copies of the Makefile and the include
file compat.h. Read through the Makefile and compat.h and make whatever
changes are appropriate to your system. If there's an architecture
that's close to yours, you probably should diff the Makefile and
compat.h in that tree against the standard ones and see what changes
were necessary, as they're probably necessary for you as well. Then,
enter "make" and see what happens!
There are several subroutines that are found in POSIX 1003.2, ANSI
C, or 4.4BSD that you may not have. Once you get libdb.a to compile,
go through the list of undefined routines and add entries to the MISC
line in the Makefile as necessary.
If you have to add some functions that are missing (and which aren't
in the PORT/clib directory), please don't add them in the PORT/clib
directory. Add them in a MACH/local directory, and add lines of the
form:
function.o: local/function.o
${CL} -Ilocal local/function.o
to your local Makefile.
Hopefully, over time, we'll develop a set of system directories that
are known to work. If you send me the changes that were necessary to
make your system work, this will happen much more quickly.
In some of the system directories, you'll see a file named OTHER_PATCHES.
This is a set of patches which you'll have to make from the top-level db
directory to get libdb.a to run on this system:
cd ..
patch < PORT/MACH/OTHER_PATCHES
If patch prompts you for the name of the file to modify (some versions
of patch don't figure it out on their own) use the file name which patch
displays.
Some knobs you may have to turn:
In include/db.h:
Before attempting to build libdb, you should look through the
db.h file, and adjust it as necessary for your system. The
only adjustments that you should need to make are for the
fixed sized typedef's at the top of the file. Make sure they're
right for your system.
In include/compat.h:
Before attempting to build libdb, you should look 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. Your compile errors should
give you a good indication of which ones you need.
You may see warning messages about illegal pointer combinations. You may
also see lots of warning messages about #define's being redefined. These
can mostly be ignored. I usually ignore warning messages until something
doesn't work. Some systems produce thousands of lines of useless warnings,
bless their little hearts.
The other parts of the PORT directory are as follows:
The directory PORT/clib is a set of functions that the 4.4BSD
C library had and which your system may not have. They are
added to the MISC line of the Makefile if they aren't defined
when you try and load libdb.a.
The directory PORT/include is header files that the 4.4BSD
system had which your system may not have. There is also
one really important extra one, named compat.h, which is a
set of compatibility work-arounds that you'll almost certainly
have to copy and modify for a new system.
The symbolic link PORT/sys points to the PORT/include directory
so that includes of the form <sys/include.h> work.
Some of the more common portability problems:
If you don't have:
memmove(3): add memmove.o
mkstemp(3): add mktemp.o
... to the MISC line in the Makefile.
If you don't have snprintf/vsnprintf(3), add snprintf.o to the
MISC line in the Makefile. This workaround depends on your
system having vsprintf(3) -- if you don't, there's no workaround
other than changing the source code to not use the snprintf calls.
If you have to make that change, check to see if your vsprintf
returns a length or a char *; if it's the latter, make sure you
set VSPRINTF_CHARSTAR in the MACH/include/compat.h file.
Installing the DB library:
The Makefile builds a C library named libdb.a. This file needs
to be installed in a place where the loader will automatically
look for it (or, if you're building it for a single project,
wherever that project's Makefile loads it from).
In addition, the header file PORT/include/db.h must be copied to
a directory (often /usr/include/) where programs that use the
db package can include it in their source. (If you intend to use
the ndbm interface to libdb, you'll need to copy the header file
PORT/include/ndbm.h as well.)

View file

@ -1,102 +0,0 @@
# @(#)Makefile 8.9 (Berkeley) 7/14/94
LIBDB= libdb.a
OBJ1= hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.o \
hsearch.o ndbm.o
OBJ2= 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_utils.o
OBJ3= db.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
MISC= snprintf.o
${LIBDB}: ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
rm -f $@
ar cq $@ \
`lorder ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC} | tsort`
ranlib $@
clean:
rm -f ${LIBDB} ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
OORG= -O
CL= ${CC} -c -D__DBINTERFACE_PRIVATE ${OORG} -I. -Iinclude
hash.o: ../../hash/hash.c
${CL} -I../../hash ../../hash/hash.c
hash_bigkey.o: ../../hash/hash_bigkey.c
${CL} -I../../hash ../../hash/hash_bigkey.c
hash_buf.o: ../../hash/hash_buf.c
${CL} -I../../hash ../../hash/hash_buf.c
hash_func.o: ../../hash/hash_func.c
${CL} -I../../hash ../../hash/hash_func.c
hash_log2.o: ../../hash/hash_log2.c
${CL} -I../../hash ../../hash/hash_log2.c
hash_page.o: ../../hash/hash_page.c
${CL} -I../../hash ../../hash/hash_page.c
hsearch.o: ../../hash/hsearch.c
${CL} -I../../hash ../../hash/hsearch.c
ndbm.o: ../../hash/ndbm.c
${CL} -I../../hash ../../hash/ndbm.c
bt_close.o: ../../btree/bt_close.c
${CL} -I../../btree ../../btree/bt_close.c
bt_conv.o: ../../btree/bt_conv.c
${CL} -I../../btree ../../btree/bt_conv.c
bt_debug.o: ../../btree/bt_debug.c
${CL} -I../../btree ../../btree/bt_debug.c
bt_delete.o: ../../btree/bt_delete.c
${CL} -I../../btree ../../btree/bt_delete.c
bt_get.o: ../../btree/bt_get.c
${CL} -I../../btree ../../btree/bt_get.c
bt_open.o: ../../btree/bt_open.c
${CL} -I../../btree ../../btree/bt_open.c
bt_overflow.o: ../../btree/bt_overflow.c
${CL} -I../../btree ../../btree/bt_overflow.c
bt_page.o: ../../btree/bt_page.c
${CL} -I../../btree ../../btree/bt_page.c
bt_put.o: ../../btree/bt_put.c
${CL} -I../../btree ../../btree/bt_put.c
bt_search.o: ../../btree/bt_search.c
${CL} -I../../btree ../../btree/bt_search.c
bt_seq.o: ../../btree/bt_seq.c
${CL} -I../../btree ../../btree/bt_seq.c
bt_split.o: ../../btree/bt_split.c
${CL} -I../../btree ../../btree/bt_split.c
bt_stack.o: ../../btree/bt_stack.c
${CL} -I../../btree ../../btree/bt_stack.c
bt_utils.o: ../../btree/bt_utils.c
${CL} -I../../btree ../../btree/bt_utils.c
db.o: ../../db/db.c
${CL} ../../db/db.c
mpool.o: ../../mpool/mpool.c
${CL} -I../../mpool ../../mpool/mpool.c
rec_close.o: ../../recno/rec_close.c
${CL} -I../../recno ../../recno/rec_close.c
rec_delete.o: ../../recno/rec_delete.c
${CL} -I../../recno ../../recno/rec_delete.c
rec_get.o: ../../recno/rec_get.c
${CL} -I../../recno ../../recno/rec_get.c
rec_open.o: ../../recno/rec_open.c
${CL} -I../../recno ../../recno/rec_open.c
rec_put.o: ../../recno/rec_put.c
${CL} -I../../recno ../../recno/rec_put.c
rec_search.o: ../../recno/rec_search.c
${CL} -I../../recno ../../recno/rec_search.c
rec_seq.o: ../../recno/rec_seq.c
${CL} -I../../recno ../../recno/rec_seq.c
rec_utils.o: ../../recno/rec_utils.c
${CL} -I../../recno ../../recno/rec_utils.c
memmove.o:
${CC} -DMEMMOVE -c -O -I. -Iinclude clib/memmove.c
mktemp.o:
${CC} -c -O -I. -Iinclude clib/mktemp.c
snprintf.o:
${CC} -c -O -I. -Iinclude clib/snprintf.c

View file

@ -1 +0,0 @@
../clib

View file

@ -1 +0,0 @@
../../include/cdefs.h

View file

@ -1,231 +0,0 @@
/*-
* Copyright (c) 1991, 1993
* 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.
*
* @(#)compat.h 8.13 (Berkeley) 2/21/94
*/
#ifndef _COMPAT_H_
#define _COMPAT_H_
#include <sys/types.h>
/*
* If your system doesn't typedef u_long, u_short, or u_char, change
* the 0 to a 1.
*/
#if 0
typedef unsigned char u_char; /* 4.[34]BSD names. */
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned short u_short;
#endif
/* If your system doesn't typedef size_t, change the 0 to a 1. */
#if 0
typedef unsigned int size_t; /* POSIX, 4.[34]BSD names. */
#endif
/* If your system doesn't typedef ssize_t, change the 0 to a 1. */
#if 0
typedef int ssize_t; /* POSIX names. */
#endif
/*
* If your system doesn't have the POSIX type for a signal mask,
* change the 0 to a 1.
*/
#if 0 /* POSIX 1003.1 signal mask type. */
typedef unsigned int sigset_t;
#endif
/*
* If your system's vsprintf returns a char *, not an int,
* change the 0 to a 1.
*/
#if 0
#define VSPRINTF_CHARSTAR
#endif
/*
* If you don't have POSIX 1003.1 signals, the signal code surrounding the
* temporary file creation is intended to block all of the possible signals
* long enough to create the file and unlink it. All of this stuff is
* intended to use old-style BSD calls to fake POSIX 1003.1 calls.
*/
#ifdef NO_POSIX_SIGNALS
#define sigemptyset(set) (*(set) = 0)
#define sigfillset(set) (*(set) = ~(sigset_t)0, 0)
#define sigaddset(set,signo) (*(set) |= sigmask(signo), 0)
#define sigdelset(set,signo) (*(set) &= ~sigmask(signo), 0)
#define sigismember(set,signo) ((*(set) & sigmask(signo)) != 0)
#define SIG_BLOCK 1
#define SIG_UNBLOCK 2
#define SIG_SETMASK 3
static int __sigtemp; /* For the use of sigprocmask */
/* Repeated test of oset != NULL is to avoid "*0". */
#define sigprocmask(how, set, oset) \
((__sigtemp = \
(((how) == SIG_BLOCK) ? \
sigblock(0) | *(set) : \
(((how) == SIG_UNBLOCK) ? \
sigblock(0) & ~(*(set)) : \
((how) == SIG_SETMASK ? \
*(set) : sigblock(0))))), \
((oset) ? (*(oset ? oset : set) = sigsetmask(__sigtemp)) : \
sigsetmask(__sigtemp)), 0)
#endif
/*
* If your system doesn't have an include file with the appropriate
* byte order set, make sure you specify the correct one.
*/
#ifndef BYTE_ORDER
#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
#define BYTE_ORDER BIG_ENDIAN /* Set for your system. */
#endif
#if defined(SYSV) || defined(SYSTEM5)
#define index(a, b) strchr(a, b)
#define rindex(a, b) strrchr(a, b)
#define bzero(a, b) memset(a, 0, b)
#define bcmp(a, b, n) memcmp(a, b, n)
#define bcopy(a, b, n) memmove(b, a, n)
#endif
#if defined(BSD) || defined(BSD4_3)
#define strchr(a, b) index(a, b)
#define strrchr(a, b) rindex(a, b)
#define memcmp(a, b, n) bcmp(a, b, n)
#define memmove(a, b, n) bcopy(b, a, n)
#endif
/*
* 32-bit machine. The db routines are theoretically independent of
* the size of u_shorts and u_longs, but I don't know that anyone has
* ever actually tried it. At a minimum, change the following #define's
* if you are trying to compile on a different type of system.
*/
#ifndef USHRT_MAX
#define USHRT_MAX 0xFFFF
#define ULONG_MAX 0xFFFFFFFF
#endif
#ifndef O_ACCMODE /* POSIX 1003.1 access mode mask. */
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
#endif
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 RE limit. */
#define _POSIX2_RE_DUP_MAX 255
#endif
/*
* If you can't provide lock values in the open(2) call. Note, this
* allows races to happen.
*/
#ifndef O_EXLOCK /* 4.4BSD extension. */
#define O_EXLOCK 0
#endif
#ifndef O_SHLOCK /* 4.4BSD extension. */
#define O_SHLOCK 0
#endif
#ifndef EFTYPE
#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */
#endif
#ifndef WCOREDUMP /* 4.4BSD extension */
#define WCOREDUMP(a) 0
#endif
#ifndef STDERR_FILENO
#define STDIN_FILENO 0 /* ANSI C #defines */
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
#endif
#ifndef SEEK_END
#define SEEK_SET 0 /* POSIX 1003.1 seek values */
#define SEEK_CUR 1
#define SEEK_END 2
#endif
#ifndef _POSIX_VDISABLE /* POSIX 1003.1 disabling char. */
#define _POSIX_VDISABLE 0 /* Some systems used 0. */
#endif
#ifndef TCSASOFT /* 4.4BSD extension. */
#define TCSASOFT 0
#endif
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 values. */
#define _POSIX2_RE_DUP_MAX 255
#endif
#ifndef NULL /* ANSI C #defines NULL everywhere. */
#define NULL 0
#endif
#ifndef MAX /* Usually found in <sys/param.h>. */
#define MAX(_a,_b) ((_a)<(_b)?(_b):(_a))
#endif
#ifndef MIN /* Usually found in <sys/param.h>. */
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
#endif
/* Default file permissions. */
#ifndef DEFFILEMODE /* 4.4BSD extension. */
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
#endif
#ifndef S_ISDIR /* POSIX 1003.1 file type tests. */
#define S_ISDIR(m) ((m & 0170000) == 0040000) /* directory */
#define S_ISCHR(m) ((m & 0170000) == 0020000) /* char special */
#define S_ISBLK(m) ((m & 0170000) == 0060000) /* block special */
#define S_ISREG(m) ((m & 0170000) == 0100000) /* regular file */
#define S_ISFIFO(m) ((m & 0170000) == 0010000) /* fifo */
#endif
#ifndef S_ISLNK /* BSD POSIX 1003.1 extensions */
#define S_ISLNK(m) ((m & 0170000) == 0120000) /* symbolic link */
#define S_ISSOCK(m) ((m & 0170000) == 0140000) /* socket */
#endif
/* The type of a va_list. */
#ifndef _BSD_VA_LIST_ /* 4.4BSD #define. */
#define _BSD_VA_LIST_ char *
#endif
#endif /* !_COMPAT_H_ */

View file

@ -1 +0,0 @@
../../include/db.h

View file

@ -1 +0,0 @@
../../include/mpool.h

View file

@ -1 +0,0 @@
../../include/ndbm.h

View file

@ -1 +0,0 @@
../../include/queue.h

View file

@ -1 +0,0 @@
include

View file

@ -1 +0,0 @@
../Makefile

View file

@ -1 +0,0 @@
../clib

View file

@ -1 +0,0 @@
../../include/cdefs.h

View file

@ -1 +0,0 @@
../../include/compat.h

View file

@ -1,222 +0,0 @@
/*-
* Copyright (c) 1990, 1993, 1994
* 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.
*
* @(#)db.h 8.6 (Berkeley) 6/16/94
*/
#ifndef _DB_H_
#define _DB_H_
#include <sys/types.h>
#include <sys/cdefs.h>
#include <limits.h>
#ifdef __DBINTERFACE_PRIVATE
#include <compat.h>
#endif
#define RET_ERROR -1 /* Return values. */
#define RET_SUCCESS 0
#define RET_SPECIAL 1
#define MAX_PAGE_NUMBER 0xffffffff /* >= # of pages in a file */
typedef u_int32_t pgno_t;
#define MAX_PAGE_OFFSET 65535 /* >= # of bytes in a page */
typedef u_int16_t indx_t;
#define MAX_REC_NUMBER 0xffffffff /* >= # of records in a tree */
typedef u_int32_t recno_t;
/* Key/data structure -- a Data-Base Thang. */
typedef struct {
void *data; /* data */
size_t size; /* data length */
} DBT;
/* Routine flags. */
#define R_CURSOR 1 /* del, put, seq */
#define __R_UNUSED 2 /* UNUSED */
#define R_FIRST 3 /* seq */
#define R_IAFTER 4 /* put (RECNO) */
#define R_IBEFORE 5 /* put (RECNO) */
#define R_LAST 6 /* seq (BTREE, RECNO) */
#define R_NEXT 7 /* seq */
#define R_NOOVERWRITE 8 /* put */
#define R_PREV 9 /* seq (BTREE, RECNO) */
#define R_SETCURSOR 10 /* put (RECNO) */
#define R_RECNOSYNC 11 /* sync (RECNO) */
typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE;
/*
* !!!
* The following flags are included in the dbopen(3) call as part of the
* open(2) flags. In order to avoid conflicts with the open flags, start
* at the top of the 16 or 32-bit number space and work our way down. If
* the open flags were significantly expanded in the future, it could be
* a problem. Wish I'd left another flags word in the dbopen call.
*
* !!!
* None of this stuff is implemented yet. The only reason that it's here
* is so that the access methods can skip copying the key/data pair when
* the DB_LOCK flag isn't set.
*/
#if UINT_MAX > 65535
#define DB_LOCK 0x20000000 /* Do locking. */
#define DB_SHMEM 0x40000000 /* Use shared memory. */
#define DB_TXN 0x80000000 /* Do transactions. */
#else
#define DB_LOCK 0x2000 /* Do locking. */
#define DB_SHMEM 0x4000 /* Use shared memory. */
#define DB_TXN 0x8000 /* Do transactions. */
#endif
/* Access method description structure. */
typedef struct __db {
DBTYPE type; /* Underlying db type. */
int (*close) __P((struct __db *));
int (*del) __P((const struct __db *, const DBT *, u_int));
int (*get) __P((const struct __db *, const DBT *, DBT *, u_int));
int (*put) __P((const struct __db *, DBT *, const DBT *, u_int));
int (*seq) __P((const struct __db *, DBT *, DBT *, u_int));
int (*sync) __P((const struct __db *, u_int));
void *internal; /* Access method private. */
int (*fd) __P((const struct __db *));
} DB;
#define BTREEMAGIC 0x053162
#define BTREEVERSION 3
/* Structure used to pass parameters to the btree routines. */
typedef struct {
#define R_DUP 0x01 /* duplicate keys */
u_long flags;
u_int cachesize; /* bytes to cache */
int maxkeypage; /* maximum keys per page */
int minkeypage; /* minimum keys per page */
u_int psize; /* page size */
int (*compare) /* comparison function */
__P((const DBT *, const DBT *));
size_t (*prefix) /* prefix function */
__P((const DBT *, const DBT *));
int lorder; /* byte order */
} BTREEINFO;
#define HASHMAGIC 0x061561
#define HASHVERSION 2
/* Structure used to pass parameters to the hashing routines. */
typedef struct {
u_int bsize; /* bucket size */
u_int ffactor; /* fill factor */
u_int nelem; /* number of elements */
u_int cachesize; /* bytes to cache */
u_int32_t /* hash function */
(*hash) __P((const void *, size_t));
int lorder; /* byte order */
} HASHINFO;
/* Structure used to pass parameters to the record routines. */
typedef struct {
#define R_FIXEDLEN 0x01 /* fixed-length records */
#define R_NOKEY 0x02 /* key not required */
#define R_SNAPSHOT 0x04 /* snapshot the input */
u_long flags;
u_int cachesize; /* bytes to cache */
u_int psize; /* page size */
int lorder; /* byte order */
size_t reclen; /* record length (fixed-length records) */
u_char bval; /* delimiting byte (variable-length records */
char *bfname; /* btree file name */
} RECNOINFO;
#ifdef __DBINTERFACE_PRIVATE
/*
* Little endian <==> big endian 32-bit swap macros.
* M_32_SWAP swap a memory location
* P_32_SWAP swap a referenced memory location
* P_32_COPY swap from one location to another
*/
#define M_32_SWAP(a) { \
u_int32_t _tmp = a; \
((char *)&a)[0] = ((char *)&_tmp)[3]; \
((char *)&a)[1] = ((char *)&_tmp)[2]; \
((char *)&a)[2] = ((char *)&_tmp)[1]; \
((char *)&a)[3] = ((char *)&_tmp)[0]; \
}
#define P_32_SWAP(a) { \
u_int32_t _tmp = *(u_int32_t *)a; \
((char *)a)[0] = ((char *)&_tmp)[3]; \
((char *)a)[1] = ((char *)&_tmp)[2]; \
((char *)a)[2] = ((char *)&_tmp)[1]; \
((char *)a)[3] = ((char *)&_tmp)[0]; \
}
#define P_32_COPY(a, b) { \
((char *)&(b))[0] = ((char *)&(a))[3]; \
((char *)&(b))[1] = ((char *)&(a))[2]; \
((char *)&(b))[2] = ((char *)&(a))[1]; \
((char *)&(b))[3] = ((char *)&(a))[0]; \
}
/*
* Little endian <==> big endian 16-bit swap macros.
* M_16_SWAP swap a memory location
* P_16_SWAP swap a referenced memory location
* P_16_COPY swap from one location to another
*/
#define M_16_SWAP(a) { \
u_int16_t _tmp = a; \
((char *)&a)[0] = ((char *)&_tmp)[1]; \
((char *)&a)[1] = ((char *)&_tmp)[0]; \
}
#define P_16_SWAP(a) { \
u_int16_t _tmp = *(u_int16_t *)a; \
((char *)a)[0] = ((char *)&_tmp)[1]; \
((char *)a)[1] = ((char *)&_tmp)[0]; \
}
#define P_16_COPY(a, b) { \
((char *)&(b))[0] = ((char *)&(a))[1]; \
((char *)&(b))[1] = ((char *)&(a))[0]; \
}
#endif
__BEGIN_DECLS
DB *dbopen __P((const char *, int, int, DBTYPE, const void *));
#ifdef __DBINTERFACE_PRIVATE
DB *__bt_open __P((const char *, int, int, const BTREEINFO *, int));
DB *__hash_open __P((const char *, int, int, const HASHINFO *, int));
DB *__rec_open __P((const char *, int, int, const RECNOINFO *, int));
void __dbpanic __P((DB *dbp));
#endif
__END_DECLS
#endif /* !_DB_H_ */

View file

@ -1 +0,0 @@
../../include/mpool.h

View file

@ -1 +0,0 @@
../../include/ndbm.h

View file

@ -1 +0,0 @@
../../include/queue.h

View file

@ -1 +0,0 @@
include

View file

@ -1 +0,0 @@
../Makefile

View file

@ -1,19 +0,0 @@
*** PORT/db/recno/rec_open.c.orig Mon Aug 16 16:29:18 1993
--- PORT/db/recno/rec_open.c Mon Aug 16 16:29:35 1993
***************
*** 159,165 ****
else {
t->bt_msize = sb.st_size;
if ((t->bt_smap = mmap(NULL, t->bt_msize,
! PROT_READ, MAP_PRIVATE, rfd,
(off_t)0)) == (caddr_t)-1)
goto slow;
t->bt_cmap = t->bt_smap;
--- 159,165 ----
else {
t->bt_msize = sb.st_size;
if ((t->bt_smap = mmap(NULL, t->bt_msize,
! PROT_READ, MAP_FILE | MAP_PRIVATE, rfd,
(off_t)0)) == (caddr_t)-1)
goto slow;
t->bt_cmap = t->bt_smap;

View file

@ -1 +0,0 @@
../clib

View file

@ -1,54 +0,0 @@
/*-
* Copyright (c) 1990 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.
*
* @(#)assert.h 4.4 (Berkeley) 4/3/91
*/
#ifndef _ASSERT_H_
#define _ASSERT_H_
#ifdef NDEBUG
#define assert(expression)
#define _assert(expression)
#else
#define assert(expression) { \
if (!(expression)) { \
(void)fprintf(stderr, \
"assertion \"%s\" failed: file \"%s\", line %d\n", \
"expression", __FILE__, __LINE__); \
exit(2); \
} \
}
#define _assert(expression) assert(expression)
#endif
#endif /* !_ASSERT_H_ */

View file

@ -1 +0,0 @@
../../include/cdefs.h

View file

@ -1,231 +0,0 @@
/*-
* Copyright (c) 1991, 1993
* 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.
*
* @(#)compat.h 8.13 (Berkeley) 2/21/94
*/
#ifndef _COMPAT_H_
#define _COMPAT_H_
#include <sys/types.h>
/*
* If your system doesn't typedef u_long, u_short, or u_char, change
* the 0 to a 1.
*/
#if 0
typedef unsigned char u_char; /* 4.[34]BSD names. */
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned short u_short;
#endif
/* If your system doesn't typedef size_t, change the 0 to a 1. */
#if 0
typedef unsigned int size_t; /* POSIX, 4.[34]BSD names. */
#endif
/* If your system doesn't typedef ssize_t, change the 0 to a 1. */
#if 0
typedef int ssize_t; /* POSIX names. */
#endif
/*
* If your system doesn't have the POSIX type for a signal mask,
* change the 0 to a 1.
*/
#if 0 /* POSIX 1003.1 signal mask type. */
typedef unsigned int sigset_t;
#endif
/*
* If your system's vsprintf returns a char *, not an int,
* change the 0 to a 1.
*/
#if 0
#define VSPRINTF_CHARSTAR
#endif
/*
* If you don't have POSIX 1003.1 signals, the signal code surrounding the
* temporary file creation is intended to block all of the possible signals
* long enough to create the file and unlink it. All of this stuff is
* intended to use old-style BSD calls to fake POSIX 1003.1 calls.
*/
#ifdef NO_POSIX_SIGNALS
#define sigemptyset(set) (*(set) = 0)
#define sigfillset(set) (*(set) = ~(sigset_t)0, 0)
#define sigaddset(set,signo) (*(set) |= sigmask(signo), 0)
#define sigdelset(set,signo) (*(set) &= ~sigmask(signo), 0)
#define sigismember(set,signo) ((*(set) & sigmask(signo)) != 0)
#define SIG_BLOCK 1
#define SIG_UNBLOCK 2
#define SIG_SETMASK 3
static int __sigtemp; /* For the use of sigprocmask */
/* Repeated test of oset != NULL is to avoid "*0". */
#define sigprocmask(how, set, oset) \
((__sigtemp = \
(((how) == SIG_BLOCK) ? \
sigblock(0) | *(set) : \
(((how) == SIG_UNBLOCK) ? \
sigblock(0) & ~(*(set)) : \
((how) == SIG_SETMASK ? \
*(set) : sigblock(0))))), \
((oset) ? (*(oset ? oset : set) = sigsetmask(__sigtemp)) : \
sigsetmask(__sigtemp)), 0)
#endif
/*
* If your system doesn't have an include file with the appropriate
* byte order set, make sure you specify the correct one.
*/
#ifndef BYTE_ORDER
#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
#define BYTE_ORDER LITTLE_ENDIAN /* Set for your system. */
#endif
#if defined(SYSV) || defined(SYSTEM5)
#define index(a, b) strchr(a, b)
#define rindex(a, b) strrchr(a, b)
#define bzero(a, b) memset(a, 0, b)
#define bcmp(a, b, n) memcmp(a, b, n)
#define bcopy(a, b, n) memmove(b, a, n)
#endif
#if defined(BSD) || defined(BSD4_3)
#define strchr(a, b) index(a, b)
#define strrchr(a, b) rindex(a, b)
#define memcmp(a, b, n) bcmp(a, b, n)
#define memmove(a, b, n) bcopy(b, a, n)
#endif
/*
* 32-bit machine. The db routines are theoretically independent of
* the size of u_shorts and u_longs, but I don't know that anyone has
* ever actually tried it. At a minimum, change the following #define's
* if you are trying to compile on a different type of system.
*/
#ifndef USHRT_MAX
#define USHRT_MAX 0xFFFF
#define ULONG_MAX 0xFFFFFFFF
#endif
#ifndef O_ACCMODE /* POSIX 1003.1 access mode mask. */
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
#endif
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 RE limit. */
#define _POSIX2_RE_DUP_MAX 255
#endif
/*
* If you can't provide lock values in the open(2) call. Note, this
* allows races to happen.
*/
#ifndef O_EXLOCK /* 4.4BSD extension. */
#define O_EXLOCK 0
#endif
#ifndef O_SHLOCK /* 4.4BSD extension. */
#define O_SHLOCK 0
#endif
#ifndef EFTYPE
#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */
#endif
#ifndef WCOREDUMP /* 4.4BSD extension */
#define WCOREDUMP(a) 0
#endif
#ifndef STDERR_FILENO
#define STDIN_FILENO 0 /* ANSI C #defines */
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
#endif
#ifndef SEEK_END
#define SEEK_SET 0 /* POSIX 1003.1 seek values */
#define SEEK_CUR 1
#define SEEK_END 2
#endif
#ifndef _POSIX_VDISABLE /* POSIX 1003.1 disabling char. */
#define _POSIX_VDISABLE 0 /* Some systems used 0. */
#endif
#ifndef TCSASOFT /* 4.4BSD extension. */
#define TCSASOFT 0
#endif
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 values. */
#define _POSIX2_RE_DUP_MAX 255
#endif
#ifndef NULL /* ANSI C #defines NULL everywhere. */
#define NULL 0
#endif
#ifndef MAX /* Usually found in <sys/param.h>. */
#define MAX(_a,_b) ((_a)<(_b)?(_b):(_a))
#endif
#ifndef MIN /* Usually found in <sys/param.h>. */
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
#endif
/* Default file permissions. */
#ifndef DEFFILEMODE /* 4.4BSD extension. */
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
#endif
#ifndef S_ISDIR /* POSIX 1003.1 file type tests. */
#define S_ISDIR(m) ((m & 0170000) == 0040000) /* directory */
#define S_ISCHR(m) ((m & 0170000) == 0020000) /* char special */
#define S_ISBLK(m) ((m & 0170000) == 0060000) /* block special */
#define S_ISREG(m) ((m & 0170000) == 0100000) /* regular file */
#define S_ISFIFO(m) ((m & 0170000) == 0010000) /* fifo */
#endif
#ifndef S_ISLNK /* BSD POSIX 1003.1 extensions */
#define S_ISLNK(m) ((m & 0170000) == 0120000) /* symbolic link */
#define S_ISSOCK(m) ((m & 0170000) == 0140000) /* socket */
#endif
/* The type of a va_list. */
#ifndef _BSD_VA_LIST_ /* 4.4BSD #define. */
#define _BSD_VA_LIST_ char *
#endif
#endif /* !_COMPAT_H_ */

View file

@ -1 +0,0 @@
../../include/db.h

View file

@ -1 +0,0 @@
../../include/mpool.h

View file

@ -1 +0,0 @@
../../include/ndbm.h

View file

@ -1 +0,0 @@
../../include/queue.h

View file

@ -1,87 +0,0 @@
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Chris Torek.
*
* 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.
*
* @(#)local.h 5.3 (Berkeley) 5/6/93
*/
/*
* Information local to this implementation of stdio,
* in particular, macros and private variables.
*/
int __sflush __P((FILE *));
FILE *__sfp __P((void));
int __srefill __P((FILE *));
int __sread __P((void *, char *, int));
int __swrite __P((void *, char const *, int));
fpos_t __sseek __P((void *, fpos_t, int));
int __sclose __P((void *));
void __sinit __P((void));
void _cleanup __P((void));
void (*__cleanup) __P((void));
void __smakebuf __P((FILE *));
int __swhatbuf __P((FILE *, size_t *, int *));
int _fwalk __P((int (*)(FILE *)));
int __swsetup __P((FILE *));
int __sflags __P((const char *, int *));
extern int __sdidinit;
/*
* Return true iff the given FILE cannot be written now.
*/
#define cantwrite(fp) \
((((fp)->_flags & __SWR) == 0 || (fp)->_bf._base == NULL) && \
__swsetup(fp))
/*
* Test whether the given stdio file has an active ungetc buffer;
* release such a buffer, without restoring ordinary unread data.
*/
#define HASUB(fp) ((fp)->_ub._base != NULL)
#define FREEUB(fp) { \
if ((fp)->_ub._base != (fp)->_ubuf) \
free((char *)(fp)->_ub._base); \
(fp)->_ub._base = NULL; \
}
/*
* test for an fgetline() buffer.
*/
#define HASLB(fp) ((fp)->_lb._base != NULL)
#define FREELB(fp) { \
free((char *)(fp)->_lb._base); \
(fp)->_lb._base = NULL; \
}

View file

@ -1,118 +0,0 @@
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Chris Torek.
*
* 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.
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)makebuf.c 5.3 (Berkeley) 5/6/93";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include "local.h"
/*
* Allocate a file buffer, or switch to unbuffered I/O.
* Per the ANSI C standard, ALL tty devices default to line buffered.
*
* As a side effect, we set __SOPT or __SNPT (en/dis-able fseek
* optimisation) right after the fstat() that finds the buffer size.
*/
void
__smakebuf(fp)
register FILE *fp;
{
register void *p;
register int flags;
size_t size;
int couldbetty;
if (fp->_flags & __SNBF) {
fp->_bf._base = fp->_p = fp->_nbuf;
fp->_bf._size = 1;
return;
}
flags = __swhatbuf(fp, &size, &couldbetty);
if ((p = malloc(size)) == NULL) {
fp->_flags |= __SNBF;
fp->_bf._base = fp->_p = fp->_nbuf;
fp->_bf._size = 1;
return;
}
__cleanup = _cleanup;
flags |= __SMBF;
fp->_bf._base = fp->_p = p;
fp->_bf._size = size;
if (couldbetty && isatty(fp->_file))
flags |= __SLBF;
fp->_flags |= flags;
}
/*
* Internal routine to determine `proper' buffering for a file.
*/
int
__swhatbuf(fp, bufsize, couldbetty)
register FILE *fp;
size_t *bufsize;
int *couldbetty;
{
struct stat st;
if (fp->_file < 0 || fstat(fp->_file, &st) < 0) {
*couldbetty = 0;
*bufsize = BUFSIZ;
return (__SNPT);
}
/* could be a tty iff it is a character device */
*couldbetty = (st.st_mode & S_IFMT) == S_IFCHR;
if (st.st_blksize <= 0) {
*bufsize = BUFSIZ;
return (__SNPT);
}
/*
* Optimise fseek() only if it is a regular file. (The test for
* __sseek is mainly paranoia.) It is safe to set _blksize
* unconditionally; it will only be used if __SOPT is also set.
*/
*bufsize = st.st_blksize;
fp->_blksize = st.st_blksize;
return ((st.st_mode & S_IFMT) == S_IFREG && fp->_seek == __sseek ?
__SOPT : __SNPT);
}

View file

@ -1,148 +0,0 @@
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Chris Torek.
*
* 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.
*/
#if defined(LIBC_SCCS) && !defined(lint)
! static char sccsid[] = "@(#)setvbuf.c 5.5 (Berkeley) 5/6/93";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
#include <stdlib.h>
#include "local.h"
/*
* Set one of the three kinds of buffering, optionally including
* a buffer.
*/
setvbuf(fp, buf, mode, size)
register FILE *fp;
char *buf;
register int mode;
register size_t size;
{
register int ret, flags;
size_t iosize;
int ttyflag;
/*
* Verify arguments. The `int' limit on `size' is due to this
* particular implementation. Note, buf and size are ignored
* when setting _IONBF.
*/
if (mode != _IONBF)
if ((mode != _IOFBF && mode != _IOLBF) || (int)size < 0)
return (EOF);
/*
* Write current buffer, if any. Discard unread input, cancel
* line buffering, and free old buffer if malloc()ed.
*/
ret = 0;
(void)__sflush(fp);
fp->_r = fp->_lbfsize = 0;
flags = fp->_flags;
if (flags & __SMBF)
free((void *)fp->_bf._base);
flags &= ~(__SLBF | __SNBF | __SMBF | __SOPT | __SNPT);
/* If setting unbuffered mode, skip all the hard work. */
if (mode == _IONBF)
goto nbf;
/*
* Find optimal I/O size for seek optimization. This also returns
* a `tty flag' to suggest that we check isatty(fd), but we do not
* care since our caller told us how to buffer.
*/
flags |= __swhatbuf(fp, &iosize, &ttyflag);
if (size == 0) {
buf = NULL; /* force local allocation */
size = iosize;
}
/* Allocate buffer if needed. */
if (buf == NULL) {
if ((buf = malloc(size)) == NULL) {
/*
* Unable to honor user's request. We will return
* failure, but try again with file system size.
*/
ret = EOF;
if (size != iosize) {
size = iosize;
buf = malloc(size);
}
}
if (buf == NULL) {
/* No luck; switch to unbuffered I/O. */
nbf:
fp->_flags = flags | __SNBF;
fp->_w = 0;
fp->_bf._base = fp->_p = fp->_nbuf;
fp->_bf._size = 1;
return (ret);
}
flags |= __SMBF;
}
/*
* Kill any seek optimization if the buffer is not the
* right size.
*
* SHOULD WE ALLOW MULTIPLES HERE (i.e., ok iff (size % iosize) == 0)?
*/
if (size != iosize)
flags |= __SNPT;
/*
* Fix up the FILE fields, and set __cleanup for output flush on
* exit (since we are buffered in some way). If in r/w mode, go
* to the intermediate state, so that everyone has to call
* __srefill or __swsetup on the first operation -- it is more
* trouble than it is worth to set things up correctly here.
*/
if (mode == _IOLBF)
flags |= __SLBF;
if (flags & __SRW)
flags &= ~(__SRD | __SWR);
fp->_w = 0;
fp->_flags = flags;
fp->_bf._base = fp->_p = (unsigned char *)buf;
fp->_bf._size = size;
fp->_lbfsize = 0;
__cleanup = _cleanup;
return (ret);
}

View file

@ -1 +0,0 @@
include

View file

@ -1,139 +0,0 @@
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Chris Torek.
*
* 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.
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)bcopy.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
#include <string.h>
/*
* sizeof(word) MUST BE A POWER OF TWO
* SO THAT wmask BELOW IS ALL ONES
*/
typedef int word; /* "word" used for optimal copy speed */
#define wsize sizeof(word)
#define wmask (wsize - 1)
/*
* Copy a block of memory, handling overlap.
* This is the routine that actually implements
* (the portable versions of) bcopy, memcpy, and memmove.
*/
#ifdef MEMCOPY
void *
memcpy(dst0, src0, length)
#else
#ifdef MEMMOVE
void *
memmove(dst0, src0, length)
#else
void
bcopy(src0, dst0, length)
#endif
#endif
void *dst0;
const void *src0;
register size_t length;
{
register char *dst = dst0;
register const char *src = src0;
register size_t t;
if (length == 0 || dst == src) /* nothing to do */
goto done;
/*
* Macros: loop-t-times; and loop-t-times, t>0
*/
#define TLOOP(s) if (t) TLOOP1(s)
#define TLOOP1(s) do { s; } while (--t)
if ((unsigned long)dst < (unsigned long)src) {
/*
* Copy forward.
*/
t = (int)src; /* only need low bits */
if ((t | (int)dst) & wmask) {
/*
* Try to align operands. This cannot be done
* unless the low bits match.
*/
if ((t ^ (int)dst) & wmask || length < wsize)
t = length;
else
t = wsize - (t & wmask);
length -= t;
TLOOP1(*dst++ = *src++);
}
/*
* Copy whole words, then mop up any trailing bytes.
*/
t = length / wsize;
TLOOP(*(word *)dst = *(word *)src; src += wsize; dst += wsize);
t = length & wmask;
TLOOP(*dst++ = *src++);
} else {
/*
* Copy backwards. Otherwise essentially the same.
* Alignment works as before, except that it takes
* (t&wmask) bytes to align, not wsize-(t&wmask).
*/
src += length;
dst += length;
t = (int)src;
if ((t | (int)dst) & wmask) {
if ((t ^ (int)dst) & wmask || length <= wsize)
t = length;
else
t &= wmask;
length -= t;
TLOOP1(*--dst = *--src);
}
t = length / wsize;
TLOOP(src -= wsize; dst -= wsize; *(word *)dst = *(word *)src);
t = length & wmask;
TLOOP(*--dst = *--src);
}
done:
#if defined(MEMCOPY) || defined(MEMMOVE)
return (dst0);
#else
return;
#endif
}

View file

@ -1,126 +0,0 @@
/*
* Copyright (c) 1987, 1993
* 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.
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <ctype.h>
static int _gettemp();
mkstemp(path)
char *path;
{
int fd;
return (_gettemp(path, &fd) ? fd : -1);
}
char *
mktemp(path)
char *path;
{
return(_gettemp(path, (int *)NULL) ? path : (char *)NULL);
}
static
_gettemp(path, doopen)
char *path;
register int *doopen;
{
extern int errno;
register char *start, *trv;
struct stat sbuf;
u_int pid;
pid = getpid();
for (trv = path; *trv; ++trv); /* extra X's get set to 0's */
while (*--trv == 'X') {
*trv = (pid % 10) + '0';
pid /= 10;
}
/*
* check the target directory; if you have six X's and it
* doesn't exist this runs for a *very* long time.
*/
for (start = trv + 1;; --trv) {
if (trv <= path)
break;
if (*trv == '/') {
*trv = '\0';
if (stat(path, &sbuf))
return(0);
if (!S_ISDIR(sbuf.st_mode)) {
errno = ENOTDIR;
return(0);
}
*trv = '/';
break;
}
}
for (;;) {
if (doopen) {
if ((*doopen =
open(path, O_CREAT|O_EXCL|O_RDWR, 0600)) >= 0)
return(1);
if (errno != EEXIST)
return(0);
}
else if (stat(path, &sbuf))
return(errno == ENOENT ? 1 : 0);
/* tricky little algorithm for backward compatibility */
for (trv = start;;) {
if (!*trv)
return(0);
if (*trv == 'z')
*trv++ = 'a';
else {
if (isdigit(*trv))
*trv = 'a';
else
++*trv;
break;
}
}
}
/*NOTREACHED*/
}

View file

@ -1,54 +0,0 @@
#include <sys/types.h>
#include <sys/cdefs.h>
#include <compat.h>
#ifdef __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
int
#ifdef __STDC__
snprintf(char *str, size_t n, const char *fmt, ...)
#else
snprintf(str, n, fmt, va_alist)
char *str;
size_t n;
const char *fmt;
va_dcl
#endif
{
va_list ap;
char *rp;
int rval;
#ifdef __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
#ifdef VSPRINTF_CHARSTAR
rp = vsprintf(str, fmt, ap);
va_end(ap);
return (strlen(rp));
#else
rval = vsprintf(str, fmt, ap);
va_end(ap);
return (rval);
#endif
}
int
vsnprintf(str, n, fmt, ap)
char *str;
size_t n;
const char *fmt;
va_list ap;
{
#ifdef VSPRINTF_CHARSTAR
return (strlen(vsprintf(str, fmt, ap)));
#else
return (vsprintf(str, fmt, ap));
#endif
}

View file

@ -1,67 +0,0 @@
/*
* Copyright (c) 1988, 1993
* 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.
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)strerror.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
char *
strerror(num)
int num;
{
extern int sys_nerr;
extern char *sys_errlist[];
#define UPREFIX "Unknown error: "
static char ebuf[40] = UPREFIX; /* 64-bit number + slop */
register unsigned int errnum;
register char *p, *t;
char tmp[40];
errnum = num; /* convert to unsigned */
if (errnum < sys_nerr)
return(sys_errlist[errnum]);
/* Do this by hand, so we don't include stdio(3). */
t = tmp;
do {
*t++ = "0123456789"[errnum % 10];
} while (errnum /= 10);
for (p = ebuf + sizeof(UPREFIX) - 1;;) {
*p++ = *--t;
if (t <= tmp)
break;
}
return(ebuf);
}

View file

@ -1,103 +0,0 @@
# @(#)Makefile 8.9 (Berkeley) 7/14/94
LIBDB= libdb.a
OBJ1= hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.o \
hsearch.o ndbm.o
OBJ2= 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_utils.o
OBJ3= db.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
MISC=
${LIBDB}: ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
rm -f $@
ar cq $@ \
`lorder ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC} | tsort`
ranlib $@
clean:
rm -f ${LIBDB} ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
CC= gcc
OORG= -O2
CL= ${CC} -c -D__DBINTERFACE_PRIVATE ${OORG} -I. -Iinclude
hash.o: ../../hash/hash.c
${CL} -I../../hash ../../hash/hash.c
hash_bigkey.o: ../../hash/hash_bigkey.c
${CL} -I../../hash ../../hash/hash_bigkey.c
hash_buf.o: ../../hash/hash_buf.c
${CL} -I../../hash ../../hash/hash_buf.c
hash_func.o: ../../hash/hash_func.c
${CL} -I../../hash ../../hash/hash_func.c
hash_log2.o: ../../hash/hash_log2.c
${CL} -I../../hash ../../hash/hash_log2.c
hash_page.o: ../../hash/hash_page.c
${CL} -I../../hash ../../hash/hash_page.c
hsearch.o: ../../hash/hsearch.c
${CL} -I../../hash ../../hash/hsearch.c
ndbm.o: ../../hash/ndbm.c
${CL} -I../../hash ../../hash/ndbm.c
bt_close.o: ../../btree/bt_close.c
${CL} -I../../btree ../../btree/bt_close.c
bt_conv.o: ../../btree/bt_conv.c
${CL} -I../../btree ../../btree/bt_conv.c
bt_debug.o: ../../btree/bt_debug.c
${CL} -I../../btree ../../btree/bt_debug.c
bt_delete.o: ../../btree/bt_delete.c
${CL} -I../../btree ../../btree/bt_delete.c
bt_get.o: ../../btree/bt_get.c
${CL} -I../../btree ../../btree/bt_get.c
bt_open.o: ../../btree/bt_open.c
${CL} -I../../btree ../../btree/bt_open.c
bt_overflow.o: ../../btree/bt_overflow.c
${CL} -I../../btree ../../btree/bt_overflow.c
bt_page.o: ../../btree/bt_page.c
${CL} -I../../btree ../../btree/bt_page.c
bt_put.o: ../../btree/bt_put.c
${CL} -I../../btree ../../btree/bt_put.c
bt_search.o: ../../btree/bt_search.c
${CL} -I../../btree ../../btree/bt_search.c
bt_seq.o: ../../btree/bt_seq.c
${CL} -I../../btree ../../btree/bt_seq.c
bt_split.o: ../../btree/bt_split.c
${CL} -I../../btree ../../btree/bt_split.c
bt_stack.o: ../../btree/bt_stack.c
${CL} -I../../btree ../../btree/bt_stack.c
bt_utils.o: ../../btree/bt_utils.c
${CL} -I../../btree ../../btree/bt_utils.c
db.o: ../../db/db.c
${CL} ../../db/db.c
mpool.o: ../../mpool/mpool.c
${CL} -I../../mpool ../../mpool/mpool.c
rec_close.o: ../../recno/rec_close.c
${CL} -I../../recno ../../recno/rec_close.c
rec_delete.o: ../../recno/rec_delete.c
${CL} -I../../recno ../../recno/rec_delete.c
rec_get.o: ../../recno/rec_get.c
${CL} -I../../recno ../../recno/rec_get.c
rec_open.o: ../../recno/rec_open.c
${CL} -I../../recno ../../recno/rec_open.c
rec_put.o: ../../recno/rec_put.c
${CL} -I../../recno ../../recno/rec_put.c
rec_search.o: ../../recno/rec_search.c
${CL} -I../../recno ../../recno/rec_search.c
rec_seq.o: ../../recno/rec_seq.c
${CL} -I../../recno ../../recno/rec_seq.c
rec_utils.o: ../../recno/rec_utils.c
${CL} -I../../recno ../../recno/rec_utils.c
memmove.o:
${CC} -DMEMMOVE -c -O -I. -Iinclude clib/memmove.c
mktemp.o:
${CC} -c -O -I. -Iinclude clib/mktemp.c
snprintf.o:
${CC} -c -O -I. -Iinclude clib/snprintf.c

View file

@ -1 +0,0 @@
../clib

View file

@ -1 +0,0 @@
../../include/cdefs.h

View file

@ -1,231 +0,0 @@
/*-
* Copyright (c) 1991, 1993
* 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.
*
* @(#)compat.h 8.13 (Berkeley) 2/21/94
*/
#ifndef _COMPAT_H_
#define _COMPAT_H_
#include <sys/types.h>
/*
* If your system doesn't typedef u_long, u_short, or u_char, change
* the 0 to a 1.
*/
#if 0
typedef unsigned char u_char; /* 4.[34]BSD names. */
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned short u_short;
#endif
/* If your system doesn't typedef size_t, change the 0 to a 1. */
#if 0
typedef unsigned int size_t; /* POSIX, 4.[34]BSD names. */
#endif
/* If your system doesn't typedef ssize_t, change the 0 to a 1. */
#if 0
typedef int ssize_t; /* POSIX names. */
#endif
/*
* If your system doesn't have the POSIX type for a signal mask,
* change the 0 to a 1.
*/
#if 0 /* POSIX 1003.1 signal mask type. */
typedef unsigned int sigset_t;
#endif
/*
* If your system's vsprintf returns a char *, not an int,
* change the 0 to a 1.
*/
#if 0
#define VSPRINTF_CHARSTAR
#endif
/*
* If you don't have POSIX 1003.1 signals, the signal code surrounding the
* temporary file creation is intended to block all of the possible signals
* long enough to create the file and unlink it. All of this stuff is
* intended to use old-style BSD calls to fake POSIX 1003.1 calls.
*/
#ifdef NO_POSIX_SIGNALS
#define sigemptyset(set) (*(set) = 0)
#define sigfillset(set) (*(set) = ~(sigset_t)0, 0)
#define sigaddset(set,signo) (*(set) |= sigmask(signo), 0)
#define sigdelset(set,signo) (*(set) &= ~sigmask(signo), 0)
#define sigismember(set,signo) ((*(set) & sigmask(signo)) != 0)
#define SIG_BLOCK 1
#define SIG_UNBLOCK 2
#define SIG_SETMASK 3
static int __sigtemp; /* For the use of sigprocmask */
/* Repeated test of oset != NULL is to avoid "*0". */
#define sigprocmask(how, set, oset) \
((__sigtemp = \
(((how) == SIG_BLOCK) ? \
sigblock(0) | *(set) : \
(((how) == SIG_UNBLOCK) ? \
sigblock(0) & ~(*(set)) : \
((how) == SIG_SETMASK ? \
*(set) : sigblock(0))))), \
((oset) ? (*(oset ? oset : set) = sigsetmask(__sigtemp)) : \
sigsetmask(__sigtemp)), 0)
#endif
/*
* If your system doesn't have an include file with the appropriate
* byte order set, make sure you specify the correct one.
*/
#ifndef BYTE_ORDER
#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
#define BYTE_ORDER BIG_ENDIAN /* Set for your system. */
#endif
#if defined(SYSV) || defined(SYSTEM5)
#define index(a, b) strchr(a, b)
#define rindex(a, b) strrchr(a, b)
#define bzero(a, b) memset(a, 0, b)
#define bcmp(a, b, n) memcmp(a, b, n)
#define bcopy(a, b, n) memmove(b, a, n)
#endif
#if defined(BSD) || defined(BSD4_3)
#define strchr(a, b) index(a, b)
#define strrchr(a, b) rindex(a, b)
#define memcmp(a, b, n) bcmp(a, b, n)
#define memmove(a, b, n) bcopy(b, a, n)
#endif
/*
* 32-bit machine. The db routines are theoretically independent of
* the size of u_shorts and u_longs, but I don't know that anyone has
* ever actually tried it. At a minimum, change the following #define's
* if you are trying to compile on a different type of system.
*/
#ifndef USHRT_MAX
#define USHRT_MAX 0xFFFF
#define ULONG_MAX 0xFFFFFFFF
#endif
#ifndef O_ACCMODE /* POSIX 1003.1 access mode mask. */
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
#endif
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 RE limit. */
#define _POSIX2_RE_DUP_MAX 255
#endif
/*
* If you can't provide lock values in the open(2) call. Note, this
* allows races to happen.
*/
#ifndef O_EXLOCK /* 4.4BSD extension. */
#define O_EXLOCK 0
#endif
#ifndef O_SHLOCK /* 4.4BSD extension. */
#define O_SHLOCK 0
#endif
#ifndef EFTYPE
#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */
#endif
#ifndef WCOREDUMP /* 4.4BSD extension */
#define WCOREDUMP(a) 0
#endif
#ifndef STDERR_FILENO
#define STDIN_FILENO 0 /* ANSI C #defines */
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
#endif
#ifndef SEEK_END
#define SEEK_SET 0 /* POSIX 1003.1 seek values */
#define SEEK_CUR 1
#define SEEK_END 2
#endif
#ifndef _POSIX_VDISABLE /* POSIX 1003.1 disabling char. */
#define _POSIX_VDISABLE 0 /* Some systems used 0. */
#endif
#ifndef TCSASOFT /* 4.4BSD extension. */
#define TCSASOFT 0
#endif
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 values. */
#define _POSIX2_RE_DUP_MAX 255
#endif
#ifndef NULL /* ANSI C #defines NULL everywhere. */
#define NULL 0
#endif
#ifndef MAX /* Usually found in <sys/param.h>. */
#define MAX(_a,_b) ((_a)<(_b)?(_b):(_a))
#endif
#ifndef MIN /* Usually found in <sys/param.h>. */
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
#endif
/* Default file permissions. */
#ifndef DEFFILEMODE /* 4.4BSD extension. */
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
#endif
#ifndef S_ISDIR /* POSIX 1003.1 file type tests. */
#define S_ISDIR(m) ((m & 0170000) == 0040000) /* directory */
#define S_ISCHR(m) ((m & 0170000) == 0020000) /* char special */
#define S_ISBLK(m) ((m & 0170000) == 0060000) /* block special */
#define S_ISREG(m) ((m & 0170000) == 0100000) /* regular file */
#define S_ISFIFO(m) ((m & 0170000) == 0010000) /* fifo */
#endif
#ifndef S_ISLNK /* BSD POSIX 1003.1 extensions */
#define S_ISLNK(m) ((m & 0170000) == 0120000) /* symbolic link */
#define S_ISSOCK(m) ((m & 0170000) == 0140000) /* socket */
#endif
/* The type of a va_list. */
#ifndef _BSD_VA_LIST_ /* 4.4BSD #define. */
#define _BSD_VA_LIST_ char *
#endif
#endif /* !_COMPAT_H_ */

View file

@ -1 +0,0 @@
../../include/db.h

View file

@ -1 +0,0 @@
../../include/mpool.h

View file

@ -1 +0,0 @@
../../include/ndbm.h

View file

@ -1 +0,0 @@
../../include/queue.h

View file

@ -1 +0,0 @@
include

View file

@ -1 +0,0 @@
hpux.9.01

View file

@ -1,102 +0,0 @@
# @(#)Makefile 8.9 (Berkeley) 7/14/94
LIBDB= libdb.a
OBJ1= hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.o \
hsearch.o ndbm.o
OBJ2= 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_utils.o
OBJ3= db.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
MISC= snprintf.o
${LIBDB}: ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
rm -f $@
ar cq $@ \
`lorder ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC} | tsort`
ranlib $@
clean:
rm -f ${LIBDB} ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
OORG= -O
CL= ${CC} -c -D__DBINTERFACE_PRIVATE ${OORG} -I. -Iinclude
hash.o: ../../hash/hash.c
${CL} -I../../hash ../../hash/hash.c
hash_bigkey.o: ../../hash/hash_bigkey.c
${CL} -I../../hash ../../hash/hash_bigkey.c
hash_buf.o: ../../hash/hash_buf.c
${CL} -I../../hash ../../hash/hash_buf.c
hash_func.o: ../../hash/hash_func.c
${CL} -I../../hash ../../hash/hash_func.c
hash_log2.o: ../../hash/hash_log2.c
${CL} -I../../hash ../../hash/hash_log2.c
hash_page.o: ../../hash/hash_page.c
${CL} -I../../hash ../../hash/hash_page.c
hsearch.o: ../../hash/hsearch.c
${CL} -I../../hash ../../hash/hsearch.c
ndbm.o: ../../hash/ndbm.c
${CL} -I../../hash ../../hash/ndbm.c
bt_close.o: ../../btree/bt_close.c
${CL} -I../../btree ../../btree/bt_close.c
bt_conv.o: ../../btree/bt_conv.c
${CL} -I../../btree ../../btree/bt_conv.c
bt_debug.o: ../../btree/bt_debug.c
${CL} -I../../btree ../../btree/bt_debug.c
bt_delete.o: ../../btree/bt_delete.c
${CL} -I../../btree ../../btree/bt_delete.c
bt_get.o: ../../btree/bt_get.c
${CL} -I../../btree ../../btree/bt_get.c
bt_open.o: ../../btree/bt_open.c
${CL} -I../../btree ../../btree/bt_open.c
bt_overflow.o: ../../btree/bt_overflow.c
${CL} -I../../btree ../../btree/bt_overflow.c
bt_page.o: ../../btree/bt_page.c
${CL} -I../../btree ../../btree/bt_page.c
bt_put.o: ../../btree/bt_put.c
${CL} -I../../btree ../../btree/bt_put.c
bt_search.o: ../../btree/bt_search.c
${CL} -I../../btree ../../btree/bt_search.c
bt_seq.o: ../../btree/bt_seq.c
${CL} -I../../btree ../../btree/bt_seq.c
bt_split.o: ../../btree/bt_split.c
${CL} -I../../btree ../../btree/bt_split.c
bt_stack.o: ../../btree/bt_stack.c
${CL} -I../../btree ../../btree/bt_stack.c
bt_utils.o: ../../btree/bt_utils.c
${CL} -I../../btree ../../btree/bt_utils.c
db.o: ../../db/db.c
${CL} ../../db/db.c
mpool.o: ../../mpool/mpool.c
${CL} -I../../mpool ../../mpool/mpool.c
rec_close.o: ../../recno/rec_close.c
${CL} -I../../recno ../../recno/rec_close.c
rec_delete.o: ../../recno/rec_delete.c
${CL} -I../../recno ../../recno/rec_delete.c
rec_get.o: ../../recno/rec_get.c
${CL} -I../../recno ../../recno/rec_get.c
rec_open.o: ../../recno/rec_open.c
${CL} -I../../recno ../../recno/rec_open.c
rec_put.o: ../../recno/rec_put.c
${CL} -I../../recno ../../recno/rec_put.c
rec_search.o: ../../recno/rec_search.c
${CL} -I../../recno ../../recno/rec_search.c
rec_seq.o: ../../recno/rec_seq.c
${CL} -I../../recno ../../recno/rec_seq.c
rec_utils.o: ../../recno/rec_utils.c
${CL} -I../../recno ../../recno/rec_utils.c
memmove.o:
${CC} -DMEMMOVE -c -O -I. -Iinclude clib/memmove.c
mktemp.o:
${CC} -c -O -I. -Iinclude clib/mktemp.c
snprintf.o:
${CC} -c -O -I. -Iinclude clib/snprintf.c

View file

@ -1 +0,0 @@
../clib

View file

@ -1 +0,0 @@
../../include/cdefs.h

View file

@ -1,231 +0,0 @@
/*-
* Copyright (c) 1991, 1993
* 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.
*
* @(#)compat.h 8.13 (Berkeley) 2/21/94
*/
#ifndef _COMPAT_H_
#define _COMPAT_H_
#include <sys/types.h>
/*
* If your system doesn't typedef u_long, u_short, or u_char, change
* the 0 to a 1.
*/
#if 0
typedef unsigned char u_char; /* 4.[34]BSD names. */
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned short u_short;
#endif
/* If your system doesn't typedef size_t, change the 0 to a 1. */
#if 0
typedef unsigned int size_t; /* POSIX, 4.[34]BSD names. */
#endif
/* If your system doesn't typedef ssize_t, change the 0 to a 1. */
#if 0
typedef int ssize_t; /* POSIX names. */
#endif
/*
* If your system doesn't have the POSIX type for a signal mask,
* change the 0 to a 1.
*/
#if 0 /* POSIX 1003.1 signal mask type. */
typedef unsigned int sigset_t;
#endif
/*
* If your system's vsprintf returns a char *, not an int,
* change the 0 to a 1.
*/
#if 0
#define VSPRINTF_CHARSTAR
#endif
/*
* If you don't have POSIX 1003.1 signals, the signal code surrounding the
* temporary file creation is intended to block all of the possible signals
* long enough to create the file and unlink it. All of this stuff is
* intended to use old-style BSD calls to fake POSIX 1003.1 calls.
*/
#ifdef NO_POSIX_SIGNALS
#define sigemptyset(set) (*(set) = 0)
#define sigfillset(set) (*(set) = ~(sigset_t)0, 0)
#define sigaddset(set,signo) (*(set) |= sigmask(signo), 0)
#define sigdelset(set,signo) (*(set) &= ~sigmask(signo), 0)
#define sigismember(set,signo) ((*(set) & sigmask(signo)) != 0)
#define SIG_BLOCK 1
#define SIG_UNBLOCK 2
#define SIG_SETMASK 3
static int __sigtemp; /* For the use of sigprocmask */
/* Repeated test of oset != NULL is to avoid "*0". */
#define sigprocmask(how, set, oset) \
((__sigtemp = \
(((how) == SIG_BLOCK) ? \
sigblock(0) | *(set) : \
(((how) == SIG_UNBLOCK) ? \
sigblock(0) & ~(*(set)) : \
((how) == SIG_SETMASK ? \
*(set) : sigblock(0))))), \
((oset) ? (*(oset ? oset : set) = sigsetmask(__sigtemp)) : \
sigsetmask(__sigtemp)), 0)
#endif
/*
* If your system doesn't have an include file with the appropriate
* byte order set, make sure you specify the correct one.
*/
#ifndef BYTE_ORDER
#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
#define BYTE_ORDER BIG_ENDIAN /* Set for your system. */
#endif
#if defined(SYSV) || defined(SYSTEM5)
#define index(a, b) strchr(a, b)
#define rindex(a, b) strrchr(a, b)
#define bzero(a, b) memset(a, 0, b)
#define bcmp(a, b, n) memcmp(a, b, n)
#define bcopy(a, b, n) memmove(b, a, n)
#endif
#if defined(BSD) || defined(BSD4_3)
#define strchr(a, b) index(a, b)
#define strrchr(a, b) rindex(a, b)
#define memcmp(a, b, n) bcmp(a, b, n)
#define memmove(a, b, n) bcopy(b, a, n)
#endif
/*
* 32-bit machine. The db routines are theoretically independent of
* the size of u_shorts and u_longs, but I don't know that anyone has
* ever actually tried it. At a minimum, change the following #define's
* if you are trying to compile on a different type of system.
*/
#ifndef USHRT_MAX
#define USHRT_MAX 0xFFFF
#define ULONG_MAX 0xFFFFFFFF
#endif
#ifndef O_ACCMODE /* POSIX 1003.1 access mode mask. */
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
#endif
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 RE limit. */
#define _POSIX2_RE_DUP_MAX 255
#endif
/*
* If you can't provide lock values in the open(2) call. Note, this
* allows races to happen.
*/
#ifndef O_EXLOCK /* 4.4BSD extension. */
#define O_EXLOCK 0
#endif
#ifndef O_SHLOCK /* 4.4BSD extension. */
#define O_SHLOCK 0
#endif
#ifndef EFTYPE
#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */
#endif
#ifndef WCOREDUMP /* 4.4BSD extension */
#define WCOREDUMP(a) 0
#endif
#ifndef STDERR_FILENO
#define STDIN_FILENO 0 /* ANSI C #defines */
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
#endif
#ifndef SEEK_END
#define SEEK_SET 0 /* POSIX 1003.1 seek values */
#define SEEK_CUR 1
#define SEEK_END 2
#endif
#ifndef _POSIX_VDISABLE /* POSIX 1003.1 disabling char. */
#define _POSIX_VDISABLE 0 /* Some systems used 0. */
#endif
#ifndef TCSASOFT /* 4.4BSD extension. */
#define TCSASOFT 0
#endif
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 values. */
#define _POSIX2_RE_DUP_MAX 255
#endif
#ifndef NULL /* ANSI C #defines NULL everywhere. */
#define NULL 0
#endif
#ifndef MAX /* Usually found in <sys/param.h>. */
#define MAX(_a,_b) ((_a)<(_b)?(_b):(_a))
#endif
#ifndef MIN /* Usually found in <sys/param.h>. */
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
#endif
/* Default file permissions. */
#ifndef DEFFILEMODE /* 4.4BSD extension. */
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
#endif
#ifndef S_ISDIR /* POSIX 1003.1 file type tests. */
#define S_ISDIR(m) ((m & 0170000) == 0040000) /* directory */
#define S_ISCHR(m) ((m & 0170000) == 0020000) /* char special */
#define S_ISBLK(m) ((m & 0170000) == 0060000) /* block special */
#define S_ISREG(m) ((m & 0170000) == 0100000) /* regular file */
#define S_ISFIFO(m) ((m & 0170000) == 0010000) /* fifo */
#endif
#ifndef S_ISLNK /* BSD POSIX 1003.1 extensions */
#define S_ISLNK(m) ((m & 0170000) == 0120000) /* symbolic link */
#define S_ISSOCK(m) ((m & 0170000) == 0140000) /* socket */
#endif
/* The type of a va_list. */
#ifndef _BSD_VA_LIST_ /* 4.4BSD #define. */
#define _BSD_VA_LIST_ char *
#endif
#endif /* !_COMPAT_H_ */

View file

@ -1 +0,0 @@
../../include/db.h

View file

@ -1 +0,0 @@
../../include/mpool.h

View file

@ -1 +0,0 @@
../../include/ndbm.h

View file

@ -1 +0,0 @@
../../include/queue.h

View file

@ -1,75 +0,0 @@
/*
* Derived from:
* static char sccsid[] = "@(#)siglist.c 8.1 (Berkeley) 6/4/93";
*/
#include <sys/cdefs.h>
#include <signal.h>
const char *const sys_signame[NSIG] = {
"Signal 0",
"hup", /* SIGHUP */
"int", /* SIGINT */
"quit", /* SIGQUIT */
"ill", /* SIGILL */
"trap", /* SIGTRAP */
"abrt", /* SIGABRT */
"emt", /* SIGEMT */
"fpe", /* SIGFPE */
"kill", /* SIGKILL */
"bus", /* SIGBUS */
"segv", /* SIGSEGV */
"sys", /* SIGSYS */
"pipe", /* SIGPIPE */
"alrm", /* SIGALRM */
"term", /* SIGTERM */
"usr1", /* SIGUSR1 */
"usr2", /* SIGUSR2 */
"chld", /* SIGCHLD */
"pwr", /* SIGPWR */
"vtalrm", /* SIGVTALRM */
"prof", /* SIGPROF */
"io", /* SIGIO */
"winch", /* SIGWINCH */
"stop", /* SIGSTOP */
"tstp", /* SIGTSTP */
"cont", /* SIGCONT */
"ttin", /* SIGTTIN */
"ttou", /* SIGTTOU */
"urg", /* SIGURG */
"lost", /* SIGLOST */
};
const char *const sys_siglist[NSIG] = {
"Signal 0",
"Hangup", /* SIGHUP */
"Interrupt", /* SIGINT */
"Quit", /* SIGQUIT */
"Illegal instruction", /* SIGILL */
"Trace/BPT trap", /* SIGTRAP */
"Abort trap", /* SIGABRT */
"EMT trap", /* SIGEMT */
"Floating point exception", /* SIGFPE */
"Killed", /* SIGKILL */
"Bus error", /* SIGBUS */
"Segmentation fault", /* SIGSEGV */
"Bad system call", /* SIGSYS */
"Broken pipe", /* SIGPIPE */
"Alarm clock", /* SIGALRM */
"Terminated", /* SIGTERM */
"User defined signal 1", /* SIGUSR1 */
"User defined signal 2" /* SIGUSR2 */
"Child exited", /* SIGCHLD */
"Power failure", /* SIGPWR */
"Virtual timer expired", /* SIGVTALRM */
"Profiling timer expired", /* SIGPROF */
"I/O possible", /* SIGIO */
"Window size changes", /* SIGWINCH */
"Suspended (signal)", /* SIGSTOP */
"Suspended", /* SIGTSTP */
"Continued", /* SIGCONT */
"Stopped (tty input)", /* SIGTTIN */
"Stopped (tty output)", /* SIGTTOU */
"Urgent I/O condition", /* SIGURG */
"File lock lost", /* SIGLOST */
};

View file

@ -1 +0,0 @@
include

View file

@ -1 +0,0 @@
queue.h

View file

@ -1,122 +0,0 @@
/*
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Berkeley Software Design, Inc.
*
* 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.
*
* @(#)cdefs.h 8.7 (Berkeley) 1/21/94
*/
#ifndef _CDEFS_H_
#define _CDEFS_H_
#if defined(__cplusplus)
#define __BEGIN_DECLS extern "C" {
#define __END_DECLS };
#else
#define __BEGIN_DECLS
#define __END_DECLS
#endif
/*
* The __CONCAT macro is used to concatenate parts of symbol names, e.g.
* with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
* The __CONCAT macro is a bit tricky -- make sure you don't put spaces
* in between its arguments. __CONCAT can also concatenate double-quoted
* strings produced by the __STRING macro, but this only works with ANSI C.
*/
#if defined(__STDC__) || defined(__cplusplus)
#define __P(protos) protos /* full-blown ANSI C */
#define __CONCAT(x,y) x ## y
#define __STRING(x) #x
#define __const const /* define reserved names to standard */
#define __signed signed
#define __volatile volatile
#if defined(__cplusplus)
#define __inline inline /* convert to C++ keyword */
#else
#ifndef __GNUC__
#define __inline /* delete GCC keyword */
#endif /* !__GNUC__ */
#endif /* !__cplusplus */
#else /* !(__STDC__ || __cplusplus) */
#define __P(protos) () /* traditional C preprocessor */
#define __CONCAT(x,y) x/**/y
#define __STRING(x) "x"
#ifndef __GNUC__
#define __const /* delete pseudo-ANSI C keywords */
#define __inline
#define __signed
#define __volatile
/*
* In non-ANSI C environments, new programs will want ANSI-only C keywords
* deleted from the program and old programs will want them left alone.
* When using a compiler other than gcc, programs using the ANSI C keywords
* const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
* When using "gcc -traditional", we assume that this is the intent; if
* __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
*/
#ifndef NO_ANSI_KEYWORDS
#define const /* delete ANSI C keywords */
#define inline
#define signed
#define volatile
#endif
#endif /* !__GNUC__ */
#endif /* !(__STDC__ || __cplusplus) */
/*
* GCC1 and some versions of GCC2 declare dead (non-returning) and
* pure (no side effects) functions using "volatile" and "const";
* unfortunately, these then cause warnings under "-ansi -pedantic".
* GCC2 uses a new, peculiar __attribute__((attrs)) style. All of
* these work for GNU C++ (modulo a slight glitch in the C++ grammar
* in the distribution version of 2.5.5).
*/
#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 5
#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define __dead __volatile
#define __pure __const
#endif
#endif
/* Delete pseudo-keywords wherever they are not available or needed. */
#ifndef __dead
#define __dead
#define __pure
#endif
#endif /* !_CDEFS_H_ */

View file

@ -1 +0,0 @@
../../include/db.h

View file

@ -1 +0,0 @@
../../include/filevtable.h

View file

@ -1 +0,0 @@
../../include/mpool.h

View file

@ -1,103 +0,0 @@
# @(#)Makefile 8.9 (Berkeley) 7/14/94
LIBDB= libdb.a
OBJ1= hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.o \
hsearch.o ndbm.o
OBJ2= 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_utils.o
OBJ3= db.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
MISC= snprintf.o
${LIBDB}: ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
rm -f $@
ar cq $@ \
`lorder ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC} | tsort`
ranlib $@
clean:
rm -f ${LIBDB} ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
CC= cc -cckr -D_BSD_COMPAT
OORG= -O
CL= ${CC} -c -D__DBINTERFACE_PRIVATE ${OORG} -I. -Iinclude
hash.o: ../../hash/hash.c
${CL} -I../../hash ../../hash/hash.c
hash_bigkey.o: ../../hash/hash_bigkey.c
${CL} -I../../hash ../../hash/hash_bigkey.c
hash_buf.o: ../../hash/hash_buf.c
${CL} -I../../hash ../../hash/hash_buf.c
hash_func.o: ../../hash/hash_func.c
${CL} -I../../hash ../../hash/hash_func.c
hash_log2.o: ../../hash/hash_log2.c
${CL} -I../../hash ../../hash/hash_log2.c
hash_page.o: ../../hash/hash_page.c
${CL} -I../../hash ../../hash/hash_page.c
hsearch.o: ../../hash/hsearch.c
${CL} -I../../hash ../../hash/hsearch.c
ndbm.o: ../../hash/ndbm.c
${CL} -I../../hash ../../hash/ndbm.c
bt_close.o: ../../btree/bt_close.c
${CL} -I../../btree ../../btree/bt_close.c
bt_conv.o: ../../btree/bt_conv.c
${CL} -I../../btree ../../btree/bt_conv.c
bt_debug.o: ../../btree/bt_debug.c
${CL} -I../../btree ../../btree/bt_debug.c
bt_delete.o: ../../btree/bt_delete.c
${CL} -I../../btree ../../btree/bt_delete.c
bt_get.o: ../../btree/bt_get.c
${CL} -I../../btree ../../btree/bt_get.c
bt_open.o: ../../btree/bt_open.c
${CL} -I../../btree ../../btree/bt_open.c
bt_overflow.o: ../../btree/bt_overflow.c
${CL} -I../../btree ../../btree/bt_overflow.c
bt_page.o: ../../btree/bt_page.c
${CL} -I../../btree ../../btree/bt_page.c
bt_put.o: ../../btree/bt_put.c
${CL} -I../../btree ../../btree/bt_put.c
bt_search.o: ../../btree/bt_search.c
${CL} -I../../btree ../../btree/bt_search.c
bt_seq.o: ../../btree/bt_seq.c
${CL} -I../../btree ../../btree/bt_seq.c
bt_split.o: ../../btree/bt_split.c
${CL} -I../../btree ../../btree/bt_split.c
bt_stack.o: ../../btree/bt_stack.c
${CL} -I../../btree ../../btree/bt_stack.c
bt_utils.o: ../../btree/bt_utils.c
${CL} -I../../btree ../../btree/bt_utils.c
db.o: ../../db/db.c
${CL} ../../db/db.c
mpool.o: ../../mpool/mpool.c
${CL} -I../../mpool ../../mpool/mpool.c
rec_close.o: ../../recno/rec_close.c
${CL} -I../../recno ../../recno/rec_close.c
rec_delete.o: ../../recno/rec_delete.c
${CL} -I../../recno ../../recno/rec_delete.c
rec_get.o: ../../recno/rec_get.c
${CL} -I../../recno ../../recno/rec_get.c
rec_open.o: ../../recno/rec_open.c
${CL} -I../../recno ../../recno/rec_open.c
rec_put.o: ../../recno/rec_put.c
${CL} -I../../recno ../../recno/rec_put.c
rec_search.o: ../../recno/rec_search.c
${CL} -I../../recno ../../recno/rec_search.c
rec_seq.o: ../../recno/rec_seq.c
${CL} -I../../recno ../../recno/rec_seq.c
rec_utils.o: ../../recno/rec_utils.c
${CL} -I../../recno ../../recno/rec_utils.c
memmove.o:
${CC} -DMEMMOVE -c -O -I. -Iinclude clib/memmove.c
mktemp.o:
${CC} -c -O -I. -Iinclude clib/mktemp.c
snprintf.o:
${CC} -c -O -I. -Iinclude clib/snprintf.c

View file

@ -1,32 +0,0 @@
*** PORT/db/btree/bt_open.c.dist Thu Sep 16 14:42:22 1993
--- PORT/db/btree/bt_open.c Mon Nov 8 07:03:40 1993
***************
*** 256,262 ****
--- 256,266 ----
* Don't overflow the page offset type.
*/
if (b.psize == 0) {
+ #ifndef sgi
b.psize = sb.st_blksize;
+ #else
+ b.psize = 4096;
+ #endif /* sgi */
if (b.psize < MINPSIZE)
b.psize = MINPSIZE;
if (b.psize > MAX_PAGE_OFFSET + 1)
*** PORT/db/hash/hash.c.dist Thu Nov 4 15:32:16 1993
--- PORT/db/hash/hash.c Mon Nov 8 07:05:12 1993
***************
*** 301,307 ****
--- 301,311 ----
if (file != NULL) {
if (stat(file, &statbuf))
return (NULL);
+ #ifndef sgi
hashp->BSIZE = statbuf.st_blksize;
+ #else
+ hashp->BSIZE = 4096;
+ #endif /* sgi */
hashp->BSHIFT = __log2(hashp->BSIZE);
}

View file

@ -1 +0,0 @@
../clib

View file

@ -1 +0,0 @@
../../include/cdefs.h

View file

@ -1,231 +0,0 @@
/*-
* Copyright (c) 1991, 1993
* 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.
*
* @(#)compat.h 8.13 (Berkeley) 2/21/94
*/
#ifndef _COMPAT_H_
#define _COMPAT_H_
#include <sys/types.h>
/*
* If your system doesn't typedef u_long, u_short, or u_char, change
* the 0 to a 1.
*/
#if 0
typedef unsigned char u_char; /* 4.[34]BSD names. */
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned short u_short;
#endif
/* If your system doesn't typedef size_t, change the 0 to a 1. */
#if 0
typedef unsigned int size_t; /* POSIX, 4.[34]BSD names. */
#endif
/* If your system doesn't typedef ssize_t, change the 0 to a 1. */
#if 0
typedef int ssize_t; /* POSIX names. */
#endif
/*
* If your system doesn't have the POSIX type for a signal mask,
* change the 0 to a 1.
*/
#if 0 /* POSIX 1003.1 signal mask type. */
typedef unsigned int sigset_t;
#endif
/*
* If your system's vsprintf returns a char *, not an int,
* change the 0 to a 1.
*/
#if 0
#define VSPRINTF_CHARSTAR
#endif
/*
* If you don't have POSIX 1003.1 signals, the signal code surrounding the
* temporary file creation is intended to block all of the possible signals
* long enough to create the file and unlink it. All of this stuff is
* intended to use old-style BSD calls to fake POSIX 1003.1 calls.
*/
#ifdef NO_POSIX_SIGNALS
#define sigemptyset(set) (*(set) = 0)
#define sigfillset(set) (*(set) = ~(sigset_t)0, 0)
#define sigaddset(set,signo) (*(set) |= sigmask(signo), 0)
#define sigdelset(set,signo) (*(set) &= ~sigmask(signo), 0)
#define sigismember(set,signo) ((*(set) & sigmask(signo)) != 0)
#define SIG_BLOCK 1
#define SIG_UNBLOCK 2
#define SIG_SETMASK 3
static int __sigtemp; /* For the use of sigprocmask */
/* Repeated test of oset != NULL is to avoid "*0". */
#define sigprocmask(how, set, oset) \
((__sigtemp = \
(((how) == SIG_BLOCK) ? \
sigblock(0) | *(set) : \
(((how) == SIG_UNBLOCK) ? \
sigblock(0) & ~(*(set)) : \
((how) == SIG_SETMASK ? \
*(set) : sigblock(0))))), \
((oset) ? (*(oset ? oset : set) = sigsetmask(__sigtemp)) : \
sigsetmask(__sigtemp)), 0)
#endif
/*
* If your system doesn't have an include file with the appropriate
* byte order set, make sure you specify the correct one.
*/
#ifndef BYTE_ORDER
#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
#define BYTE_ORDER BIG_ENDIAN /* Set for your system. */
#endif
#if defined(SYSV) || defined(SYSTEM5)
#define index(a, b) strchr(a, b)
#define rindex(a, b) strrchr(a, b)
#define bzero(a, b) memset(a, 0, b)
#define bcmp(a, b, n) memcmp(a, b, n)
#define bcopy(a, b, n) memmove(b, a, n)
#endif
#if defined(BSD) || defined(BSD4_3)
#define strchr(a, b) index(a, b)
#define strrchr(a, b) rindex(a, b)
#define memcmp(a, b, n) bcmp(a, b, n)
#define memmove(a, b, n) bcopy(b, a, n)
#endif
/*
* 32-bit machine. The db routines are theoretically independent of
* the size of u_shorts and u_longs, but I don't know that anyone has
* ever actually tried it. At a minimum, change the following #define's
* if you are trying to compile on a different type of system.
*/
#ifndef USHRT_MAX
#define USHRT_MAX 0xFFFF
#define ULONG_MAX 0xFFFFFFFF
#endif
#ifndef O_ACCMODE /* POSIX 1003.1 access mode mask. */
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
#endif
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 RE limit. */
#define _POSIX2_RE_DUP_MAX 255
#endif
/*
* If you can't provide lock values in the open(2) call. Note, this
* allows races to happen.
*/
#ifndef O_EXLOCK /* 4.4BSD extension. */
#define O_EXLOCK 0
#endif
#ifndef O_SHLOCK /* 4.4BSD extension. */
#define O_SHLOCK 0
#endif
#ifndef EFTYPE
#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */
#endif
#ifndef WCOREDUMP /* 4.4BSD extension */
#define WCOREDUMP(a) 0
#endif
#ifndef STDERR_FILENO
#define STDIN_FILENO 0 /* ANSI C #defines */
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
#endif
#ifndef SEEK_END
#define SEEK_SET 0 /* POSIX 1003.1 seek values */
#define SEEK_CUR 1
#define SEEK_END 2
#endif
#ifndef _POSIX_VDISABLE /* POSIX 1003.1 disabling char. */
#define _POSIX_VDISABLE 0 /* Some systems used 0. */
#endif
#ifndef TCSASOFT /* 4.4BSD extension. */
#define TCSASOFT 0
#endif
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 values. */
#define _POSIX2_RE_DUP_MAX 255
#endif
#ifndef NULL /* ANSI C #defines NULL everywhere. */
#define NULL 0
#endif
#ifndef MAX /* Usually found in <sys/param.h>. */
#define MAX(_a,_b) ((_a)<(_b)?(_b):(_a))
#endif
#ifndef MIN /* Usually found in <sys/param.h>. */
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
#endif
/* Default file permissions. */
#ifndef DEFFILEMODE /* 4.4BSD extension. */
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
#endif
#ifndef S_ISDIR /* POSIX 1003.1 file type tests. */
#define S_ISDIR(m) ((m & 0170000) == 0040000) /* directory */
#define S_ISCHR(m) ((m & 0170000) == 0020000) /* char special */
#define S_ISBLK(m) ((m & 0170000) == 0060000) /* block special */
#define S_ISREG(m) ((m & 0170000) == 0100000) /* regular file */
#define S_ISFIFO(m) ((m & 0170000) == 0010000) /* fifo */
#endif
#ifndef S_ISLNK /* BSD POSIX 1003.1 extensions */
#define S_ISLNK(m) ((m & 0170000) == 0120000) /* symbolic link */
#define S_ISSOCK(m) ((m & 0170000) == 0140000) /* socket */
#endif
/* The type of a va_list. */
#ifndef _BSD_VA_LIST_ /* 4.4BSD #define. */
#define _BSD_VA_LIST_ char *
#endif
#endif /* !_COMPAT_H_ */

View file

@ -1 +0,0 @@
../../include/db.h

View file

@ -1 +0,0 @@
../../include/mpool.h

View file

@ -1 +0,0 @@
../../include/ndbm.h

View file

@ -1 +0,0 @@
../../include/queue.h

View file

@ -1 +0,0 @@
include

View file

@ -1,102 +0,0 @@
# @(#)Makefile 8.9 (Berkeley) 7/14/94
LIBDB= libdb.a
OBJ1= hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.o \
hsearch.o ndbm.o
OBJ2= 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_utils.o
OBJ3= db.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
MISC= snprintf.o
${LIBDB}: ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
rm -f $@
ar cq $@ \
`lorder ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC} | tsort`
ranlib $@
clean:
rm -f ${LIBDB} ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
OORG= -O
CL= ${CC} -c -D__DBINTERFACE_PRIVATE ${OORG} -I. -Iinclude
hash.o: ../../hash/hash.c
${CL} -I../../hash ../../hash/hash.c
hash_bigkey.o: ../../hash/hash_bigkey.c
${CL} -I../../hash ../../hash/hash_bigkey.c
hash_buf.o: ../../hash/hash_buf.c
${CL} -I../../hash ../../hash/hash_buf.c
hash_func.o: ../../hash/hash_func.c
${CL} -I../../hash ../../hash/hash_func.c
hash_log2.o: ../../hash/hash_log2.c
${CL} -I../../hash ../../hash/hash_log2.c
hash_page.o: ../../hash/hash_page.c
${CL} -I../../hash ../../hash/hash_page.c
hsearch.o: ../../hash/hsearch.c
${CL} -I../../hash ../../hash/hsearch.c
ndbm.o: ../../hash/ndbm.c
${CL} -I../../hash ../../hash/ndbm.c
bt_close.o: ../../btree/bt_close.c
${CL} -I../../btree ../../btree/bt_close.c
bt_conv.o: ../../btree/bt_conv.c
${CL} -I../../btree ../../btree/bt_conv.c
bt_debug.o: ../../btree/bt_debug.c
${CL} -I../../btree ../../btree/bt_debug.c
bt_delete.o: ../../btree/bt_delete.c
${CL} -I../../btree ../../btree/bt_delete.c
bt_get.o: ../../btree/bt_get.c
${CL} -I../../btree ../../btree/bt_get.c
bt_open.o: ../../btree/bt_open.c
${CL} -I../../btree ../../btree/bt_open.c
bt_overflow.o: ../../btree/bt_overflow.c
${CL} -I../../btree ../../btree/bt_overflow.c
bt_page.o: ../../btree/bt_page.c
${CL} -I../../btree ../../btree/bt_page.c
bt_put.o: ../../btree/bt_put.c
${CL} -I../../btree ../../btree/bt_put.c
bt_search.o: ../../btree/bt_search.c
${CL} -I../../btree ../../btree/bt_search.c
bt_seq.o: ../../btree/bt_seq.c
${CL} -I../../btree ../../btree/bt_seq.c
bt_split.o: ../../btree/bt_split.c
${CL} -I../../btree ../../btree/bt_split.c
bt_stack.o: ../../btree/bt_stack.c
${CL} -I../../btree ../../btree/bt_stack.c
bt_utils.o: ../../btree/bt_utils.c
${CL} -I../../btree ../../btree/bt_utils.c
db.o: ../../db/db.c
${CL} ../../db/db.c
mpool.o: ../../mpool/mpool.c
${CL} -I../../mpool ../../mpool/mpool.c
rec_close.o: ../../recno/rec_close.c
${CL} -I../../recno ../../recno/rec_close.c
rec_delete.o: ../../recno/rec_delete.c
${CL} -I../../recno ../../recno/rec_delete.c
rec_get.o: ../../recno/rec_get.c
${CL} -I../../recno ../../recno/rec_get.c
rec_open.o: ../../recno/rec_open.c
${CL} -I../../recno ../../recno/rec_open.c
rec_put.o: ../../recno/rec_put.c
${CL} -I../../recno ../../recno/rec_put.c
rec_search.o: ../../recno/rec_search.c
${CL} -I../../recno ../../recno/rec_search.c
rec_seq.o: ../../recno/rec_seq.c
${CL} -I../../recno ../../recno/rec_seq.c
rec_utils.o: ../../recno/rec_utils.c
${CL} -I../../recno ../../recno/rec_utils.c
memmove.o:
${CC} -DMEMMOVE -c -O -I. -Iinclude clib/memmove.c
mktemp.o:
${CC} -c -O -I. -Iinclude clib/mktemp.c
snprintf.o:
${CC} -c -O -I. -Iinclude clib/snprintf.c

View file

@ -1,29 +0,0 @@
*** PORT/db/recno/rec_open.c.orig 1993/10/13 02:01:31
--- PORT/db/recno/rec_open.c 1993/10/13 02:20:47
***************
*** 159,167 ****
--- 159,182 ----
SET(t, R_EOF);
else {
t->bt_msize = sb.st_size;
+ /*
+ * hack :
+ *
+ * The Linux kernel mmap() semantics are broken :
+ *
+ * Under Linux, read only private mappings cause write only and read/write
+ * opens to fail with errno=ETXTBSY. Shared read only mappings should work
+ * fine though, but I'm not familiar enough with the code to ascertain that
+ * a MAP_SHARED mapping would be safe so I use the non-mmap'd version
+ * instead.
+ *
+ */
+
+ #if !defined(linux)
if ((t->bt_smap = mmap(NULL, t->bt_msize,
PROT_READ, MAP_PRIVATE, rfd,
(off_t)0)) == (caddr_t)-1)
+ #endif
goto slow;
t->bt_cmap = t->bt_smap;
t->bt_emap = t->bt_smap + sb.st_size;

View file

@ -1 +0,0 @@
../clib

View file

@ -1,231 +0,0 @@
/*-
* Copyright (c) 1991, 1993
* 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.
*
* @(#)compat.h 8.13 (Berkeley) 2/21/94
*/
#ifndef _COMPAT_H_
#define _COMPAT_H_
#include <sys/types.h>
/*
* If your system doesn't typedef u_long, u_short, or u_char, change
* the 0 to a 1.
*/
#if 0
typedef unsigned char u_char; /* 4.[34]BSD names. */
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned short u_short;
#endif
/* If your system doesn't typedef size_t, change the 0 to a 1. */
#if 0
typedef unsigned int size_t; /* POSIX, 4.[34]BSD names. */
#endif
/* If your system doesn't typedef ssize_t, change the 0 to a 1. */
#if 0
typedef int ssize_t; /* POSIX names. */
#endif
/*
* If your system doesn't have the POSIX type for a signal mask,
* change the 0 to a 1.
*/
#if 0 /* POSIX 1003.1 signal mask type. */
typedef unsigned int sigset_t;
#endif
/*
* If your system's vsprintf returns a char *, not an int,
* change the 0 to a 1.
*/
#if 0
#define VSPRINTF_CHARSTAR
#endif
/*
* If you don't have POSIX 1003.1 signals, the signal code surrounding the
* temporary file creation is intended to block all of the possible signals
* long enough to create the file and unlink it. All of this stuff is
* intended to use old-style BSD calls to fake POSIX 1003.1 calls.
*/
#ifdef NO_POSIX_SIGNALS
#define sigemptyset(set) (*(set) = 0)
#define sigfillset(set) (*(set) = ~(sigset_t)0, 0)
#define sigaddset(set,signo) (*(set) |= sigmask(signo), 0)
#define sigdelset(set,signo) (*(set) &= ~sigmask(signo), 0)
#define sigismember(set,signo) ((*(set) & sigmask(signo)) != 0)
#define SIG_BLOCK 1
#define SIG_UNBLOCK 2
#define SIG_SETMASK 3
static int __sigtemp; /* For the use of sigprocmask */
/* Repeated test of oset != NULL is to avoid "*0". */
#define sigprocmask(how, set, oset) \
((__sigtemp = \
(((how) == SIG_BLOCK) ? \
sigblock(0) | *(set) : \
(((how) == SIG_UNBLOCK) ? \
sigblock(0) & ~(*(set)) : \
((how) == SIG_SETMASK ? \
*(set) : sigblock(0))))), \
((oset) ? (*(oset ? oset : set) = sigsetmask(__sigtemp)) : \
sigsetmask(__sigtemp)), 0)
#endif
/*
* If your system doesn't have an include file with the appropriate
* byte order set, make sure you specify the correct one.
*/
#ifndef BYTE_ORDER
#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
#define BYTE_ORDER LITTLE_ENDIAN /* Set for your system. */
#endif
#if defined(SYSV) || defined(SYSTEM5)
#define index(a, b) strchr(a, b)
#define rindex(a, b) strrchr(a, b)
#define bzero(a, b) memset(a, 0, b)
#define bcmp(a, b, n) memcmp(a, b, n)
#define bcopy(a, b, n) memmove(b, a, n)
#endif
#if defined(BSD) || defined(BSD4_3)
#define strchr(a, b) index(a, b)
#define strrchr(a, b) rindex(a, b)
#define memcmp(a, b, n) bcmp(a, b, n)
#define memmove(a, b, n) bcopy(b, a, n)
#endif
/*
* 32-bit machine. The db routines are theoretically independent of
* the size of u_shorts and u_longs, but I don't know that anyone has
* ever actually tried it. At a minimum, change the following #define's
* if you are trying to compile on a different type of system.
*/
#ifndef USHRT_MAX
#define USHRT_MAX 0xFFFF
#define ULONG_MAX 0xFFFFFFFF
#endif
#ifndef O_ACCMODE /* POSIX 1003.1 access mode mask. */
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
#endif
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 RE limit. */
#define _POSIX2_RE_DUP_MAX 255
#endif
/*
* If you can't provide lock values in the open(2) call. Note, this
* allows races to happen.
*/
#ifndef O_EXLOCK /* 4.4BSD extension. */
#define O_EXLOCK 0
#endif
#ifndef O_SHLOCK /* 4.4BSD extension. */
#define O_SHLOCK 0
#endif
#ifndef EFTYPE
#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */
#endif
#ifndef WCOREDUMP /* 4.4BSD extension */
#define WCOREDUMP(a) 0
#endif
#ifndef STDERR_FILENO
#define STDIN_FILENO 0 /* ANSI C #defines */
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
#endif
#ifndef SEEK_END
#define SEEK_SET 0 /* POSIX 1003.1 seek values */
#define SEEK_CUR 1
#define SEEK_END 2
#endif
#ifndef _POSIX_VDISABLE /* POSIX 1003.1 disabling char. */
#define _POSIX_VDISABLE 0 /* Some systems used 0. */
#endif
#ifndef TCSASOFT /* 4.4BSD extension. */
#define TCSASOFT 0
#endif
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 values. */
#define _POSIX2_RE_DUP_MAX 255
#endif
#ifndef NULL /* ANSI C #defines NULL everywhere. */
#define NULL 0
#endif
#ifndef MAX /* Usually found in <sys/param.h>. */
#define MAX(_a,_b) ((_a)<(_b)?(_b):(_a))
#endif
#ifndef MIN /* Usually found in <sys/param.h>. */
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
#endif
/* Default file permissions. */
#ifndef DEFFILEMODE /* 4.4BSD extension. */
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
#endif
#ifndef S_ISDIR /* POSIX 1003.1 file type tests. */
#define S_ISDIR(m) ((m & 0170000) == 0040000) /* directory */
#define S_ISCHR(m) ((m & 0170000) == 0020000) /* char special */
#define S_ISBLK(m) ((m & 0170000) == 0060000) /* block special */
#define S_ISREG(m) ((m & 0170000) == 0100000) /* regular file */
#define S_ISFIFO(m) ((m & 0170000) == 0010000) /* fifo */
#endif
#ifndef S_ISLNK /* BSD POSIX 1003.1 extensions */
#define S_ISLNK(m) ((m & 0170000) == 0120000) /* symbolic link */
#define S_ISSOCK(m) ((m & 0170000) == 0140000) /* socket */
#endif
/* The type of a va_list. */
#ifndef _BSD_VA_LIST_ /* 4.4BSD #define. */
#define _BSD_VA_LIST_ char *
#endif
#endif /* !_COMPAT_H_ */

View file

@ -1 +0,0 @@
../../include/db.h

View file

@ -1 +0,0 @@
../../include/mpool.h

View file

@ -1 +0,0 @@
../../include/ndbm.h

View file

@ -1 +0,0 @@
include

View file

@ -1,102 +0,0 @@
# @(#)Makefile 8.9 (Berkeley) 7/14/94
LIBDB= libdb.a
OBJ1= hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.o \
hsearch.o ndbm.o
OBJ2= 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_utils.o
OBJ3= db.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
MISC= snprintf.o
${LIBDB}: ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
rm -f $@
ar cq $@ \
`lorder ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC} | tsort`
ranlib $@
clean:
rm -f ${LIBDB} ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
OORG= -O
CL= ${CC} -c -D__DBINTERFACE_PRIVATE ${OORG} -I. -Iinclude
hash.o: ../../hash/hash.c
${CL} -I../../hash ../../hash/hash.c
hash_bigkey.o: ../../hash/hash_bigkey.c
${CL} -I../../hash ../../hash/hash_bigkey.c
hash_buf.o: ../../hash/hash_buf.c
${CL} -I../../hash ../../hash/hash_buf.c
hash_func.o: ../../hash/hash_func.c
${CL} -I../../hash ../../hash/hash_func.c
hash_log2.o: ../../hash/hash_log2.c
${CL} -I../../hash ../../hash/hash_log2.c
hash_page.o: ../../hash/hash_page.c
${CL} -I../../hash ../../hash/hash_page.c
hsearch.o: ../../hash/hsearch.c
${CL} -I../../hash ../../hash/hsearch.c
ndbm.o: ../../hash/ndbm.c
${CL} -I../../hash ../../hash/ndbm.c
bt_close.o: ../../btree/bt_close.c
${CL} -I../../btree ../../btree/bt_close.c
bt_conv.o: ../../btree/bt_conv.c
${CL} -I../../btree ../../btree/bt_conv.c
bt_debug.o: ../../btree/bt_debug.c
${CL} -I../../btree ../../btree/bt_debug.c
bt_delete.o: ../../btree/bt_delete.c
${CL} -I../../btree ../../btree/bt_delete.c
bt_get.o: ../../btree/bt_get.c
${CL} -I../../btree ../../btree/bt_get.c
bt_open.o: ../../btree/bt_open.c
${CL} -I../../btree ../../btree/bt_open.c
bt_overflow.o: ../../btree/bt_overflow.c
${CL} -I../../btree ../../btree/bt_overflow.c
bt_page.o: ../../btree/bt_page.c
${CL} -I../../btree ../../btree/bt_page.c
bt_put.o: ../../btree/bt_put.c
${CL} -I../../btree ../../btree/bt_put.c
bt_search.o: ../../btree/bt_search.c
${CL} -I../../btree ../../btree/bt_search.c
bt_seq.o: ../../btree/bt_seq.c
${CL} -I../../btree ../../btree/bt_seq.c
bt_split.o: ../../btree/bt_split.c
${CL} -I../../btree ../../btree/bt_split.c
bt_stack.o: ../../btree/bt_stack.c
${CL} -I../../btree ../../btree/bt_stack.c
bt_utils.o: ../../btree/bt_utils.c
${CL} -I../../btree ../../btree/bt_utils.c
db.o: ../../db/db.c
${CL} ../../db/db.c
mpool.o: ../../mpool/mpool.c
${CL} -I../../mpool ../../mpool/mpool.c
rec_close.o: ../../recno/rec_close.c
${CL} -I../../recno ../../recno/rec_close.c
rec_delete.o: ../../recno/rec_delete.c
${CL} -I../../recno ../../recno/rec_delete.c
rec_get.o: ../../recno/rec_get.c
${CL} -I../../recno ../../recno/rec_get.c
rec_open.o: ../../recno/rec_open.c
${CL} -I../../recno ../../recno/rec_open.c
rec_put.o: ../../recno/rec_put.c
${CL} -I../../recno ../../recno/rec_put.c
rec_search.o: ../../recno/rec_search.c
${CL} -I../../recno ../../recno/rec_search.c
rec_seq.o: ../../recno/rec_seq.c
${CL} -I../../recno ../../recno/rec_seq.c
rec_utils.o: ../../recno/rec_utils.c
${CL} -I../../recno ../../recno/rec_utils.c
memmove.o:
${CC} -DMEMMOVE -c -O -I. -Iinclude clib/memmove.c
mktemp.o:
${CC} -c -O -I. -Iinclude clib/mktemp.c
snprintf.o:
${CC} -c -O -I. -Iinclude clib/snprintf.c

View file

@ -1 +0,0 @@
../clib

View file

@ -1 +0,0 @@
../../include/cdefs.h

View file

@ -1,231 +0,0 @@
/*-
* Copyright (c) 1991, 1993
* 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.
*
* @(#)compat.h 8.13 (Berkeley) 2/21/94
*/
#ifndef _COMPAT_H_
#define _COMPAT_H_
#include <sys/types.h>
/*
* If your system doesn't typedef u_long, u_short, or u_char, change
* the 0 to a 1.
*/
#if 0
typedef unsigned char u_char; /* 4.[34]BSD names. */
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned short u_short;
#endif
/* If your system doesn't typedef size_t, change the 0 to a 1. */
#if 0
typedef unsigned int size_t; /* POSIX, 4.[34]BSD names. */
#endif
/* If your system doesn't typedef ssize_t, change the 0 to a 1. */
#if 0
typedef int ssize_t; /* POSIX names. */
#endif
/*
* If your system doesn't have the POSIX type for a signal mask,
* change the 0 to a 1.
*/
#if 0 /* POSIX 1003.1 signal mask type. */
typedef unsigned int sigset_t;
#endif
/*
* If your system's vsprintf returns a char *, not an int,
* change the 0 to a 1.
*/
#if 0
#define VSPRINTF_CHARSTAR
#endif
/*
* If you don't have POSIX 1003.1 signals, the signal code surrounding the
* temporary file creation is intended to block all of the possible signals
* long enough to create the file and unlink it. All of this stuff is
* intended to use old-style BSD calls to fake POSIX 1003.1 calls.
*/
#ifdef NO_POSIX_SIGNALS
#define sigemptyset(set) (*(set) = 0)
#define sigfillset(set) (*(set) = ~(sigset_t)0, 0)
#define sigaddset(set,signo) (*(set) |= sigmask(signo), 0)
#define sigdelset(set,signo) (*(set) &= ~sigmask(signo), 0)
#define sigismember(set,signo) ((*(set) & sigmask(signo)) != 0)
#define SIG_BLOCK 1
#define SIG_UNBLOCK 2
#define SIG_SETMASK 3
static int __sigtemp; /* For the use of sigprocmask */
/* Repeated test of oset != NULL is to avoid "*0". */
#define sigprocmask(how, set, oset) \
((__sigtemp = \
(((how) == SIG_BLOCK) ? \
sigblock(0) | *(set) : \
(((how) == SIG_UNBLOCK) ? \
sigblock(0) & ~(*(set)) : \
((how) == SIG_SETMASK ? \
*(set) : sigblock(0))))), \
((oset) ? (*(oset ? oset : set) = sigsetmask(__sigtemp)) : \
sigsetmask(__sigtemp)), 0)
#endif
/*
* If your system doesn't have an include file with the appropriate
* byte order set, make sure you specify the correct one.
*/
#ifndef BYTE_ORDER
#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
#define BYTE_ORDER LITTLE_ENDIAN /* Set for your system. */
#endif
#if defined(SYSV) || defined(SYSTEM5)
#define index(a, b) strchr(a, b)
#define rindex(a, b) strrchr(a, b)
#define bzero(a, b) memset(a, 0, b)
#define bcmp(a, b, n) memcmp(a, b, n)
#define bcopy(a, b, n) memmove(b, a, n)
#endif
#if defined(BSD) || defined(BSD4_3)
#define strchr(a, b) index(a, b)
#define strrchr(a, b) rindex(a, b)
#define memcmp(a, b, n) bcmp(a, b, n)
#define memmove(a, b, n) bcopy(b, a, n)
#endif
/*
* 32-bit machine. The db routines are theoretically independent of
* the size of u_shorts and u_longs, but I don't know that anyone has
* ever actually tried it. At a minimum, change the following #define's
* if you are trying to compile on a different type of system.
*/
#ifndef USHRT_MAX
#define USHRT_MAX 0xFFFF
#define ULONG_MAX 0xFFFFFFFF
#endif
#ifndef O_ACCMODE /* POSIX 1003.1 access mode mask. */
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
#endif
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 RE limit. */
#define _POSIX2_RE_DUP_MAX 255
#endif
/*
* If you can't provide lock values in the open(2) call. Note, this
* allows races to happen.
*/
#ifndef O_EXLOCK /* 4.4BSD extension. */
#define O_EXLOCK 0
#endif
#ifndef O_SHLOCK /* 4.4BSD extension. */
#define O_SHLOCK 0
#endif
#ifndef EFTYPE
#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */
#endif
#ifndef WCOREDUMP /* 4.4BSD extension */
#define WCOREDUMP(a) 0
#endif
#ifndef STDERR_FILENO
#define STDIN_FILENO 0 /* ANSI C #defines */
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
#endif
#ifndef SEEK_END
#define SEEK_SET 0 /* POSIX 1003.1 seek values */
#define SEEK_CUR 1
#define SEEK_END 2
#endif
#ifndef _POSIX_VDISABLE /* POSIX 1003.1 disabling char. */
#define _POSIX_VDISABLE 0 /* Some systems used 0. */
#endif
#ifndef TCSASOFT /* 4.4BSD extension. */
#define TCSASOFT 0
#endif
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 values. */
#define _POSIX2_RE_DUP_MAX 255
#endif
#ifndef NULL /* ANSI C #defines NULL everywhere. */
#define NULL 0
#endif
#ifndef MAX /* Usually found in <sys/param.h>. */
#define MAX(_a,_b) ((_a)<(_b)?(_b):(_a))
#endif
#ifndef MIN /* Usually found in <sys/param.h>. */
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
#endif
/* Default file permissions. */
#ifndef DEFFILEMODE /* 4.4BSD extension. */
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
#endif
#ifndef S_ISDIR /* POSIX 1003.1 file type tests. */
#define S_ISDIR(m) ((m & 0170000) == 0040000) /* directory */
#define S_ISCHR(m) ((m & 0170000) == 0020000) /* char special */
#define S_ISBLK(m) ((m & 0170000) == 0060000) /* block special */
#define S_ISREG(m) ((m & 0170000) == 0100000) /* regular file */
#define S_ISFIFO(m) ((m & 0170000) == 0010000) /* fifo */
#endif
#ifndef S_ISLNK /* BSD POSIX 1003.1 extensions */
#define S_ISLNK(m) ((m & 0170000) == 0120000) /* symbolic link */
#define S_ISSOCK(m) ((m & 0170000) == 0140000) /* socket */
#endif
/* The type of a va_list. */
#ifndef _BSD_VA_LIST_ /* 4.4BSD #define. */
#define _BSD_VA_LIST_ char *
#endif
#endif /* !_COMPAT_H_ */

View file

@ -1 +0,0 @@
../../include/db.h

View file

@ -1 +0,0 @@
../../include/mpool.h

View file

@ -1 +0,0 @@
../../include/ndbm.h

View file

@ -1 +0,0 @@
../../include/queue.h

View file

@ -1 +0,0 @@
include

View file

@ -1 +0,0 @@
osf.1.0.2

View file

@ -1 +0,0 @@
osf.1.0.2

View file

@ -1,104 +0,0 @@
# @(#)Makefile 8.9 (Berkeley) 7/14/94
LIBDB= libdb.a
OBJ1= hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.o \
hsearch.o ndbm.o
OBJ2= 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_utils.o
OBJ3= db.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
MISC= mktemp.o snprintf.o
${LIBDB}: ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
rm -f $@
ar cq $@ \
`lorder ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC} | tsort`
ranlib $@
clean:
rm -f ${LIBDB} ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
CC= gcc
OORG= -O
CL= ${CC} -c -D__DBINTERFACE_PRIVATE ${OORG} -I. -Iinclude \
-DMMAP_NOT_AVAILABLE -DSTBLKSIZE_NOT_AVAILABLE -DSYS5
hash.o: ../../hash/hash.c
${CL} -I../../hash ../../hash/hash.c
hash_bigkey.o: ../../hash/hash_bigkey.c
${CL} -I../../hash ../../hash/hash_bigkey.c
hash_buf.o: ../../hash/hash_buf.c
${CL} -I../../hash ../../hash/hash_buf.c
hash_func.o: ../../hash/hash_func.c
${CL} -I../../hash ../../hash/hash_func.c
hash_log2.o: ../../hash/hash_log2.c
${CL} -I../../hash ../../hash/hash_log2.c
hash_page.o: ../../hash/hash_page.c
${CL} -I../../hash ../../hash/hash_page.c
hsearch.o: ../../hash/hsearch.c
${CL} -I../../hash ../../hash/hsearch.c
ndbm.o: ../../hash/ndbm.c
${CL} -I../../hash ../../hash/ndbm.c
bt_close.o: ../../btree/bt_close.c
${CL} -I../../btree ../../btree/bt_close.c
bt_conv.o: ../../btree/bt_conv.c
${CL} -I../../btree ../../btree/bt_conv.c
bt_debug.o: ../../btree/bt_debug.c
${CL} -I../../btree ../../btree/bt_debug.c
bt_delete.o: ../../btree/bt_delete.c
${CL} -I../../btree ../../btree/bt_delete.c
bt_get.o: ../../btree/bt_get.c
${CL} -I../../btree ../../btree/bt_get.c
bt_open.o: ../../btree/bt_open.c
${CL} -I../../btree ../../btree/bt_open.c
bt_overflow.o: ../../btree/bt_overflow.c
${CL} -I../../btree ../../btree/bt_overflow.c
bt_page.o: ../../btree/bt_page.c
${CL} -I../../btree ../../btree/bt_page.c
bt_put.o: ../../btree/bt_put.c
${CL} -I../../btree ../../btree/bt_put.c
bt_search.o: ../../btree/bt_search.c
${CL} -I../../btree ../../btree/bt_search.c
bt_seq.o: ../../btree/bt_seq.c
${CL} -I../../btree ../../btree/bt_seq.c
bt_split.o: ../../btree/bt_split.c
${CL} -I../../btree ../../btree/bt_split.c
bt_stack.o: ../../btree/bt_stack.c
${CL} -I../../btree ../../btree/bt_stack.c
bt_utils.o: ../../btree/bt_utils.c
${CL} -I../../btree ../../btree/bt_utils.c
db.o: ../../db/db.c
${CL} ../../db/db.c
mpool.o: ../../mpool/mpool.c
${CL} -I../../mpool ../../mpool/mpool.c
rec_close.o: ../../recno/rec_close.c
${CL} -I../../recno ../../recno/rec_close.c
rec_delete.o: ../../recno/rec_delete.c
${CL} -I../../recno ../../recno/rec_delete.c
rec_get.o: ../../recno/rec_get.c
${CL} -I../../recno ../../recno/rec_get.c
rec_open.o: ../../recno/rec_open.c
${CL} -I../../recno ../../recno/rec_open.c
rec_put.o: ../../recno/rec_put.c
${CL} -I../../recno ../../recno/rec_put.c
rec_search.o: ../../recno/rec_search.c
${CL} -I../../recno ../../recno/rec_search.c
rec_seq.o: ../../recno/rec_seq.c
${CL} -I../../recno ../../recno/rec_seq.c
rec_utils.o: ../../recno/rec_utils.c
${CL} -I../../recno ../../recno/rec_utils.c
memmove.o:
${CC} -DMEMMOVE -c -O -I. -Iinclude clib/memmove.c
mktemp.o:
${CC} -c -O -I. -Iinclude clib/mktemp.c
snprintf.o:
${CC} -c -O -I. -Iinclude clib/snprintf.c

View file

@ -1,95 +0,0 @@
*** PORT/db/btree/bt_open.c.orig 1993/11/24 11:16:51
--- PORT/db/btree/bt_open.c 1993/11/24 12:38:12
***************
*** 256,262 ****
--- 256,266 ----
* Don't overflow the page offset type.
*/
if (b.psize == 0) {
+ #ifdef STBLKSIZE_NOT_AVAILABLE
+ b.psize = 4096;
+ #else
b.psize = sb.st_blksize;
+ #endif
if (b.psize < MINPSIZE)
b.psize = MINPSIZE;
if (b.psize > MAX_PAGE_OFFSET + 1)
*** PORT/db/recno/rec_open.c.orig 1993/11/29 18:26:26
--- PORT/db/recno/rec_open.c 1993/11/30 11:35:21
***************
*** 159,164 ****
--- 159,167 ----
SET(t, R_EOF);
else {
t->bt_msize = sb.st_size;
+ #ifdef MMAP_NOT_AVAILABLE
+ goto slow;
+ #else
if ((t->bt_smap = mmap(NULL, t->bt_msize,
PROT_READ, MAP_PRIVATE, rfd,
(off_t)0)) == (caddr_t)-1)
***************
*** 168,173 ****
--- 171,177 ----
t->bt_irec = ISSET(t, R_FIXLEN) ?
__rec_fmap : __rec_vmap;
SET(t, R_MEMMAPPED);
+ #endif
}
}
}
*** PORT/db/hash/hash_log2.c.orig 1993/11/24 11:10:40
--- PORT/db/hash/hash_log2.c 1993/11/24 12:38:52
***************
*** 40,50 ****
#include <sys/types.h>
! u_int
__log2(num)
! u_int num;
{
! register u_int i, limit;
limit = 1;
for (i = 0; limit < num; limit = limit << 1, i++);
--- 40,50 ----
#include <sys/types.h>
! unsigned int
__log2(num)
! unsigned int num;
{
! register unsigned int i, limit;
limit = 1;
for (i = 0; limit < num; limit = limit << 1, i++);
*** PORT/db/hash/hash.c.orig 1993/11/24 11:18:44
--- PORT/db/hash/hash.c 1993/11/24 12:38:29
***************
*** 301,307 ****
--- 301,311 ----
if (file != NULL) {
if (stat(file, &statbuf))
return (NULL);
+ #ifdef STBLKSIZE_NOT_AVAILABLE
+ hashp->BSIZE = 4096;
+ #else
hashp->BSIZE = statbuf.st_blksize;
+ #endif
hashp->BSHIFT = __log2(hashp->BSIZE);
}
*** PORT/db/hash/hash.h.orig 1993/11/24 11:20:03
--- PORT/db/hash/hash.h 1993/11/24 12:38:38
***************
*** 261,266 ****
--- 261,267 ----
#define REAL_KEY 4
/* Short hands for accessing structure */
+ #undef BSIZE
#define BSIZE hdr.bsize
#define BSHIFT hdr.bshift
#define DSIZE hdr.dsize

View file

@ -1 +0,0 @@
../clib

View file

@ -1 +0,0 @@
../../include/cdefs.h

View file

@ -1,232 +0,0 @@
/*-
* Copyright (c) 1991, 1993
* 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.
*
* @(#)compat.h 8.13 (Berkeley) 2/21/94
*/
#ifndef _COMPAT_H_
#define _COMPAT_H_
#include <sys/types.h>
#include <sys/select.h> /* For fd_set. */
/*
* If your system doesn't typedef u_long, u_short, or u_char, change
* the 0 to a 1.
*/
#if 1
typedef unsigned char u_char; /* 4.[34]BSD names. */
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned short u_short;
#endif
/* If your system doesn't typedef size_t, change the 0 to a 1. */
#if 0
typedef unsigned int size_t; /* POSIX, 4.[34]BSD names. */
#endif
/* If your system doesn't typedef ssize_t, change the 0 to a 1. */
#if 0
typedef int ssize_t; /* POSIX names. */
#endif
/*
* If your system doesn't have the POSIX type for a signal mask,
* change the 0 to a 1.
*/
#if 0 /* POSIX 1003.1 signal mask type. */
typedef unsigned int sigset_t;
#endif
/*
* If your system's vsprintf returns a char *, not an int,
* change the 0 to a 1.
*/
#if 0
#define VSPRINTF_CHARSTAR
#endif
/*
* If you don't have POSIX 1003.1 signals, the signal code surrounding the
* temporary file creation is intended to block all of the possible signals
* long enough to create the file and unlink it. All of this stuff is
* intended to use old-style BSD calls to fake POSIX 1003.1 calls.
*/
#ifdef NO_POSIX_SIGNALS
#define sigemptyset(set) (*(set) = 0)
#define sigfillset(set) (*(set) = ~(sigset_t)0, 0)
#define sigaddset(set,signo) (*(set) |= sigmask(signo), 0)
#define sigdelset(set,signo) (*(set) &= ~sigmask(signo), 0)
#define sigismember(set,signo) ((*(set) & sigmask(signo)) != 0)
#define SIG_BLOCK 1
#define SIG_UNBLOCK 2
#define SIG_SETMASK 3
static int __sigtemp; /* For the use of sigprocmask */
/* Repeated test of oset != NULL is to avoid "*0". */
#define sigprocmask(how, set, oset) \
((__sigtemp = \
(((how) == SIG_BLOCK) ? \
sigblock(0) | *(set) : \
(((how) == SIG_UNBLOCK) ? \
sigblock(0) & ~(*(set)) : \
((how) == SIG_SETMASK ? \
*(set) : sigblock(0))))), \
((oset) ? (*(oset ? oset : set) = sigsetmask(__sigtemp)) : \
sigsetmask(__sigtemp)), 0)
#endif
/*
* If your system doesn't have an include file with the appropriate
* byte order set, make sure you specify the correct one.
*/
#ifndef BYTE_ORDER
#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
#define BYTE_ORDER BIG_ENDIAN /* Set for your system. */
#endif
#if defined(SYSV) || defined(SYSTEM5)
#define index(a, b) strchr(a, b)
#define rindex(a, b) strrchr(a, b)
#define bzero(a, b) memset(a, 0, b)
#define bcmp(a, b, n) memcmp(a, b, n)
#define bcopy(a, b, n) memmove(b, a, n)
#endif
#if defined(BSD) || defined(BSD4_3)
#define strchr(a, b) index(a, b)
#define strrchr(a, b) rindex(a, b)
#define memcmp(a, b, n) bcmp(a, b, n)
#define memmove(a, b, n) bcopy(b, a, n)
#endif
/*
* 32-bit machine. The db routines are theoretically independent of
* the size of u_shorts and u_longs, but I don't know that anyone has
* ever actually tried it. At a minimum, change the following #define's
* if you are trying to compile on a different type of system.
*/
#ifndef USHRT_MAX
#define USHRT_MAX 0xFFFF
#define ULONG_MAX 0xFFFFFFFF
#endif
#ifndef O_ACCMODE /* POSIX 1003.1 access mode mask. */
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
#endif
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 RE limit. */
#define _POSIX2_RE_DUP_MAX 255
#endif
/*
* If you can't provide lock values in the open(2) call. Note, this
* allows races to happen.
*/
#ifndef O_EXLOCK /* 4.4BSD extension. */
#define O_EXLOCK 0
#endif
#ifndef O_SHLOCK /* 4.4BSD extension. */
#define O_SHLOCK 0
#endif
#ifndef EFTYPE
#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */
#endif
#ifndef WCOREDUMP /* 4.4BSD extension */
#define WCOREDUMP(a) 0
#endif
#ifndef STDERR_FILENO
#define STDIN_FILENO 0 /* ANSI C #defines */
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
#endif
#ifndef SEEK_END
#define SEEK_SET 0 /* POSIX 1003.1 seek values */
#define SEEK_CUR 1
#define SEEK_END 2
#endif
#ifndef _POSIX_VDISABLE /* POSIX 1003.1 disabling char. */
#define _POSIX_VDISABLE 0 /* Some systems used 0. */
#endif
#ifndef TCSASOFT /* 4.4BSD extension. */
#define TCSASOFT 0
#endif
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 values. */
#define _POSIX2_RE_DUP_MAX 255
#endif
#ifndef NULL /* ANSI C #defines NULL everywhere. */
#define NULL 0
#endif
#ifndef MAX /* Usually found in <sys/param.h>. */
#define MAX(_a,_b) ((_a)<(_b)?(_b):(_a))
#endif
#ifndef MIN /* Usually found in <sys/param.h>. */
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
#endif
/* Default file permissions. */
#ifndef DEFFILEMODE /* 4.4BSD extension. */
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
#endif
#ifndef S_ISDIR /* POSIX 1003.1 file type tests. */
#define S_ISDIR(m) ((m & 0170000) == 0040000) /* directory */
#define S_ISCHR(m) ((m & 0170000) == 0020000) /* char special */
#define S_ISBLK(m) ((m & 0170000) == 0060000) /* block special */
#define S_ISREG(m) ((m & 0170000) == 0100000) /* regular file */
#define S_ISFIFO(m) ((m & 0170000) == 0010000) /* fifo */
#endif
#ifndef S_ISLNK /* BSD POSIX 1003.1 extensions */
#define S_ISLNK(m) ((m & 0170000) == 0120000) /* symbolic link */
#define S_ISSOCK(m) ((m & 0170000) == 0140000) /* socket */
#endif
/* The type of a va_list. */
#ifndef _BSD_VA_LIST_ /* 4.4BSD #define. */
#define _BSD_VA_LIST_ char *
#endif
#endif /* !_COMPAT_H_ */

View file

@ -1 +0,0 @@
../../include/db.h

View file

@ -1 +0,0 @@
../../include/mpool.h

View file

@ -1 +0,0 @@
../../include/ndbm.h

Some files were not shown because too many files have changed in this diff Show more