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