summaryrefslogtreecommitdiff
path: root/db-4.8.30/dist/brew
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2016-12-17 21:28:53 -0800
committerJesse Morgan <jesse@jesterpm.net>2016-12-17 21:28:53 -0800
commit54df2afaa61c6a03cbb4a33c9b90fa572b6d07b8 (patch)
tree18147b92b969d25ffbe61935fb63035cac820dd0 /db-4.8.30/dist/brew
Berkeley DB 4.8 with rust build script for linux.
Diffstat (limited to 'db-4.8.30/dist/brew')
-rw-r--r--db-4.8.30/dist/brew/bdb_brew.dsp115
-rw-r--r--db-4.8.30/dist/brew/bdbread.mak418
-rw-r--r--db-4.8.30/dist/brew/brew_config.in597
-rw-r--r--db-4.8.30/dist/brew/brew_db.in150
-rw-r--r--db-4.8.30/dist/brew/brew_make.in25
-rw-r--r--db-4.8.30/dist/brew/brew_posix.h103
6 files changed, 1408 insertions, 0 deletions
diff --git a/db-4.8.30/dist/brew/bdb_brew.dsp b/db-4.8.30/dist/brew/bdb_brew.dsp
new file mode 100644
index 0000000..29948f3
--- /dev/null
+++ b/db-4.8.30/dist/brew/bdb_brew.dsp
@@ -0,0 +1,115 @@
+# Microsoft Developer Studio Project File - Name="bdb_brew" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=bdb_brew - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "bdb_brew.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "bdb_brew.mak" CFG="bdb_brew - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "bdb_brew - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "bdb_brew - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "bdb_brew - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release/bdb_brew"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release/bdb_brew"
+# PROP Target_Dir ""
+LINK32=link.exe
+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I ".." /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I ".." /I "$(BREWDIR)\inc" /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD BASE RSC /l 0xc09
+# ADD RSC /l 0xc09
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ELSEIF "$(CFG)" == "bdb_brew - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug/bdb_brew"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug/bdb_brew"
+# PROP Target_Dir ""
+LINK32=link.exe
+# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I ".." /D "DIAGNOSTIC" /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /X /I "." /I ".." /I "$(BREWDIR)\inc" /D "DIAGNOSTIC" /D "UNICODE" /D "_UNICODE" /D "_DEBUG" /D "AEE_SIMULATOR" /D "__NO_SYSTEM_INCLUDES" /FR /FD /c
+# ADD BASE RSC /l 0xc09
+# ADD RSC /l 0xc09
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ENDIF
+
+# Begin Target
+
+# Name "bdb_brew - Win32 Release"
+# Name "bdb_brew - Win32 Debug"
+# Begin Group "header_files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\brew_db.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\clib_port.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\db.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\db_config.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\db_int.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\errno.h
+# End Source File
+# End Group
+# Begin Group "source_files"
+
+# PROP Default_Filter ""
diff --git a/db-4.8.30/dist/brew/bdbread.mak b/db-4.8.30/dist/brew/bdbread.mak
new file mode 100644
index 0000000..6b566ee
--- /dev/null
+++ b/db-4.8.30/dist/brew/bdbread.mak
@@ -0,0 +1,418 @@
+#============================================================================
+# Name:
+# $(TARGET).MAK
+#
+# Description:
+# Makefile to build the $(TARGET) downloadable module.
+#
+# The following nmake targets are available in this makefile:
+#
+# all - make .elf and .mod image files (default)
+# clean - delete object directory and image files
+# filename.o - make object file
+#
+# The above targets can be made with the following command:
+#
+# nmake /f $(TARGET).mak [target]
+#
+# Assumptions:
+# 1. The environment variable ADSHOME is set to the root directory of the
+# arm tools.
+# 2. The version of ADS is 1.2 or above.
+#
+# Notes:
+# None.
+#
+#
+# Copyright © 2000-2003 QUALCOMM Incorporated.
+# All Rights Reserved.
+# QUALCOMM Proprietary/GTDR
+#
+#----------------------------------------------------------------------------
+#============================================================================
+BREW_HOME =$(BREWDIR)
+ARM_HOME =$(ARMHOME)
+TARGET =D:\DB7588~1.BRE\BUILD_~1\bdb_brew
+LIST OF OBJECT FILES
+APP_INCLUDES = -I ..\build_brew -I ..
+
+#-------------------------------------------------------------------------------
+# Target file name and type definitions
+#-------------------------------------------------------------------------------
+
+EXETYPE = elf # Target image file format
+MODULE = mod # Downloadable module extension
+
+#-------------------------------------------------------------------------------
+# Target compile time symbol definitions
+#
+# Tells the SDK source stuffs that we're building a dynamic app.
+#-------------------------------------------------------------------------------
+
+DYNAPP = -DDYNAMIC_APP
+
+
+#-------------------------------------------------------------------------------
+# Software tool and environment definitions
+#-------------------------------------------------------------------------------
+
+AEESRCPATH = $(BREW_HOME)\src
+AEEINCPATH = $(BREW_HOME)\inc
+
+ARMBIN = $(ARM_HOME)\bin # ARM ADS application directory
+ARMINC = $(ARM_HOME)\include # ARM ADS include file directory
+ARMLIB = $(ARM_HOME)\lib # ARM ADS library directory
+
+ARMCC = $(ARMBIN)\armcc # ARM ADS ARM 32-bit inst. set ANSI C compiler
+LD = $(ARMBIN)\armlink # ARM ADS linker
+HEXTOOL = $(ARMBIN)\fromelf # ARM ADS utility to create hex file from image
+
+OBJ_CMD = -o # Command line option to specify output filename
+
+#-------------------------------------------------------------------------------
+# Processor architecture options
+#-------------------------------------------------------------------------------
+
+CPU = -cpu ARM7TDMI # ARM7TDMI target processor
+
+#-------------------------------------------------------------------------------
+# ARM Procedure Call Standard (APCS) options
+#-------------------------------------------------------------------------------
+
+ROPI = ropi # Read-Only(code) Position independence
+INTERWRK = interwork # Allow ARM-Thumb interworking
+
+APCS = -apcs /$(ROPI)/$(INTERWRK)/norwpi
+
+#-------------------------------------------------------------------------------
+# Additional compile time error checking options
+#-------------------------------------------------------------------------------
+
+CHK = -fa # Check for data flow anomolies
+
+#-------------------------------------------------------------------------------
+# Compiler output options
+#-------------------------------------------------------------------------------
+
+OUT = -c # Object file output only
+
+#-------------------------------------------------------------------------------
+# Compiler/assembler debug options
+#-------------------------------------------------------------------------------
+
+DBG = -g # Enable debug
+
+#-------------------------------------------------------------------------------
+# Compiler optimization options
+#-------------------------------------------------------------------------------
+
+OPT = -Ospace -O2 # Full compiler optimization for space
+
+#-------------------------------------------------------------------------------
+# Compiler code generation options
+#-------------------------------------------------------------------------------
+
+END = -littleend # Compile for little endian memory architecture
+ZA = -zo # LDR may only access 32-bit aligned addresses
+
+CODE = $(END) $(ZA)
+
+
+#-------------------------------------------------------------------------------
+# Include file search path options
+#-------------------------------------------------------------------------------
+
+INC = -I. -I$(AEEINCPATH) $(APP_INCLUDES)
+
+
+#-------------------------------------------------------------------------------
+# Compiler pragma emulation options
+#-------------------------------------------------------------------------------
+
+
+#-------------------------------------------------------------------------------
+# Linker options
+#-------------------------------------------------------------------------------
+
+LINK_CMD = -o #Command line option to specify output file
+ #on linking
+
+ROPILINK = -ropi #Link image as Read-Only Position Independent
+
+LINK_ORDER = -first AEEMod_Load
+
+#-------------------------------------------------------------------------------
+# HEXTOOL options
+#-------------------------------------------------------------------------------
+
+BINFORMAT = -bin
+
+
+#-------------------------------------------------------------------------------
+# Compiler flag definitions
+#-------------------------------------------------------------------------------
+NO_WARNING= -W
+
+CFLAGS0 = $(OUT) $(DYNAPP) $(CPU) $(APCS) $(CODE) $(CHK) $(DBG)
+CFLAGS = $(NO_WARNING) $(CFLAGS0) $(OPT)
+
+#-------------------------------------------------------------------------------
+# Linker flag definitions
+#-------------------------------------------------------------------------------
+
+# the -entry flag is not really needed, but it keeps the linker from reporting
+# warning L6305W (no entry point). The address
+LFLAGS = $(ROPILINK) -rwpi -entry 0x8000#
+
+#----------------------------------------------------------------------------
+# Default target
+#----------------------------------------------------------------------------
+
+all : $(TARGET).$(MODULE)
+
+#----------------------------------------------------------------------------
+# Clean target
+#----------------------------------------------------------------------------
+
+# The object subdirectory, target image file, and target hex file are deleted.
+
+clean :
+ @echo ---------------------------------------------------------------
+ @echo CLEAN
+ -del /f $(OBJS)
+ -del /f $(TARGET).$(EXETYPE)
+ -del /f $(TARGET).$(MODULE)
+ @echo ---------------------------------------------------------------
+
+#============================================================================
+# DEFAULT SUFFIX RULES
+#============================================================================
+
+# The following are the default suffix rules used to compile all objects that
+# are not specifically included in one of the module specific rules defined
+# in the next section.
+
+# The following macros are used to specify the output object file, MSG_FILE
+# symbol definition and input source file on the compile line in the rules
+# defined below.
+
+SRC_FILE = $(@F:.o=.c) # Input source file specification
+OBJ_FILE = $(OBJ_CMD) $(@F) # Output object file specification
+
+.SUFFIXES :
+.SUFFIXES : .o .dep .c
+
+#--------------------------------------------------------------------------
+# C code inference rules
+#----------------------------------------------------------------------------
+
+.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+.c.mix:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) -S -fs $(CFLAGS) $(INC) $(OBJ_FILE) $<
+ @echo ---------------------------------------------------------------
+
+
+{$(AEESRCPATH)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(AEESRCPATH)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+#===============================================================================
+# MODULE SPECIFIC RULES
+#===============================================================================
+
+APP_OBJS = $(OBJS)
+
+
+#----------------------------------------------------------------------------
+# Lib file targets
+#----------------------------------------------------------------------------
+
+$(TARGET).$(MODULE) : $(TARGET).$(EXETYPE)
+ @echo ---------------------------------------------------------------
+ @echo TARGET $@
+ $(HEXTOOL) $(TARGET).$(EXETYPE) $(BINFORMAT) $(TARGET).$(MODULE)
+
+$(TARGET).$(EXETYPE) : $(APP_OBJS)
+ @echo ---------------------------------------------------------------
+ @echo TARGET $@
+ $(LD) $(LINK_CMD) $(TARGET).$(EXETYPE) $(LFLAGS) $(APP_OBJS) $(LINK_ORDER)
+
+#----------------------------------------------------------------------------
+# Applet Specific Rules
+#----------------------------------------------------------------------------
+
+
+RULE1 = ..\clib
+{$(RULE1)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE1)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE2 = ..\btree
+{$(RULE2)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE2)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE3 = ..\db
+{$(RULE3)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE3)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE4 = ..\common
+{$(RULE4)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE4)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE5 = ..\os_brew
+{$(RULE5)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE5)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE6 = ..\env
+{$(RULE6)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE6)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE7 = ..\dbreg
+{$(RULE7)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE7)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE8 = ..\fileops
+{$(RULE8)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE8)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE9 = ..\hash
+{$(RULE9)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE9)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE10 = ..\hmac
+{$(RULE10)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE10)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE11 = ..\lock
+{$(RULE11)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE11)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE12 = ..\log
+{$(RULE12)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE12)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE13 = ..\mp
+{$(RULE13)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE13)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE14 = ..\mutex
+{$(RULE14)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE14)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE15 = ..\os
+{$(RULE15)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE15)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE16 = ..\qam
+{$(RULE16)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE16)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE17 = ..\rep
+{$(RULE17)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE17)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE18 = ..\txn
+{$(RULE18)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE18)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+
+RULE19 = ..\xa
+{$(RULE19)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE19)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+RULE20 = ..\bdbread
+{$(RULE20)}.c.o:
+ @echo ---------------------------------------------------------------
+ @echo OBJECT $(@F)
+ $(ARMCC) $(CFLAGS) $(INC) $(OBJ_FILE) $(RULE20)\$(SRC_FILE)
+ @echo ---------------------------------------------------------------
+
+# --------------------------------------------
+# DEPENDENCY LIST, DO NOT EDIT BELOW THIS LINE
+# --------------------------------------------
+
+bdbread.o : ..\bdbread\bdbread.c
+AEEModGen.o : ..\bdbread\AEEModGen.c
+AEEAppGen.o : ..\bdbread\AEEAppGen.c
diff --git a/db-4.8.30/dist/brew/brew_config.in b/db-4.8.30/dist/brew/brew_config.in
new file mode 100644
index 0000000..d7bde35
--- /dev/null
+++ b/db-4.8.30/dist/brew/brew_config.in
@@ -0,0 +1,597 @@
+/* Define to 1 if you want to build a version for running the test suite. */
+/* #undef CONFIG_TEST */
+
+/* We use DB_WIN32 much as one would use _WIN32 -- to specify that we're using
+ an operating system environment that supports Win32 calls and semantics. We
+ don't use _WIN32 because Cygwin/GCC also defines _WIN32, even though
+ Cygwin/GCC closely emulates the Unix environment. */
+/* #undef DB_WIN32 */
+
+/* Define to 1 if you want a debugging version. */
+#if defined(_DEBUG)
+#if !defined(DEBUG)
+#define DEBUG 1
+#endif
+#endif
+
+/* Define to 1 if you want a version that logs read operations. */
+/* #undef DEBUG_ROP */
+
+/* Define to 1 if you want a version that logs write operations. */
+/* #undef DEBUG_WOP */
+
+/* Define to 1 if you want a version with run-time diagnostic checking. */
+/* #undef DIAGNOSTIC */
+
+/* Define to 1 if 64-bit types are available. */
+/* #undef HAVE_64BIT_TYPES */
+
+/* Define to 1 if you have the `abort' function. */
+/* #undef HAVE_ABORT */
+
+/* Define to 1 if you have the `atoi' function. */
+#define HAVE_ATOI 1
+
+/* Define to 1 if you have the `atol' function. */
+/* #undef HAVE_ATOL */
+
+/* Define to 1 to use Solaris library routes for atomic operations. */
+/* #undef HAVE_ATOMIC_SOLARIS */
+
+/* Define to 1 to use native atomic operations. */
+/* #undef HAVE_ATOMIC_SUPPORT */
+
+/* Define to 1 to use GCC and x86 or x86_64 assemlby language atomic
+ operations. */
+/* #undef HAVE_ATOMIC_X86_GCC_ASSEMBLY */
+
+/* Define to 1 if you have the `backtrace' function. */
+/* #undef HAVE_BACKTRACE */
+
+/* Define to 1 if you have the `backtrace_symbols' function. */
+/* #undef HAVE_BACKTRACE_SYMBOLS */
+
+/* Define to 1 if building BREW. */
+#define HAVE_BREW 1
+
+/* Define to 1 if building on BREW (SDK2). */
+#define HAVE_BREW_SDK2 1
+
+/* Define to 1 if you have the `clock_gettime' function. */
+/* #undef HAVE_CLOCK_GETTIME */
+
+/* Define to 1 if clock_gettime supports CLOCK_MONOTONIC. */
+/* #undef HAVE_CLOCK_MONOTONIC */
+
+/* Define to 1 if building compression support. */
+/* #undef HAVE_COMPRESSION */
+
+/* Define to 1 if Berkeley DB release includes strong cryptography. */
+/* #undef HAVE_CRYPTO */
+
+/* Define to 1 if you have the `ctime_r' function. */
+/* #undef HAVE_CTIME_R */
+
+/* Define to 1 if ctime_r takes a buffer length as a third argument. */
+/* #undef HAVE_CTIME_R_3ARG */
+
+/* Define to 1 if you have the `directio' function. */
+/* #undef HAVE_DIRECTIO */
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_DIRENT_H */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+/* #undef HAVE_DLFCN_H */
+
+/* Define to 1 if you have the <execinfo.h> header file. */
+/* #undef HAVE_EXECINFO_H */
+
+/* Define to 1 if you have EXIT_SUCCESS/EXIT_FAILURE #defines. */
+#define HAVE_EXIT_SUCCESS 1
+
+/* Define to 1 if you have the `fchmod' function. */
+/* #undef HAVE_FCHMOD */
+
+/* Define to 1 if you have the `fclose' function. */
+/* #undef HAVE_FCLOSE */
+
+/* Define to 1 if you have the `fcntl' function. */
+/* #undef HAVE_FCNTL */
+
+/* Define to 1 if fcntl/F_SETFD denies child access to file descriptors. */
+/* #undef HAVE_FCNTL_F_SETFD */
+
+/* Define to 1 if you have the `fdatasync' function. */
+/* #undef HAVE_FDATASYNC */
+
+/* Define to 1 if you have the `fgetc' function. */
+/* #undef HAVE_FGETC */
+
+/* Define to 1 if you have the `fgets' function. */
+/* #undef HAVE_FGETS */
+
+/* Define to 1 if allocated filesystem blocks are not zeroed. */
+#define HAVE_FILESYSTEM_NOTZERO 1
+
+/* Define to 1 if you have the `fopen' function. */
+/* #undef HAVE_FOPEN */
+
+/* Define to 1 if you have the `ftruncate' function. */
+#define HAVE_FTRUNCATE 1
+
+/* Define to 1 if you have the `fwrite' function. */
+/* #undef HAVE_FWRITE */
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+/* #undef HAVE_GETADDRINFO */
+
+/* Define to 1 if you have the `getcwd' function. */
+/* #undef HAVE_GETCWD */
+
+/* Define to 1 if you have the `getenv' function. */
+/* #undef HAVE_GETENV */
+
+/* Define to 1 if you have the `getgid' function. */
+#define HAVE_GETGID 1
+
+/* Define to 1 if you have the `getopt' function. */
+/* #undef HAVE_GETOPT */
+
+/* Define to 1 if getopt supports the optreset variable. */
+/* #undef HAVE_GETOPT_OPTRESET */
+
+/* Define to 1 if you have the `getrusage' function. */
+/* #undef HAVE_GETRUSAGE */
+
+/* Define to 1 if you have the `gettimeofday' function. */
+/* #undef HAVE_GETTIMEOFDAY */
+
+/* Define to 1 if you have the `getuid' function. */
+/* #undef HAVE_GETUID */
+
+/* Define to 1 if building Hash access method. */
+/* #undef HAVE_HASH */
+
+/* Define to 1 if you have the `hstrerror' function. */
+/* #undef HAVE_HSTRERROR */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+/* #undef HAVE_INTTYPES_H */
+
+/* Define to 1 if you have the `isspace' function. */
+/* #undef HAVE_ISALPHA */
+
+/* Define to 1 if you have the `isspace' function. */
+/* #undef HAVE_ISDIGIT */
+
+/* Define to 1 if you have the `isspace' function. */
+/* #undef HAVE_ISPRINT */
+
+/* Define to 1 if you have the `isspace' function. */
+/* #undef HAVE_ISSPACE */
+
+/* Define to 1 if you have the `localtime' function. */
+/* #undef HAVE_LOCALTIME */
+
+/* Define to 1 if you have the `memcmp' function. */
+#define HAVE_MEMCMP 1
+
+/* Define to 1 if you have the `memcpy' function. */
+#define HAVE_MEMCPY 1
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+/* #undef HAVE_MEMORY_H */
+
+/* Define to 1 if you have the `mlock' function. */
+/* #undef HAVE_MLOCK */
+
+/* Define to 1 if you have the `mmap' function. */
+/* #undef HAVE_MMAP */
+
+/* Define to 1 if you have the `mprotect' function. */
+/* #undef HAVE_MPROTECT */
+
+/* Define to 1 if you have the `munlock' function. */
+/* #undef HAVE_MUNLOCK */
+
+/* Define to 1 if you have the `munmap' function. */
+/* #undef HAVE_MUNMAP */
+
+/* Define to 1 to use the GCC compiler and 68K assembly language mutexes. */
+/* #undef HAVE_MUTEX_68K_GCC_ASSEMBLY */
+
+/* Define to 1 to use the AIX _check_lock mutexes. */
+/* #undef HAVE_MUTEX_AIX_CHECK_LOCK */
+
+/* Define to 1 to use the GCC compiler and Alpha assembly language mutexes. */
+/* #undef HAVE_MUTEX_ALPHA_GCC_ASSEMBLY */
+
+/* Define to 1 to use the GCC compiler and ARM assembly language mutexes. */
+/* #undef HAVE_MUTEX_ARM_GCC_ASSEMBLY */
+
+/* Define to 1 to use the Apple/Darwin _spin_lock_try mutexes. */
+/* #undef HAVE_MUTEX_DARWIN_SPIN_LOCK_TRY */
+
+/* Define to 1 to use the UNIX fcntl system call mutexes. */
+/* #undef HAVE_MUTEX_FCNTL */
+
+/* Define to 1 to use the GCC compiler and PaRisc assembly language mutexes.
+ */
+/* #undef HAVE_MUTEX_HPPA_GCC_ASSEMBLY */
+
+/* Define to 1 to use the msem_XXX mutexes on HP-UX. */
+/* #undef HAVE_MUTEX_HPPA_MSEM_INIT */
+
+/* Define to 1 to use test-and-set mutexes with blocking mutexes. */
+/* #undef HAVE_MUTEX_HYBRID */
+
+/* Define to 1 to use the GCC compiler and IA64 assembly language mutexes. */
+/* #undef HAVE_MUTEX_IA64_GCC_ASSEMBLY */
+
+/* Define to 1 to use the GCC compiler and MIPS assembly language mutexes. */
+/* #undef HAVE_MUTEX_MIPS_GCC_ASSEMBLY */
+
+/* Define to 1 to use the msem_XXX mutexes on systems other than HP-UX. */
+/* #undef HAVE_MUTEX_MSEM_INIT */
+
+/* Define to 1 to use the GCC compiler and PowerPC assembly language mutexes.
+ */
+/* #undef HAVE_MUTEX_PPC_GCC_ASSEMBLY */
+
+/* Define to 1 to use POSIX 1003.1 pthread_XXX mutexes. */
+/* #undef HAVE_MUTEX_PTHREADS */
+
+/* Define to 1 to use Reliant UNIX initspin mutexes. */
+/* #undef HAVE_MUTEX_RELIANTUNIX_INITSPIN */
+
+/* Define to 1 to use the IBM C compiler and S/390 assembly language mutexes.
+ */
+/* #undef HAVE_MUTEX_S390_CC_ASSEMBLY */
+
+/* Define to 1 to use the GCC compiler and S/390 assembly language mutexes. */
+/* #undef HAVE_MUTEX_S390_GCC_ASSEMBLY */
+
+/* Define to 1 to use the SCO compiler and x86 assembly language mutexes. */
+/* #undef HAVE_MUTEX_SCO_X86_CC_ASSEMBLY */
+
+/* Define to 1 to use the obsolete POSIX 1003.1 sema_XXX mutexes. */
+/* #undef HAVE_MUTEX_SEMA_INIT */
+
+/* Define to 1 to use the SGI XXX_lock mutexes. */
+/* #undef HAVE_MUTEX_SGI_INIT_LOCK */
+
+/* Define to 1 to use the Solaris _lock_XXX mutexes. */
+/* #undef HAVE_MUTEX_SOLARIS_LOCK_TRY */
+
+/* Define to 1 to use the Solaris lwp threads mutexes. */
+/* #undef HAVE_MUTEX_SOLARIS_LWP */
+
+/* Define to 1 to use the GCC compiler and Sparc assembly language mutexes. */
+/* #undef HAVE_MUTEX_SPARC_GCC_ASSEMBLY */
+
+/* Define to 1 if the Berkeley DB library should support mutexes. */
+/* #undef HAVE_MUTEX_SUPPORT */
+
+/* Define to 1 if mutexes hold system resources. */
+/* #undef HAVE_MUTEX_SYSTEM_RESOURCES */
+
+/* Define to 1 to configure mutexes intra-process only. */
+/* #undef HAVE_MUTEX_THREAD_ONLY */
+
+/* Define to 1 to use the CC compiler and Tru64 assembly language mutexes. */
+/* #undef HAVE_MUTEX_TRU64_CC_ASSEMBLY */
+
+/* Define to 1 to use the UNIX International mutexes. */
+/* #undef HAVE_MUTEX_UI_THREADS */
+
+/* Define to 1 to use the UTS compiler and assembly language mutexes. */
+/* #undef HAVE_MUTEX_UTS_CC_ASSEMBLY */
+
+/* Define to 1 to use VMS mutexes. */
+/* #undef HAVE_MUTEX_VMS */
+
+/* Define to 1 to use VxWorks mutexes. */
+/* #undef HAVE_MUTEX_VXWORKS */
+
+/* Define to 1 to use the MSVC compiler and Windows mutexes. */
+/* #undef HAVE_MUTEX_WIN32 */
+
+/* Define to 1 to use the GCC compiler and Windows mutexes. */
+/* #undef HAVE_MUTEX_WIN32_GCC */
+
+/* Define to 1 to use the GCC compiler and 64-bit x86 assembly language
+ mutexes. */
+/* #undef HAVE_MUTEX_X86_64_GCC_ASSEMBLY */
+
+/* Define to 1 to use the GCC compiler and 32-bit x86 assembly language
+ mutexes. */
+/* #undef HAVE_MUTEX_X86_GCC_ASSEMBLY */
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if you have the O_DIRECT flag. */
+/* #undef HAVE_O_DIRECT */
+
+/* Define to 1 if building partitioned database support. */
+/* #undef HAVE_PARTITION */
+
+/* Define to 1 if you have the `pread' function. */
+/* #undef HAVE_PREAD */
+
+/* Define to 1 if you have the `printf' function. */
+/* #undef HAVE_PRINTF */
+
+/* Define to 1 if you have the `pstat_getdynamic' function. */
+/* #undef HAVE_PSTAT_GETDYNAMIC */
+
+/* Define to 1 if you have the `pthread_self' function. */
+/* #undef HAVE_PTHREAD_SELF */
+
+/* Define to 1 if you have the `pthread_yield' function. */
+/* #undef HAVE_PTHREAD_YIELD */
+
+/* Define to 1 if you have the `pwrite' function. */
+/* #undef HAVE_PWRITE */
+
+/* Define to 1 if building on QNX. */
+/* #undef HAVE_QNX */
+
+/* Define to 1 if you have the `qsort' function. */
+/* #undef HAVE_QSORT */
+
+/* Define to 1 if building Queue access method. */
+/* #undef HAVE_QUEUE */
+
+/* Define to 1 if you have the `raise' function. */
+/* #undef HAVE_RAISE */
+
+/* Define to 1 if you have the `rand' function. */
+/* #undef HAVE_RAND */
+
+/* Define to 1 if you have the `random' function. */
+/* #undef HAVE_RANDOM */
+
+/* Define to 1 if building replication support. */
+/* #undef HAVE_REPLICATION */
+
+/* Define to 1 if building the Berkeley DB replication framework. */
+/* #undef HAVE_REPLICATION_THREADS */
+
+/* Define to 1 if building RPC client/server. */
+/* #undef HAVE_RPC */
+
+/* Define to 1 if building on S60. */
+/* #undef HAVE_S60 */
+
+/* Define to 1 if you have the `sched_yield' function. */
+/* #undef HAVE_SCHED_YIELD */
+
+/* Define to 1 if you have the `select' function. */
+/* #undef HAVE_SELECT */
+
+/* Define to 1 if you have the `setgid' function. */
+#define HAVE_SETGID 1
+
+/* Define to 1 if you have the `setuid' function. */
+#define HAVE_SETUID 1
+
+/* Define to 1 to configure Berkeley DB to use shared, read/write latches. */
+/* #undef HAVE_SHARED_LATCHES */
+
+/* Define to 1 if shmctl/SHM_LOCK locks down shared memory segments. */
+/* #undef HAVE_SHMCTL_SHM_LOCK */
+
+/* Define to 1 if you have the `shmget' function. */
+/* #undef HAVE_SHMGET */
+
+/* Define to 1 if you have the `sigaction' function. */
+/* #undef HAVE_SIGACTION */
+
+/* Define to 1 if thread identifier type db_threadid_t is integral. */
+/* #undef HAVE_SIMPLE_THREAD_TYPE */
+
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1
+
+/* Define to 1 if you have the `stat' function. */
+/* #undef HAVE_STAT */
+
+/* Define to 1 if building statistics support. */
+/* #undef HAVE_STATISTICS */
+
+/* Define to 1 if you have the <stdint.h> header file. */
+/* #undef HAVE_STDINT_H */
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+/* #undef HAVE_STDLIB_H */
+
+/* Define to 1 if you have the `strcasecmp' function. */
+/* #undef HAVE_STRCASECMP */
+
+/* Define to 1 if you have the `strcat' function. */
+#define HAVE_STRCAT 1
+
+/* Define to 1 if you have the `strchr' function. */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strerror' function. */
+/* #undef HAVE_STRERROR */
+
+/* Define to 1 if you have the `strftime' function. */
+/* #undef HAVE_STRFTIME */
+
+/* Define to 1 if you have the <strings.h> header file. */
+/* #undef HAVE_STRINGS_H */
+
+/* Define to 1 if you have the <string.h> header file. */
+/* #undef HAVE_STRING_H */
+
+/* Define to 1 if you have the `strncat' function. */
+/* #undef HAVE_STRNCAT */
+
+/* Define to 1 if you have the `strncmp' function. */
+#define HAVE_STRNCMP 1
+
+/* Define to 1 if you have the `strrchr' function. */
+#define HAVE_STRRCHR 1
+
+/* Define to 1 if you have the `strsep' function. */
+/* #undef HAVE_STRSEP */
+
+/* Define to 1 if you have the `strtol' function. */
+/* #undef HAVE_STRTOL */
+
+/* Define to 1 if you have the `strtoul' function. */
+#define HAVE_STRTOUL 1
+
+/* Define to 1 if `st_blksize' is member of `struct stat'. */
+/* #undef HAVE_STRUCT_STAT_ST_BLKSIZE */
+
+/* Define to 1 if you have the `sysconf' function. */
+/* #undef HAVE_SYSCONF */
+
+/* Define to 1 if port includes files in the Berkeley DB source code. */
+/* #undef HAVE_SYSTEM_INCLUDE_FILES */
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+/* #undef HAVE_SYS_SELECT_H */
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+/* #undef HAVE_SYS_SOCKET_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+/* #undef HAVE_SYS_STAT_H */
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+/* #undef HAVE_SYS_TIME_H */
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+/* #undef HAVE_SYS_TYPES_H 1*/
+
+/* Define to 1 if you have the `time' function. */
+/* #undef HAVE_TIME */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+/* #undef HAVE_UNISTD_H */
+
+/* Define to 1 if unlink of file with open file descriptors will fail. */
+/* #undef HAVE_UNLINK_WITH_OPEN_FAILURE */
+
+/* Define to 1 if port includes historic database upgrade support. */
+/* #undef HAVE_UPGRADE_SUPPORT */
+
+/* Define to 1 if building access method verification support. */
+/* #undef HAVE_VERIFY */
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#define HAVE_VSNPRINTF 1
+
+/* Define to 1 if building VxWorks. */
+/* #undef HAVE_VXWORKS */
+
+/* Define to 1 if you have the `yield' function. */
+/* #undef HAVE_YIELD */
+
+/* Define to 1 if you have the `_fstati64' function. */
+/* #undef HAVE__FSTATI64 1*/
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries. */
+/* #undef LT_OBJDIR */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "support@sleepycat.com"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "Berkeley DB"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "Berkeley DB __EDIT_DB_VERSION__"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "db-__EDIT_DB_VERSION__"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "__EDIT_DB_VERSION__"
+
+/* The size of a `char', as computed by sizeof. */
+#define SIZEOF_CHAR 1
+
+/* The size of a `char *', as computed by sizeof. */
+#define SIZEOF_CHAR_P 4
+
+/* The size of a `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of a `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
+/* The size of a `long long', as computed by sizeof. */
+/* #undef SIZEOF_LONG_LONG */
+
+/* The size of a `short', as computed by sizeof. */
+#define SIZEOF_SHORT 2
+
+/* The size of a `size_t', as computed by sizeof. */
+#define SIZEOF_SIZE_T 4
+
+/* The size of a `unsigned char', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_CHAR 1
+
+/* The size of a `unsigned int', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_INT 4
+
+/* The size of a `unsigned long', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_LONG 4
+
+/* The size of a `unsigned long long', as computed by sizeof. */
+/* #undef SIZEOF_UNSIGNED_LONG_LONG */
+
+/* The size of a `unsigned short', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_SHORT 2
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+/* #undef STAT_MACROS_BROKEN */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+/* #undef TIME_WITH_SYS_TIME */
+
+/* Define to 1 to mask harmless uninitialized memory read/writes. */
+/* #undef UMRW */
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+/* #undef _FILE_OFFSET_BITS */
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#define inline
+#endif
+
+/* type to use in place of socklen_t if not defined */
+/* #undef socklen_t */
diff --git a/db-4.8.30/dist/brew/brew_db.in b/db-4.8.30/dist/brew/brew_db.in
new file mode 100644
index 0000000..b6f7a90
--- /dev/null
+++ b/db-4.8.30/dist/brew/brew_db.in
@@ -0,0 +1,150 @@
+/*-
+ * $Id$
+ *
+ * The following provides the information necessary to build Berkeley DB
+ * on BREW.
+ */
+
+#include <AEEAppGen.h>
+#include <AEEShell.h>
+#include <AEEFile.h>
+#include <AEEStdLib.h>
+
+#include "errno.h"
+#include "db.h"
+#include "clib_port.h"
+
+/*
+ * BREW doesn't have stdio.
+ */
+#define EOF (-1) /* Declare stdio's EOF. */
+#define stderr ((IFile *)1) /* Flag to call DBGPRINTF. */
+#define stdout ((IFile *)1)
+
+/*
+ * POSIX time structure/function compatibility.
+ *
+ * !!!
+ * This is likely wrong, we should probably move all Berkeley DB time-specific
+ * functionality into os/.
+ */
+struct tm {
+ int tm_sec; /* seconds after the minute - [0,59] */
+ int tm_min; /* minutes after the hour - [0,59] */
+ int tm_hour; /* hours since midnight - [0,23] */
+ int tm_mday; /* day of the month - [1,31] */
+ int tm_mon; /* months since January - [0,11] */
+ int tm_year; /* years since 1900 */
+ int tm_wday; /* days since Sunday - [0,6] */
+ int tm_yday; /* days since January 1 - [0,365] */
+ int tm_isdst; /* daylight savings time flag */
+ /*
+ * We don't provide tm_zone or tm_gmtoff because BREW doesn't
+ * provide them.
+ */
+};
+
+/*
+* The ctime() function converts the time pointed to by clock, representing
+* time in seconds since the Epoch to local time in the form of a string.
+*
+* Berkeley DB uses POSIX time values internally.
+*
+* The POSIX time function returns seconds since the Epoch, which was
+* 1970/01/01 00:00:00 UTC.
+*
+* BREW's GETUTCSECONDS() returns the number of seconds since
+* 1980/01/06 00:00:00 UTC.
+*
+* To convert from BREW to POSIX, add the seconds between 1970 and 1980 plus
+* 6 more days.
+*/
+#define BREW_EPOCH_OFFSET (315964800L)
+
+/*
+ * Map ANSI C library functions to BREW specific APIs.
+ */
+#define atoi(a) ATOI(a)
+#define free(a) FREE(a)
+#define malloc(a) MALLOC(a)
+#define memcmp(a, b, c) MEMCMP(a, b, c)
+#define memmove(a, b, c) MEMMOVE(a, b, c)
+#define memset(a, b, c) MEMSET(a, b, c)
+#define realloc(a, b) REALLOC(a, b)
+#define snprintf SNPRINTF
+#define sprintf SPRINTF
+#define strcat(a, b) STRCAT(a, b)
+#define strchr(a, b) STRCHR(a, b)
+#define strcmp(a, b) STRCMP(a, b)
+#define strcpy(a, b) STRCPY(a, b)
+#define strdup(a) STRDUP(a)
+#define strlen(a) STRLEN(a)
+#define strncmp(a, b, c) STRNCMP(a, b, c)
+#define strncpy(a, b, c) STRNCPY(a, b, c)
+#define strrchr(a, b) STRRCHR(a, b)
+#define strtoul(a, b, c) STRTOUL(a, b, c)
+#define vsnprintf(a, b, c, d) VSNPRINTF(a, b, c, d)
+
+/*
+ * !!!
+ * Don't #define memcpy to MEMCPY, even though it exists, because that results
+ * in a C pre-processor loop and compile failure.
+ *
+ * Don't #define memcpy to MEMMOVE directly, that results in failure as well.
+ */
+#define memcpy memmove
+
+/*
+ * BREW does not have concept of 'sync'.
+ *
+ * It depends on the implementation of the BREW on various platforms, but
+ * Mobilus confirms the version of BREW that ships to North America in 3G
+ * models has sync features guaranteeing safe physical writes whenever a
+ * write is performed using BREW API. Therefore, the issue is not on the
+ * applications running top of BREW, but the implementation of BREW itself
+ * that has to be checked in order to provide durability.
+ */
+#define __os_fsync(a, b) (0)
+#define fflush(a) (0)
+
+/*
+ * The ANSI C library functions for which we wrote local versions.
+ */
+int fclose(FILE *);
+int fgetc(FILE *);
+char *fgets(char *, int, FILE *);
+FILE *fopen(const char *, const char *);
+size_t fwrite(const void *, size_t, size_t, FILE *);
+char *getcwd(char *, size_t);
+struct tm *localtime(const time_t *);
+time_t time(time_t *);
+
+/*
+ * FILE_MANAGER_CREATE --
+ * Instantiate file manager instance.
+ */
+#define FILE_MANAGER_CREATE(dbenv, mgr, ret) do { \
+ AEEApplet *__app = (AEEApplet *)GETAPPINSTANCE(); \
+ int __ret; \
+ if ((__ret = ISHELL_CreateInstance(__app->m_pIShell, \
+ AEECLSID_FILEMGR, (void **)&(mgr))) == SUCCESS) \
+ ret = 0; \
+ else { \
+ __db_syserr(dbenv, __ret, "ISHELL_CreateInstance"); \
+ ret = __os_posix_err(__ret); \
+ } \
+} while (0)
+
+/*
+ * FILE_MANAGER_ERR --
+ * Handle file manager method error.
+ */
+#define FILE_MANAGER_ERR(dbenv, mgr, name, op, ret) do { \
+ int __ret; \
+ __ret = IFILEMGR_GetLastError(mgr); \
+ if ((name) == NULL) \
+ __db_syserr(dbenv, __ret, "%s", op); \
+ else \
+ __db_syserr(dbenv, __ret, "%s: %s", name, op); \
+ (ret) = __os_posix_err(__ret); \
+} while (0)
diff --git a/db-4.8.30/dist/brew/brew_make.in b/db-4.8.30/dist/brew/brew_make.in
new file mode 100644
index 0000000..462c666
--- /dev/null
+++ b/db-4.8.30/dist/brew/brew_make.in
@@ -0,0 +1,25 @@
+###################################################
+# EVERYTHING IN THIS FILE HEADER COPIED FROM dist/brew_makefile.in
+##################################################
+CC= cc
+CFLAGS= -c -g -W -Wall -Wpointer-arith -Wmissing-prototypes \
+ -I. -I.. -DDIAGNOSTIC
+
+.c.o:
+ $(CC) $(CFLAGS) $< -o $@
+
+a: t
+
+t: t.c libdb.a
+ $(CC) t.c -o t libdb.a
+
+t.c:
+ echo '#include <sys/types.h>' > $@
+ echo '#include <stdio.h>' >> $@
+ echo '#define AEEApplet char' >> $@
+ echo '#include "db.h"' >> $@
+ echo 'int main() {' >> $@
+ echo ' DB_ENV *dbenv; db_env_create(&dbenv, 0); return (0); }' >> $@
+
+realclean distclean clean:
+ rm -f mklog t t.c tmp.c libdb.a *.o
diff --git a/db-4.8.30/dist/brew/brew_posix.h b/db-4.8.30/dist/brew/brew_posix.h
new file mode 100644
index 0000000..acfc812
--- /dev/null
+++ b/db-4.8.30/dist/brew/brew_posix.h
@@ -0,0 +1,103 @@
+/*-
+ * See the file LICENSE for redistribution information.
+ *
+ * Copyright (c) 2005-2009 Oracle. All rights reserved.
+ *
+ * $Id$
+ */
+
+typedef void *AEEAppInfo;
+typedef void *AEECLSID;
+typedef void *IFileMgr;
+typedef void *IShell;
+
+typedef int FileSeekType;
+typedef int OpenFileMode;
+typedef int boolean;
+
+typedef struct {
+ IShell *m_pIShell;
+} AEEApplet;
+
+typedef struct {
+ unsigned int attrib;
+ unsigned int dwSize;
+ char *szName;
+} FileInfo;
+
+typedef struct {
+ int wSecond;
+ int wMinute;
+ int wHour;
+ int wDay;
+ int wWeekDay;
+ int wMonth;
+ int wYear;
+} JulianType;
+
+#define AECHAR char
+#define AEECLSID_FILEMGR (1)
+#define BREW_EPOCH_OFFSET (1)
+#define DBGPRINTF printf
+#define FILE_MANAGER_CREATE(a, b, c) (b = (IFileMgr *)a, c = 0)
+#define FILE_MANAGER_ERR(a, b, c, d, e) (b = (IFileMgr *)a, e = 0)
+#define FLOAT_TO_WSTR(a, b, c) (a = c)
+#define GETAPPINSTANCE() (NULL)
+#define GETJULIANDATE(a, b)
+#define GETTIMESECONDS() (0)
+#define GETUTCSECONDS() (0)
+#define IFILEMGR_EnumInit(a, b, c) (b = b, 1)
+#define IFILEMGR_EnumNext(a, b) (1)
+#define IFILEMGR_GetInfo(a, b, c) (1)
+#define IFILEMGR_GetLastError(a) (1)
+#define IFILEMGR_MkDir(a, b) (b = b, 1)
+#define IFILEMGR_OpenFile(a, b, c) (NULL)
+#define IFILEMGR_Release(a) (a = a)
+#define IFILEMGR_Remove(a, b) (b = b, 1)
+#define IFILEMGR_Rename(a, b, c) (a = a, b = b, c = c, 0)
+#define IFILEMGR_ResolvePath(a, b, c, d) (1)
+#define IFILEMGR_Test(a, b) (b = b, 1)
+#define IFILE_GetInfo(a, b) (a = a, 1)
+#define IFILE_Read(a, b, c) (a = a, 1)
+#define IFILE_Release(a) (a = a)
+#define IFILE_Seek(a, b, c) (1)
+#define IFILE_Truncate(a, b) (a = a, 1)
+#define IFILE_Write(a, b, c) (a = a, 1)
+#define ISHELL_ActiveApplet(a) (NULL)
+#define ISHELL_CloseApplet(a, b)
+#define ISHELL_CreateInstance(a, b, c) (1)
+#define ISHELL_QueryClass(a, b, c) (*c = NULL, 1)
+#define JULIANTOSECONDS(a) (1)
+#define LOCALTIMEOFFSET(a) (1)
+#define MEMCPY(a, b, c) (NULL)
+#define MSLEEP(a)
+#define WSTR_TO_STR(a, b, c) strncpy(b, a, c)
+#define __os_fsync(a, b) (0)
+
+#define SUCCESS (0)
+#define EFAILED (1)
+
+#define _FA_DIR (1)
+#define _OFM_APPEND (1)
+#define _OFM_CREATE (1)
+#define _OFM_READ (1)
+#define _OFM_READWRITE (1)
+#define _SEEK_CURRENT (1)
+#define _SEEK_END (1)
+#define _SEEK_START (1)
+
+#define EBADFILENAME (1)
+#define EBADSEEKPOS (2)
+#define EDIRNOEXISTS (3)
+#define EDIRNOTEMPTY (4)
+#define EFILEEOF (5)
+#define EFILEEXISTS (6)
+#define EFILENOEXISTS (7)
+#define EFILEOPEN (8)
+#define EFSFULL (9)
+#define EINVALIDOPERATION (10)
+#define ENOMEDIA (11)
+#define ENOMEMORY (12)
+#define EOUTOFNODES (13)
+
+#define static