[SCM] Samba Shared Repository - branch master updated
Simo Sorce
idra at samba.org
Mon Feb 8 08:15:15 MST 2010
The branch, master has been updated
via 6bf2a82... talloc: Fix abi checks in release script
via 1422a94... talloc: Fix abi checks and ifdefs
from aa72950... s4-smbtorture: skip over ValidatePassword if DCERPC error is returned.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 6bf2a821b7a5fb0890b6fc9cd439a915252477a1
Author: Simo Sorce <idra at samba.org>
Date: Mon Feb 8 10:05:24 2010 -0500
talloc: Fix abi checks in release script
We must perform abi checks against the version we are going to release.
Not against the current tree we are in.
commit 1422a9465482deeba1218755e1d4d0a02e6abc3f
Author: Simo Sorce <idra at samba.org>
Date: Mon Feb 8 10:02:49 2010 -0500
talloc: Fix abi checks and ifdefs
teach the abi check scripts to skip the DOXYGEN sections
fix the header to use #ifdef DOXYGEN and not #if DOXYGEN
-----------------------------------------------------------------------
Summary of changes:
lib/talloc/script/mksigs.pl | 16 +++++++++++++
lib/talloc/script/mksyms.awk | 16 ++++++++++++-
lib/talloc/script/release-script.sh | 41 ++++++++++++++++++++--------------
lib/talloc/talloc.h | 4 +-
4 files changed, 56 insertions(+), 21 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/talloc/script/mksigs.pl b/lib/talloc/script/mksigs.pl
index 755cd79..dfe36bc 100755
--- a/lib/talloc/script/mksigs.pl
+++ b/lib/talloc/script/mksigs.pl
@@ -27,6 +27,7 @@ use strict;
use warnings;
my $in_comment = 0;
+my $in_doxygen = 0;
my $extern_C_block = 0;
while (my $LINE = <>) {
@@ -41,6 +42,14 @@ while (my $LINE = <>) {
}
}
+ # find end of DOXYGEN section
+ if ($in_doxygen) {
+ if ($LINE =~ /^#\s*else(?:\s+.*)?$/) {
+ $in_doxygen = 0;
+ }
+ next;
+ }
+
# strip C++-style comments
$LINE =~ s/^(.*?)\/\/.*$/$1/;
@@ -69,6 +78,13 @@ while (my $LINE = <>) {
$LINE .= " " . $LINE2;
}
+ # remove DOXYGEN sections
+ if ($LINE =~ /^#\s*ifdef\s+DOXYGEN(?:\s+.*)?$/) {
+ $in_doxygen = 1;
+ next;
+ }
+
+
# remove all preprocessor directives
next if ($LINE =~ /^#/);
diff --git a/lib/talloc/script/mksyms.awk b/lib/talloc/script/mksyms.awk
index 8775faf..83497a7 100644
--- a/lib/talloc/script/mksyms.awk
+++ b/lib/talloc/script/mksyms.awk
@@ -8,6 +8,7 @@
#
BEGIN {
inheader=0;
+ indoxygen=0;
}
END {
@@ -20,9 +21,15 @@ END {
}
next;
}
+ if (indoxygen) {
+ if (match($0,"^#[ \t]*else[ \t]*.*$")) {
+ indoxygen = 0;
+ }
+ next;
+ }
}
-/^static/ || /^[ \t]*typedef/ || !/^[a-zA-Z\_]/ {
+/^static/ || /^[ \t]*typedef/ || !/^[a-zA-Z\_\#]/ {
next;
}
@@ -33,11 +40,16 @@ END {
next;
}
+/^#[ \t]*ifdef[ \t]*DOXYGEN[ \t]*.*$/ {
+ indoxygen=1;
+ next;
+}
+
# look for function headers:
{
gotstart = 0;
if ($0 ~ /^[A-Za-z_][A-Za-z0-9_]+/) {
- gotstart = 1;
+ gotstart = 1;
}
if(!gotstart) {
next;
diff --git a/lib/talloc/script/release-script.sh b/lib/talloc/script/release-script.sh
index fd5c1ef..2f354ab 100755
--- a/lib/talloc/script/release-script.sh
+++ b/lib/talloc/script/release-script.sh
@@ -10,19 +10,6 @@ if [ ! -d "lib/talloc" ]; then
exit 1
fi
-# Check exports and signatures are up to date
-pushd lib/talloc
-./script/abi_checks.sh talloc talloc.h
-abicheck=$?
-popd
-if [ ! "$abicheck" = "0" ]; then
- echo "ERROR: ABI Checks produced warnings!"
- exit 1
-fi
-
-git clean -f -x -d lib/talloc
-git clean -f -x -d lib/replace
-
curbranch=`git branch |grep "^*" | tr -d "* "`
version=$1
@@ -35,15 +22,36 @@ if [ ! "$?" = "0" ]; then
exit 1
fi
+function cleanquit {
+ #Clean up
+ git checkout $curbranch
+ git branch -d talloc-release-script-${strver}
+ exit $1
+}
+
+# NOTE: use cleanquit after this point
git checkout talloc-release-script-${strver}
# Test configure agrees with us
confver=`grep "^AC_INIT" lib/talloc/configure.ac | tr -d "AC_INIT(talloc, " | tr -d ")"`
if [ ! "$confver" = "$version" ]; then
echo "Wrong version, requested release for ${version}, found ${confver}"
- exit 1
+ cleanquit 1
+fi
+
+# Check exports and signatures are up to date
+pushd lib/talloc
+./script/abi_checks.sh talloc talloc.h
+abicheck=$?
+popd
+if [ ! "$abicheck" = "0" ]; then
+ echo "ERROR: ABI Checks produced warnings!"
+ cleanquit 1
fi
+git clean -f -x -d lib/talloc
+git clean -f -x -d lib/replace
+
# Now build tarball
cp -a lib/talloc talloc-${version}
cp -a lib/replace talloc-${version}/libreplace
@@ -53,6 +61,5 @@ popd
tar cvzf talloc-${version}.tar.gz talloc-${version}
rm -fr talloc-${version}
-#Clean up
-git checkout $curbranch
-git branch -d talloc-release-script-${strver}
+cleanquit 0
+
diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h
index ca75b98..edd9b8a 100644
--- a/lib/talloc/talloc.h
+++ b/lib/talloc/talloc.h
@@ -222,7 +222,7 @@ int _talloc_free(void *ptr, const char *location);
*/
void talloc_free_children(void *ptr);
-#if DOXYGEN
+#ifdef DOXYGEN
/**
* @brief Assign a destructor function to be called when a chunk is freed.
*
@@ -1191,7 +1191,7 @@ void *talloc_realloc(const void *ctx, void *ptr, #type, size_t count);
void *_talloc_realloc_array(const void *ctx, void *ptr, size_t el_size, unsigned count, const char *name);
#endif
-#if DOXYGEN
+#ifdef DOXYGEN
/**
* @brief Untyped realloc to change the size of a talloc array.
*
--
Samba Shared Repository
More information about the samba-cvs
mailing list