4
# Build Windows/32 include files.
6
msgc="/* DO NOT EDIT: automatically built by dist/s_win32. */"
7
msgw="; DO NOT EDIT: automatically built by dist/s_win32."
15
trap 'rm -f $s $t ; exit 1' 1 2 3 13 15
17
# Build the Win32 automatically generated files.
19
cat <<ENDOFSEDTEXT > $s
20
s/@u_int8_decl@/typedef unsigned char u_int8_t;/
21
s/@int16_decl@/typedef short int16_t;/
22
s/@u_int16_decl@/typedef unsigned short u_int16_t;/
23
s/@int32_decl@/typedef int int32_t;/
24
s/@u_int32_decl@/typedef unsigned int u_int32_t;/
27
#if !defined(_WINSOCKAPI_)
28
s/@u_char_decl@/typedef unsigned char u_char;/
30
s/@u_short_decl@/typedef unsigned short u_short;/
31
s/@u_int_decl@/typedef unsigned int u_int;/
33
s/@u_long_decl@/typedef unsigned long u_long;/
40
typedef __int64 ssize_t;\\
42
typedef int ssize_t;\\
46
s/@DB_VERSION_MAJOR@/$DB_VERSION_MAJOR/
47
s/@DB_VERSION_MINOR@/$DB_VERSION_MINOR/
48
s/@DB_VERSION_PATCH@/$DB_VERSION_PATCH/
49
s/@DB_VERSION_STRING@/"$DB_VERSION_STRING"/
50
s/@DB_VERSION_UNIQUE_NAME@//
53
sed -f $s ../dbinc/db.in &&
54
cat ../dbinc_auto/rpc_defs.in &&
55
cat ../dbinc_auto/ext_prot.in) > $t
56
cmp $t $f > /dev/null 2>&1 ||
57
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
59
f=../build_win32/db_cxx.h
60
cat <<ENDOFSEDTEXT > $s
61
s/@cxx_have_stdheaders@/#define HAVE_CXX_STDHEADERS 1/
63
(echo "$msgc" && sed -f $s ../dbinc/db_cxx.in) > $t
64
cmp $t $f > /dev/null 2>&1 ||
65
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
67
f=../build_win32/db_int.h
68
cat <<ENDOFSEDTEXT > $s
69
s/\(PATH_SEPARATOR[^"]*"\)\/"/\1\\\\\\\\\\/:\"/
70
s/@db_align_t_decl@/typedef unsigned long db_align_t;/
71
s/@db_alignp_t_decl@/typedef unsigned long db_alignp_t;/
74
(echo "$msgc" && sed -f $s ../dbinc/db_int.in) > $t
75
cmp $t $f > /dev/null 2>&1 ||
76
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
78
f=../build_win32/db_config.h
79
(echo "$msgc" && sed "s/__EDIT_DB_VERSION__/$DB_VERSION/" win_config.in) > $t
80
cmp $t $f > /dev/null 2>&1 ||
81
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
83
f=../build_win32/libdb.rc
84
cat <<ENDOFSEDTEXT > $s
85
s/%MAJOR%/$DB_VERSION_MAJOR/
86
s/%MINOR%/$DB_VERSION_MINOR/
87
s/%PATCH%/$DB_VERSION_PATCH/
89
sed -f $s ../build_win32/libdbrc.src > $t
90
cmp $t $f > /dev/null 2>&1 ||
91
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
93
f=../build_win32/libdb.def
97
"DESCRIPTION 'Berkeley DB $DB_VERSION_MAJOR.$DB_VERSION_MINOR Library'" &&
101
for i in `sed -e '/^$/d' -e '/^#/d' win_exports.in`; do
105
cmp $t $f > /dev/null 2>&1 ||
106
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)