summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/dist/s_prototypes
diff options
context:
space:
mode:
authorAlex Gorrod <alexg@wiredtiger.com>2016-04-05 14:43:57 +1000
committerAlex Gorrod <alexg@wiredtiger.com>2016-04-05 14:44:50 +1000
commitde6f136d83b20f8a58ba6fe4ba02be229b6c9159 (patch)
tree3221d66b54cbf6208fc3c995fdbb36d347ae85ff /src/third_party/wiredtiger/dist/s_prototypes
parent5d1262cc394d685b59ae3185d7315227085e897d (diff)
downloadmongo-de6f136d83b20f8a58ba6fe4ba02be229b6c9159.tar.gz
Import wiredtiger-wiredtiger-2.8.0-134-g5047aab.tar.gz from wiredtiger branch mongodb-3.4
ref: 9cf8eb2..5047aab SERVER-23504 Coverity analysis defect 98177: Resource leak WT-2330 in-memory configurations should not create on-disk collection files WT-2513 conversion from 'int64_t' to 'uint32_t' WT-2522 Incorrect format code in message WT-2525 in-memory configurations: miscellaneous cleanups WT-2527 OS X compile error, missing POSIX_FADV_WILLNEED #define WT-2528 style error in WiredTiger build WT-2529 The readonly test case is crashing with a stack overflow WT-2531 in-memory tables are allocating unnecessary memory WT-2532 WT_STREAM_APPEND and WT_STREAM_LINE_BUFFER flag overlap WT-2533 Ensure that in-memory tables don't report a zero size SERVER-23517 WiredTiger changes for MongoDB 3.3.5
Diffstat (limited to 'src/third_party/wiredtiger/dist/s_prototypes')
-rwxr-xr-xsrc/third_party/wiredtiger/dist/s_prototypes42
1 files changed, 32 insertions, 10 deletions
diff --git a/src/third_party/wiredtiger/dist/s_prototypes b/src/third_party/wiredtiger/dist/s_prototypes
index 603c0f5633d..4ceb69f4c77 100755
--- a/src/third_party/wiredtiger/dist/s_prototypes
+++ b/src/third_party/wiredtiger/dist/s_prototypes
@@ -4,13 +4,10 @@
t=__wt.$$
trap 'rm -f $t; exit 0' 0 1 2 3 13 15
-(
-cat <<EOF
-/* DO NOT EDIT: automatically built by dist/s_prototypes. */
-
-EOF
-
-for i in `sed -e '/^[a-z]/!d' filelist`; do
+# proto --
+# extract public functions.
+proto()
+{
sed -n \
-e '/^__wt_[a-z]/!{' \
-e h \
@@ -32,9 +29,34 @@ for i in `sed -e '/^[a-z]/!d' filelist`; do
-e 's/ */ /g' \
-e 's/^/extern /' \
-e 's/WT_GCC_FUNC_/WT_GCC_FUNC_DECL_/' \
- -e 's/$/;/p' \
- < ../$i
-done) > $t
+ -e 's/$/;/p' < $1
+}
+
+(
+cat <<EOF
+/* DO NOT EDIT: automatically built by dist/s_prototypes. */
+
+EOF
+
+# First, get prototypes for everything but the OS directories.
+# Second, get prototypes for the OS directories.
+# The reason for this is because the OS directories repeat names (that is, there
+# are common names in both os_posix and os_win), and so we sort the prototypes
+# to avoid repeating them in the output (which some compilers won't tolerate).
+# We'd sort everything and discard duplicates, but we can't sort when function
+# signatures are on multiple lines, that is, #ifdef'd function signatures. Since
+# the OS directories are the only places with repeated names, and they have no
+# #ifdef'd signatures, we do it this way.
+l=`sed -e '/^[a-z]/!d' -e '/src\/os/d' filelist`
+for i in $l; do
+ proto ../$i
+done
+l=`echo ../src\/os*/*.c`
+
+for i in $l; do
+ proto $i
+done | tee xxx | env LC_ALL=C sort -u
+) > $t
f=../src/include/extern.h
cmp $t $f > /dev/null 2>&1 ||