db3 stable port information

Package: db3
Version: 3.3.11
Revision: 1028
CustomMirror: <<
nam-US: http://download-east.oracle.com/berkeley-db/
nam-US: http://download-west.oracle.com/berkeley-db/
eur-UK: http://download-uk.oracle.com/berkeley-db/
<<
Source: mirror:custom:db-%v.tar.gz
Patch: %n.patch
Conflicts: db, db4, db4-ssl, db31 (<< 3.1.17-8), db41, db41-ssl, db42-ssl, db42, db43-ssl, db43, db44, db44-aes
Replaces: db, db4, db4-ssl, db31 (<< 3.1.17-8), db41, db41-ssl, db42-ssl, db42, db43-ssl, db43, db44, db44-aes
Provides: db
Depends: db3-shlibs (= %v-%r)
BuildDepends: fink (>= 0.10.0)
BuildDependsOnly: true
NoSetLDFlags: true
NoSetCPPFlags: true
SetCFlags: -Os
SetCXXFlags: -Os
ConfigureParams: --enable-compat185 --enable-cxx --includedir=%p/include/db3
GCC: 4.0
CompileScript: <<
(cd build_unix; ../dist/configure %c)
(cd build_unix; make UTIL_PROGS="")
(cd build_unix; rm .libs/libdb-3.3.dylib)
(cd build_unix; make SOLINK="cc -dynamiclib -compatibility_version 3.3 -current_version 3.3.11 -install_name %p/lib/libdb-3.3.dylib" SOFLAGS="" libso_target=".libs/libdb-3.3.dylib" UTIL_PROGS="")
(cd build_unix; rm .libs/libdb_cxx-3.3.dylib)
(cd build_unix; make SOLINK="c++ -dynamiclib -compatibility_version 3.3 -current_version 3.3.11 -install_name %p/lib/libdb_cxx-3.3.dylib" SOFLAGS="" libxso_target=".libs/libdb_cxx-3.3.dylib" UTIL_PROGS="")
(cd build_unix; make)
<<
InstallScript: <<
#! /bin/sh -ev
(cd build_unix; make install prefix=%I docdir=%I/share/doc/db3-doc/docs includedir=%I/include/db3) || exit 1
binfiles="db_archive db_checkpoint db_deadlock db_dump db_load db_printlog db_recover db_stat db_upgrade db_verify"
for binfile in $binfiles ; do
mv %i/bin/$binfile %i/bin/$binfile.%N
done
<<
SplitOff: <<
Package: %N-shlibs
Description: Shared Libraries for db3
Replaces: %N (<< 3.3.11-4)
Shlibs: <<
%p/lib/libdb-3.3.dylib 3.3.0 %n (>= 3.3.11-23)
%p/lib/libdb_cxx-3.3.dylib 3.3.0 %n (>= 3.3.11-23)
<<
Files: lib/libdb-3.3.dylib lib/libdb_cxx-3.3.dylib lib/libdb-3.3.la lib/libdb_cxx-3.3.la
DocFiles: LICENSE
<<
SplitOff2: <<
Package: %N-bin
Depends: %N-shlibs (= %v-%r)
Conflicts: db4-bin (<< 4.0.14-24), db4 (<< 4.0.14-3), db31 (<< 3.1.17-2), db4-ssl-bin (<< 4.0.14-24), db41-ssl-bin (<< 4.1.25-20), db41-bin (<< 4.1.25-20), db42-ssl-bin (<< 4.2.52-14), db42-bin (<< 4.2.52-14)
Replaces: db4-bin (<< 4.0.14-24), %N (<< 3.3.11-4), db31 (<< 3.1.17-2), db4-ssl-bin (<< 4.0.14-24), db41-ssl-bin (<< 4.1.25-20), db41-bin (<< 4.1.25-20), db42-ssl-bin (<< 4.2.52-14), db42-bin (<< 4.2.52-14)
Description: Binary utilities for db3
Files: bin
DocFiles: LICENSE
PostInstScript: <<
binfiles="db_archive db_checkpoint db_deadlock db_dump db_load db_printlog db_recover db_stat db_upgrade db_verify"
priority=`echo %N | sed -e 's/[a-zA-Z]//g'`
for binfile in $binfiles ; do
update-alternatives --install %p/bin/$binfile $binfile %p/bin/$binfile.%N $priority
done
<<
PreRmScript: <<
if [ $1 != "upgrade" ]; then
binfiles="db_archive db_checkpoint db_deadlock db_dump db_load db_printlog db_recover db_stat db_upgrade db_verify"
for binfile in $binfiles ; do
update-alternatives --remove $binfile %p/bin/$binfile.%N
done
fi
<<
<<
SplitOff3: <<
Package: %N-doc
Conflicts: db31 (<< 3.1.17-2)
Replaces: %N (<< 3.3.11-3), db31 (<< 3.1.17-2)
Description: Documentation for db3
Files: share/doc/db3-doc
DocFiles: LICENSE
<<
DocFiles: LICENSE README
License: OSI-Approved
Description: Berkeley DB embedded database
DescPort: <<
Small patch for 10.1 compatibility. Fixed shared lib install problems.
DB 1.85 compatibility is included, as is C++.
Rev 5:
SplitOff version.
Rev 4:
Updated for new shlibs policy.
Rev 3:
Upped revision number, had only checked my local tree :-(
Rev 2:
Added the remove/install script to put back the symlinks pointing at
db4 in the libs, removed the binaries and documentation from this package, and removed the syminks for the header files.
My thanks to:
David R. Morrison, Jan de Leeuw, Max Horn, Gordon Messmer
<<
DescPackaging: <<
Includes the libraries, headers and documentation. Headers are in include/db3 docs in share/db3/docs. Binary utilities are in a separate package. As is the documentation.
This package ought to work with, or without db4, and should not care about the order of installation. If this is not true, it is a bug, let me know.
<<
Homepage: http://www.oracle.com/database/berkeley-db/index.html
Maintainer: None
Source-MD5: b6ae24fa55713f17a9ac3219d987722c

db3 stable port .patch

diff -Naur db3-old/build_vxworks/db.h db-3.3.11/build_vxworks/db.h
--- db3-old/build_vxworks/db.h Fri Jul 13 10:34:27 2001
+++ db-3.3.11/build_vxworks/db.h Thu Dec 20 15:03:34 2001
@@ -21,6 +21,10 @@
extern "C" {
#endif

+#ifndef HAVE_VXWORKS
+#define HAVE_VXWORKS 1
+#endif
+
/*
* XXX
* Handle function prototypes and the keyword "const". This steps on name
diff -Naur db3-old/db185/db185.c db-3.3.11/db185/db185.c
--- db3-old/db185/db185.c Wed Apr 11 12:47:45 2001
+++ db-3.3.11/db185/db185.c Thu Dec 20 15:03:30 2001
@@ -40,8 +40,13 @@

/*
* EXTERN: #define dbopen __db185_open
+ * EXTERN: #ifdef _DB185_INT_H_
* EXTERN: DB185 *__db185_open
* EXTERN: __P((const char *, int, int, DBTYPE, const void *));
+ * EXTERN: #else
+ * EXTERN: DB *__db185_open
+ * EXTERN: __P((const char *, int, int, DBTYPE, const void *));
+ * EXTERN: #endif
*/
DB185 *
__db185_open(file, oflags, mode, type, openinfo)
diff -Naur db3-old/db185/db185_int.in db-3.3.11/db185/db185_int.in
--- db3-old/db185/db185_int.in Wed Apr 11 05:43:54 2001
+++ db-3.3.11/db185/db185_int.in Thu Dec 20 15:03:30 2001
@@ -39,8 +39,8 @@
* $Id: db3-3.3.11-5.patch,v 1.1.1.1 2002/02/15 01:16:37 dmrrsn Exp $
*/

-#ifndef _DB_185_H_
-#define _DB_185_H_
+#ifndef _DB185_INT_H_
+#define _DB185_INT_H_

/* Routine flags. */
#define R_CURSOR 1 /* del, put, seq */
diff -Naur db3-old/dist/configure db-3.3.11/dist/configure
--- db3-old/dist/configure Fri Jul 13 10:34:11 2001
+++ db-3.3.11/dist/configure Thu Dec 20 15:04:25 2001
@@ -6550,7 +6550,7 @@
;;

darwin* | rhapsody*)
- allow_undefined_flag='-undefined suppress'
+ allow_undefined_flag='-flat_namespace -undefined suppress'
# FIXME: Relying on posixy $() will cause problems for
# cross-compilation, but unfortunately the echo tests do not
# yet detect zsh echo's removal of \ escapes.
@@ -8439,9 +8439,33 @@
# Prevent multiple expansion

LIBTOOL="\$(SHELL) ./libtool"
-SOSUFFIX=`sed -e '/^library_names_spec=/!d' -e 's/.*\.\([a-zA-Z0-9_]*\).*/\1/' ./libtool`
SOFLAGS="-rpath \$(libdir)"

+echo "$as_me:8770: checking SOSUFFIX from libtool" >&5
+echo $ECHO_N "checking SOSUFFIX from libtool... $ECHO_C" >&6
+# $library_names_spec is a snippet of shell that may
+# defined in terms of $versuffix, $release, $libname.
+# All we want is to eval it and grab the suffix used
+# for shared objects.
+versuffix=""
+release=""
+libname=libfoo
+eval library_names=\"$library_names_spec\"
+SOSUFFIX=`echo "$library_names" | sed -e 's/.*\.\([a-zA-Z0-9_]*\).*/\1/'`
+echo "$as_me:8781: result: $SOSUFFIX" >&5
+echo "${ECHO_T}$SOSUFFIX" >&6
+
+if test "$SOSUFFIX" = '' ; then
+ SOSUFFIX=so
+ if test "$enable_shared" = "yes"; then
+ { echo "$as_me:8787: WARNING: libtool may not know about this architecture." >&5
+echo "$as_me: WARNING: libtool may not know about this architecture." >&2;}
+ { echo "$as_me:8789: WARNING: assuming .$SOSUFFIX suffix for dynamic libraries." >&5
+echo "$as_me: WARNING: assuming .$SOSUFFIX suffix for dynamic libraries." >&2;}
+ fi
+fi
+
+
SAVE_CC="${MAKEFILE_CC}"
SAVE_CXX="${MAKEFILE_CXX}"
MAKEFILE_CC="\$(LIBTOOL) --mode=compile ${SAVE_CC}"
@@ -8728,7 +8752,7 @@
done
JTOPDIR=`echo "$JAVACABS" | sed -e 's://*:/:g' -e 's:/[^/]*$::'`
case "$host_os" in
- darwin*) JTOPDIR=`echo "$JTOPDIR" | sed -e s:/[^/]*$::'`
+ darwin*) JTOPDIR=`echo "$JTOPDIR" | sed -e 's:/[^/]*$::'`
JNIHEADERDIR="$JTOPDIR/Headers";;
*) JNIHEADERDIR="$JTOPDIR/include";;
esac
diff -Naur db3-old/include_auto/db185_ext.in db-3.3.11/include_auto/db185_ext.in
--- db3-old/include_auto/db185_ext.in Wed Apr 11 05:44:20 2001
+++ db-3.3.11/include_auto/db185_ext.in Thu Dec 20 15:03:30 2001
@@ -3,9 +3,13 @@
extern "C" {
#endif
#define dbopen __db185_open
+#ifdef _DB185_INT_H_
DB185 *__db185_open __P((const char *, int, int, DBTYPE, const void *));
+#else
+DB *__db185_open __P((const char *, int, int, DBTYPE, const void *));
+#endif
#if defined(__cplusplus)
}
#endif

