From 54df2afaa61c6a03cbb4a33c9b90fa572b6d07b8 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Sat, 17 Dec 2016 21:28:53 -0800 Subject: Berkeley DB 4.8 with rust build script for linux. --- db-4.8.30/dist/s_csharp_stat | 163 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 db-4.8.30/dist/s_csharp_stat (limited to 'db-4.8.30/dist/s_csharp_stat') diff --git a/db-4.8.30/dist/s_csharp_stat b/db-4.8.30/dist/s_csharp_stat new file mode 100644 index 0000000..54af2ce --- /dev/null +++ b/db-4.8.30/dist/s_csharp_stat @@ -0,0 +1,163 @@ +#!/bin/sh - +# $Id$ +# +# Build the CSharp stat structures + +msgcsharp="/*- + * Automatically built by dist/s_java_csharp. + * + * See the file LICENSE for redistribution information. + * + * Copyright (c) 2002-2009 Oracle. All rights reserved. + */" + +f=../csharp/Internal/StatStructs.cs +t=AA_TEST +#trap 'rm -f $t; exit 0' 0 1 2 3 13 15 + +# Script to convert DB C structure declarations in CSharp declarations +# Pull out the structure we're concerned with, strip out ifdefs and defines +# and finally convert from C to C# types +csclass() +{ + sed -n "/struct $1 {/,/^}/p" < ../dbinc/db.in | + sed -e "/$1/d" \ + -e '/^}/d' \ + -e "/CONFIG_TEST/,/#endif/d" \ + -e "/^#/d" \ + -e 's:\tchar \*:\tinternal string :' \ + -e 's:\tdb_pgno_t:\tinternal uint:' \ + -e 's:\tdb_seq_t:\tinternal long:' \ + -e 's:\tdb_threadid_t:\tinternal uint:' \ + -e 's:\tdb_timeout_t:\tinternal uint:' \ + -e 's:\tDB_LSN:\tinternal DB_LSN_STRUCT:' \ + -e 's:\tDB_TXN_ACTIVE \*:\tinternal IntPtr :' \ + -e 's:\tint\s:\tinternal int :' \ + -e 's:\tint32_t:\tinternal int:' \ + -e 's:\tpid_t:\tinternal int:' \ + -e 's:\troff_t:\tinternal IntPtr:' \ + -e 's:\tsize_t:\tinternal IntPtr:' \ + -e 's:\ttime_t:\tinternal long:' \ + -e 's:\tu_int32_t:\tinternal uint:' \ + -e 's:\tuintmax_t:\tinternal ulong:' \ + -e "s:/\*.*\*/::" \ + -e "/\/\*/ { +N +/\/\*.*\*\// { +s:/\*.*\*/:: +P +D +} +}" +} + +stat_class() +{ + c_struct=__db_$1 + cs_struct=$2 + + (cat <> $t +} + +txn_active() +{ + (echo "internal enum DB_TXN_ACTIVE_STATUS {" + sed -n "/struct __db_txn_active {/,/^}/p" < ../dbinc/db.in | + sed -n "/^#define/p" | awk '{print " " $2 " = " $3 ","}' + echo "}" + echo ) >> $t + + (cat <> $t +} + +cat > $t <>$t <> $t <> $t < /dev/null 2>&1 || + (echo "Building $f" && rm -f $f && cp $t $f && chmod 644 $f) -- cgit v1.2.3