Intial commit
This commit is contained in:
102
berkdb/PORT/linux/Makefile
Normal file
102
berkdb/PORT/linux/Makefile
Normal file
@@ -0,0 +1,102 @@
|
||||
# @(#)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
|
||||
29
berkdb/PORT/linux/OTHER_PATCHES
Normal file
29
berkdb/PORT/linux/OTHER_PATCHES
Normal file
@@ -0,0 +1,29 @@
|
||||
*** 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;
|
||||
1
berkdb/PORT/linux/clib
Symbolic link
1
berkdb/PORT/linux/clib
Symbolic link
@@ -0,0 +1 @@
|
||||
../clib
|
||||
231
berkdb/PORT/linux/include/compat.h
Normal file
231
berkdb/PORT/linux/include/compat.h
Normal file
@@ -0,0 +1,231 @@
|
||||
/*-
|
||||
* 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_ */
|
||||
1
berkdb/PORT/linux/include/db.h
Symbolic link
1
berkdb/PORT/linux/include/db.h
Symbolic link
@@ -0,0 +1 @@
|
||||
../../include/db.h
|
||||
1
berkdb/PORT/linux/include/mpool.h
Symbolic link
1
berkdb/PORT/linux/include/mpool.h
Symbolic link
@@ -0,0 +1 @@
|
||||
../../include/mpool.h
|
||||
1
berkdb/PORT/linux/include/ndbm.h
Symbolic link
1
berkdb/PORT/linux/include/ndbm.h
Symbolic link
@@ -0,0 +1 @@
|
||||
../../include/ndbm.h
|
||||
1
berkdb/PORT/linux/sys
Symbolic link
1
berkdb/PORT/linux/sys
Symbolic link
@@ -0,0 +1 @@
|
||||
include
|
||||
Reference in New Issue
Block a user