-#endif /* !_DB_185_H_ */
+#endif /* _DB_185_H_ or _DB185_INT_H_ */
diff -Naur db3-old/include_auto/db185_uext.in db-3.3.11/include_auto/db185_uext.in
--- db3-old/include_auto/db185_uext.in Wed Apr 11 05:44:20 2001
+++ db-3.3.11/include_auto/db185_uext.in Thu Dec 20 15:03:30 2001
@@ -3,10 +3,15 @@
extern "C" {
#endif
#define dbopen __db185_open@DB_VERSION_UNIQUE_NAME@
+#ifdef _DB185_INT_H_
#define __db185_open __db185_open@DB_VERSION_UNIQUE_NAME@
DB185 *__db185_open __P((const char *, int, int, DBTYPE, const void *));
+#else
+#define __db185_open __db185_open@DB_VERSION_UNIQUE_NAME@
+DB *__db185_open __P((const char *, int, int, DBTYPE, const void *));
+#endif
#if defined(__cplusplus)
}
#endif

-#endif /* !_DB_185_H_ */
+#endif /* _DB_185_H_ or _DB185_INT_H_ */
--- db-3.3.11/include/mutex.h.orig Fri Oct 25 21:52:40 2002
+++ db-3.3.11/include/mutex.h Fri Oct 25 21:57:35 2002
@@ -482,6 +482,31 @@
* 'set' mutexes have the value 1, like on Intel; the returned value from
* MUTEX_SET() is 1 if the mutex previously had its low bit clear, 0 otherwise.
*/
+#if defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
+#warning "Using apple specific mutexes"
+extern int __db_mutex_set __P((volatile tsl_t *));
+void
+__db_mutex_tas_dummy()
+{
+ __asm__ __volatile__(" \n\
+ .globl ___db_mutex_set \n\
+___db_mutex_set: \n\
+ lwarx r5,0,r3 \n\
+ cmpwi r5,0 \n\
+ bne fail \n\
+ addi r5,r5,1 \n\
+ stwcx. r5,0,r3 \n\
+ beq success \n\
+fail: \n\
+ li r3,0 \n\
+ blr \n\
+success: \n\
+ li r3,1 \n\
+ blr");
+}
+#define MUTEX_SET(tsl) __db_mutex_set(tsl)
+#else
+
#define MUTEX_SET(tsl) ({ \
int __one = 1; \
int __r; \
@@ -499,6 +524,7 @@
!(__r & 1); \
})

+#endif
#define MUTEX_UNSET(tsl) (*(tsl) = 0)
#define MUTEX_INIT(tsl) MUTEX_UNSET(tsl)
#endif

db3 _unstable_ port information

Package: db3
Version: 3.3.11
Revision: 1028
CustomMirror: <<
nam-US: http://download-east.oracle.com/berkeley-db/
nam-US: http://download-west.oracle.com/berkeley-db/
eur-UK: http://download-uk.oracle.com/berkeley-db/
<<
Source: mirror:custom:db-%v.tar.gz
PatchFile: %n.patch
PatchFile-MD5: b7722b58d6959624bd638198ce487f93
Conflicts: db, db4, db4-ssl, db31 (<< 3.1.17-8), db41, db41-ssl, db42-ssl, db42, db43-ssl, db43, db44, db44-aes
Replaces: db, db4, db4-ssl, db31 (<< 3.1.17-8), db41, db41-ssl, db42-ssl, db42, db43-ssl, db43, db44, db44-aes
Provides: db
Depends: db3-shlibs (= %v-%r)
BuildDepends: fink (>= 0.24.12-1)
BuildDependsOnly: true
NoSetLDFlags: true
NoSetCPPFlags: true
SetCFlags: -Os
SetCXXFlags: -Os
ConfigureParams: --enable-compat185 --enable-cxx --includedir=%p/include/db3
GCC: 4.0
CompileScript: <<
(cd build_unix; ../dist/configure %c)
(cd build_unix; make UTIL_PROGS="")
(cd build_unix; rm .libs/libdb-3.3.dylib)
(cd build_unix; make SOLINK="cc -dynamiclib -compatibility_version 3.3 -current_version 3.3.11 -install_name %p/lib/libdb-3.3.dylib" SOFLAGS="" libso_target=".libs/libdb-3.3.dylib" UTIL_PROGS="")
(cd build_unix; rm .libs/libdb_cxx-3.3.dylib)
(cd build_unix; make SOLINK="c++ -dynamiclib -compatibility_version 3.3 -current_version 3.3.11 -install_name %p/lib/libdb_cxx-3.3.dylib" SOFLAGS="" libxso_target=".libs/libdb_cxx-3.3.dylib" UTIL_PROGS="")
(cd build_unix; make)
<<
InstallScript: <<
#! /bin/sh -ev
(cd build_unix; make install prefix=%I docdir=%I/share/doc/db3-doc/docs includedir=%I/include/db3) || exit 1
binfiles="db_archive db_checkpoint db_deadlock db_dump db_load db_printlog db_recover db_stat db_upgrade db_verify"
for binfile in $binfiles ; do
mv %i/bin/$binfile %i/bin/$binfile.%N
done
<<
SplitOff: <<
Package: %N-shlibs
Description: Shared Libraries for db3
Replaces: %N (<< 3.3.11-4)
Shlibs: <<
%p/lib/libdb-3.3.dylib 3.3.0 %n (>= 3.3.11-23)
%p/lib/libdb_cxx-3.3.dylib 3.3.0 %n (>= 3.3.11-23)
<<
Files: lib/libdb-3.3.dylib lib/libdb_cxx-3.3.dylib lib/libdb-3.3.la lib/libdb_cxx-3.3.la
DocFiles: LICENSE
<<
SplitOff2: <<
Package: %N-bin
Depends: %N-shlibs (= %v-%r)
Conflicts: db4-bin (<< 4.0.14-24), db4 (<< 4.0.14-3), db31 (<< 3.1.17-2), db4-ssl-bin (<< 4.0.14-24), db41-ssl-bin (<< 4.1.25-20), db41-bin (<< 4.1.25-20), db42-ssl-bin (<< 4.2.52-14), db42-bin (<< 4.2.52-14)
Replaces: db4-bin (<< 4.0.14-24), %N (<< 3.3.11-4), db31 (<< 3.1.17-2), db4-ssl-bin (<< 4.0.14-24), db41-ssl-bin (<< 4.1.25-20), db41-bin (<< 4.1.25-20), db42-ssl-bin (<< 4.2.52-14), db42-bin (<< 4.2.52-14)
Description: Binary utilities for db3
Files: bin
DocFiles: LICENSE
PostInstScript: <<
binfiles="db_archive db_checkpoint db_deadlock db_dump db_load db_printlog db_recover db_stat db_upgrade db_verify"
priority=`echo %N | sed -e 's/[a-zA-Z]//g'`
for binfile in $binfiles ; do
update-alternatives --install %p/bin/$binfile $binfile %p/bin/$binfile.%N $priority
done
<<
PreRmScript: <<
if [ $1 != "upgrade" ]; then
binfiles="db_archive db_checkpoint db_deadlock db_dump db_load db_printlog db_recover db_stat db_upgrade db_verify"
for binfile in $binfiles ; do
update-alternatives --remove $binfile %p/bin/$binfile.%N
done
fi
<<
<<
SplitOff3: <<
Package: %N-doc
Conflicts: db31 (<< 3.1.17-2)
Replaces: %N (<< 3.3.11-3), db31 (<< 3.1.17-2)
Description: Documentation for db3
Files: share/doc/db3-doc
DocFiles: LICENSE
<<
DocFiles: LICENSE README
License: OSI-Approved
Description: Berkeley DB embedded database
DescPort: <<
Small patch for 10.1 compatibility. Fixed shared lib install problems.
DB 1.85 compatibility is included, as is C++.
Rev 5:
SplitOff version.
Rev 4:
Updated for new shlibs policy.
Rev 3:
Upped revision number, had only checked my local tree :-(
Rev 2:
Added the remove/install script to put back the symlinks pointing at
db4 in the libs, removed the binaries and documentation from this package, and removed the syminks for the header files.
My thanks to:
David R. Morrison, Jan de Leeuw, Max Horn, Gordon Messmer
<<
DescPackaging: <<
Includes the libraries, headers and documentation. Headers are in include/db3 docs in share/db3/docs. Binary utilities are in a separate package. As is the documentation.
This package ought to work with, or without db4, and should not care about the order of installation. If this is not true, it is a bug, let me know.
<<
Homepage: http://www.oracle.com/database/berkeley-db/index.html
Maintainer: None
Source-MD5: b6ae24fa55713f17a9ac3219d987722c

db3 _unstable_ port .patch

diff -Naur db3-old/build_vxworks/db.h db-3.3.11/build_vxworks/db.h
--- db3-old/build_vxworks/db.h Fri Jul 13 10:34:27 2001
+++ db-3.3.11/build_vxworks/db.h Thu Dec 20 15:03:34 2001
@@ -21,6 +21,10 @@
extern "C" {
#endif

+#ifndef HAVE_VXWORKS
+#define HAVE_VXWORKS 1
+#endif
+
/*
* XXX
* Handle function prototypes and the keyword "const". This steps on name
diff -Naur db3-old/db185/db185.c db-3.3.11/db185/db185.c
--- db3-old/db185/db185.c Wed Apr 11 12:47:45 2001
+++ db-3.3.11/db185/db185.c Thu Dec 20 15:03:30 2001
@@ -40,8 +40,13 @@

/*
* EXTERN: #define dbopen __db185_open
+ * EXTERN: #ifdef _DB185_INT_H_
* EXTERN: DB185 *__db185_open
* EXTERN: __P((const char *, int, int, DBTYPE, const void *));
+ * EXTERN: #else
+ * EXTERN: DB *__db185_open
+ * EXTERN: __P((const char *, int, int, DBTYPE, const void *));
+ * EXTERN: #endif
*/
DB185 *
__db185_open(file, oflags, mode, type, openinfo)
diff -Naur db3-old/db185/db185_int.in db-3.3.11/db185/db185_int.in
--- db3-old/db185/db185_int.in Wed Apr 11 05:43:54 2001
+++ db-3.3.11/db185/db185_int.in Thu Dec 20 15:03:30 2001
@@ -39,8 +39,8 @@
* $Id: db3-3.3.11-5.patch,v 1.1.1.1 2002/02/15 01:16:37 dmrrsn Exp $
*/

-#ifndef _DB_185_H_
-#define _DB_185_H_
+#ifndef _DB185_INT_H_
+#define _DB185_INT_H_

/* Routine flags. */
#define R_CURSOR 1 /* del, put, seq */
diff -Naur db3-old/dist/configure db-3.3.11/dist/configure
--- db3-old/dist/configure Fri Jul 13 10:34:11 2001
+++ db-3.3.11/dist/configure Thu Dec 20 15:04:25 2001
@@ -6550,7 +6550,7 @@
;;

darwin* | rhapsody*)
- allow_undefined_flag='-undefined suppress'
+ allow_undefined_flag='-flat_namespace -undefined suppress'
# FIXME: Relying on posixy $() will cause problems for
# cross-compilation, but unfortunately the echo tests do not
# yet detect zsh echo's removal of \ escapes.
@@ -8439,9 +8439,33 @@
# Prevent multiple expansion

LIBTOOL="\$(SHELL) ./libtool"
-SOSUFFIX=`sed -e '/^library_names_spec=/!d' -e 's/.*\.\([a-zA-Z0-9_]*\).*/\1/' ./libtool`
SOFLAGS="-rpath \$(libdir)"

+echo "$as_me:8770: checking SOSUFFIX from libtool" >&5
+echo $ECHO_N "checking SOSUFFIX from libtool... $ECHO_C" >&6
+# $library_names_spec is a snippet of shell that may
+# defined in terms of $versuffix, $release, $libname.
+# All we want is to eval it and grab the suffix used
+# for shared objects.
+versuffix=""
+release=""
+libname=libfoo
+eval library_names=\"$library_names_spec\"
+SOSUFFIX=`echo "$library_names" | sed -e 's/.*\.\([a-zA-Z0-9_]*\).*/\1/'`
+echo "$as_me:8781: result: $SOSUFFIX" >&5
+echo "${ECHO_T}$SOSUFFIX" >&6
+
+if test "$SOSUFFIX" = '' ; then
+ SOSUFFIX=so
+ if test "$enable_shared" = "yes"; then
+ { echo "$as_me:8787: WARNING: libtool may not know about this architecture." >&5
+echo "$as_me: WARNING: libtool may not know about this architecture." >&2;}
+ { echo "$as_me:8789: WARNING: assuming .$SOSUFFIX suffix for dynamic libraries." >&5
+echo "$as_me: WARNING: assuming .$SOSUFFIX suffix for dynamic libraries." >&2;}
+ fi
+fi
+
+
SAVE_CC="${MAKEFILE_CC}"
SAVE_CXX="${MAKEFILE_CXX}"
MAKEFILE_CC="\$(LIBTOOL) --mode=compile ${SAVE_CC}"
@@ -8728,7 +8752,7 @@
done
JTOPDIR=`echo "$JAVACABS" | sed -e 's://*:/:g' -e 's:/[^/]*$::'`
case "$host_os" in
- darwin*) JTOPDIR=`echo "$JTOPDIR" | sed -e s:/[^/]*$::'`
+ darwin*) JTOPDIR=`echo "$JTOPDIR" | sed -e 's:/[^/]*$::'`
JNIHEADERDIR="$JTOPDIR/Headers";;
*) JNIHEADERDIR="$JTOPDIR/include";;
esac
diff -Naur db3-old/include_auto/db185_ext.in db-3.3.11/include_auto/db185_ext.in
--- db3-old/include_auto/db185_ext.in Wed Apr 11 05:44:20 2001
+++ db-3.3.11/include_auto/db185_ext.in Thu Dec 20 15:03:30 2001
@@ -3,9 +3,13 @@
extern "C" {
#endif
#define dbopen __db185_open
+#ifdef _DB185_INT_H_
DB185 *__db185_open __P((const char *, int, int, DBTYPE, const void *));
+#else
+DB *__db185_open __P((const char *, int, int, DBTYPE, const void *));
+#endif
#if defined(__cplusplus)
}
#endif

-#endif /* !_DB_185_H_ */
+#endif /* _DB_185_H_ or _DB185_INT_H_ */
diff -Naur db3-old/include_auto/db185_uext.in db-3.3.11/include_auto/db185_uext.in
--- db3-old/include_auto/db185_uext.in Wed Apr 11 05:44:20 2001
+++ db-3.3.11/include_auto/db185_uext.in Thu Dec 20 15:03:30 2001
@@ -3,10 +3,15 @@
extern "C" {
#endif
#define dbopen __db185_open@DB_VERSION_UNIQUE_NAME@
+#ifdef _DB185_INT_H_
#define __db185_open __db185_open@DB_VERSION_UNIQUE_NAME@
DB185 *__db185_open __P((const char *, int, int, DBTYPE, const void *));
+#else
+#define __db185_open __db185_open@DB_VERSION_UNIQUE_NAME@
+DB *__db185_open __P((const char *, int, int, DBTYPE, const void *));
+#endif
#if defined(__cplusplus)
}
#endif

-#endif /* !_DB_185_H_ */
+#endif /* _DB_185_H_ or _DB185_INT_H_ */
--- db-3.3.11/include/mutex.h.orig Fri Oct 25 21:52:40 2002
+++ db-3.3.11/include/mutex.h Fri Oct 25 21:57:35 2002
@@ -482,6 +482,31 @@
* 'set' mutexes have the value 1, like on Intel; the returned value from
* MUTEX_SET() is 1 if the mutex previously had its low bit clear, 0 otherwise.
*/
+#if defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
+#warning "Using apple specific mutexes"
+extern int __db_mutex_set __P((volatile tsl_t *));
+void
+__db_mutex_tas_dummy()
+{
+ __asm__ __volatile__(" \n\
+ .globl ___db_mutex_set \n\
+___db_mutex_set: \n\
+ lwarx r5,0,r3 \n\
+ cmpwi r5,0 \n\
+ bne fail \n\
+ addi r5,r5,1 \n\
+ stwcx. r5,0,r3 \n\
+ beq success \n\
+fail: \n\
+ li r3,0 \n\
+ blr \n\
+success: \n\
+ li r3,1 \n\
+ blr");
+}
+#define MUTEX_SET(tsl) __db_mutex_set(tsl)
+#else
+
#define MUTEX_SET(tsl) ({ \
int __one = 1; \
int __r; \
@@ -499,6 +524,7 @@
!(__r & 1); \
})

+#endif
#define MUTEX_UNSET(tsl) (*(tsl) = 0)
#define MUTEX_INIT(tsl) MUTEX_UNSET(tsl)
#endif